diff options
author | Ricardo Martincoski <ricardo.martincoski@gmail.com> | 2017-10-29 12:06:00 -0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-04-01 19:59:36 +0200 |
commit | b19cb8143b0c1337d370010550532c4fc23124d9 (patch) | |
tree | 8ee2bfe435f6dc0fb36f8518b29f16d5e4953def /support/testing/infra/builder.py | |
parent | a7785f47ba7c00dcaa9676d77fa1fffabe628837 (diff) | |
download | buildroot-b19cb8143b0c1337d370010550532c4fc23124d9.tar.gz buildroot-b19cb8143b0c1337d370010550532c4fc23124d9.zip |
testing/infra/builder: call make with empty env
Use an empty environment when calling make, but import PATH so the
buildroot tree under test can find binaries from the host machine.
Since environment variables are now ignored, move the handling of
BR2_DL_DIR to the defconfig to keep the current precedence of -d:
BR2_DL_DIR | -d DIR | test downloads | BR downloads
------------+----------+------------------+--------------
unset | unset | [error] | [error]
unset | set | in $(DIR) | in $(DIR)
set | unset | in $(BR2_DL_DIR) | in $(BR2_DL_DIR)
set | set | in $(DIR) | in $(DIR)
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'support/testing/infra/builder.py')
-rw-r--r-- | support/testing/infra/builder.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py index 7512339ae1..36f4801a2d 100644 --- a/support/testing/infra/builder.py +++ b/support/testing/infra/builder.py @@ -24,15 +24,18 @@ class Builder(object): "> end defconfig\n") self.logfile.flush() + env = {"PATH": os.environ["PATH"]} cmd = ["make", "O={}".format(self.builddir), "olddefconfig"] - ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile) + ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile, + env=env) if ret != 0: raise SystemError("Cannot olddefconfig") cmd = ["make", "-C", self.builddir] - ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile) + ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile, + env=env) if ret != 0: raise SystemError("Build failed") |