"""
idir = "instance-%d" % args.instance
-
- # We need the absolute path to use with O=, because the relative
- # path to the output directory here is not relative to the
- # Buildroot sources, but to the location of the autobuilder
- # script.
- outputdir = os.path.abspath(os.path.join(idir, "output"))
srcdir = os.path.join(idir, "buildroot")
# Select a random toolchain configuration
configlines.append("BR2_PACKAGE_PYTHON_PY_ONLY=y\n")
# Write out the configuration file
- with open(os.path.join(outputdir, ".config"), "w+") as configf:
+ with open(os.path.join(args.outputdir, ".config"), "w+") as configf:
configf.writelines(configlines)
- subprocess.check_call(["make", "O=%s" % outputdir, "-C", srcdir,
+ subprocess.check_call(["make", "O=%s" % args.outputdir, "-C", srcdir,
"olddefconfig"])
- if not is_toolchain_usable(outputdir, config):
+ if not is_toolchain_usable(args.outputdir, config):
return 2
# Now, generate the random selection of packages, and fixup
file=sys.stderr)
return 1
bounded_loop -= 1
- subprocess.check_call(["make", "O=%s" % outputdir, "-C", srcdir,
+ subprocess.check_call(["make", "O=%s" % args.outputdir, "-C", srcdir,
"KCONFIG_PROBABILITY=%d" % randint(1, 30),
"randpackageconfig"])
- if fixup_config(outputdir):
+ if fixup_config(args.outputdir):
break
- subprocess.check_call(["make", "O=%s" % outputdir, "-C", srcdir,
+ subprocess.check_call(["make", "O=%s" % args.outputdir, "-C", srcdir,
"olddefconfig"])
- subprocess.check_call(["make", "O=%s" % outputdir, "-C", srcdir,
+ subprocess.check_call(["make", "O=%s" % args.outputdir, "-C", srcdir,
"savedefconfig"])
return 0
# Output directory is already created by autobuild-run so emulate it here
idir = "instance-%d" % args.instance
+ # We need the absolute path to use with O=, because the relative
+ # path to the output directory here is not relative to the
+ # Buildroot sources, but to the location of the autobuilder
+ # script.
+ args.outputdir = os.path.abspath(os.path.join(idir, "output"))
+
if not os.path.exists(idir):
os.mkdir(idir)
- os.mkdir(os.path.join(idir, "output"))
+ os.mkdir(args.outputdir)
# gen_config expects "buildroot" directory under idir
os.symlink("..", os.path.join(idir, "buildroot"))