diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 23:16:34 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 23:41:20 +0000 |
commit | afd24faa00fdf622235fc1125eddd1da8afb0323 (patch) | |
tree | 1d1384f4786465b9bb84dad6145c043be8e07ded /meta | |
parent | fef84540e33e74b74f5951cc46dff9a93eb5e446 (diff) | |
download | poky-afd24faa00fdf622235fc1125eddd1da8afb0323.tar.gz |
imagetest-qemu: Adapt to bitbake environment changes
Load environment variables like DISPLAY from BB_ORIGENV after recent
bitbake changes.
(From OE-Core rev: 8ad8b34b5ac36d805bb10c120f3388e7dce83b98)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/imagetest-qemu.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass index 06ba3e3813..0d18f065a4 100644 --- a/meta/classes/imagetest-qemu.bbclass +++ b/meta/classes/imagetest-qemu.bbclass | |||
@@ -67,7 +67,6 @@ def qemuimagetest_main(d): | |||
67 | os.environ["DEPLOY_DIR"] = d.getVar("DEPLOY_DIR", True) | 67 | os.environ["DEPLOY_DIR"] = d.getVar("DEPLOY_DIR", True) |
68 | os.environ["QEMUARCH"] = machine | 68 | os.environ["QEMUARCH"] = machine |
69 | os.environ["QEMUTARGET"] = pname | 69 | os.environ["QEMUTARGET"] = pname |
70 | os.environ["DISPLAY"] = d.getVar("DISPLAY", True) | ||
71 | os.environ["COREBASE"] = d.getVar("COREBASE", True) | 70 | os.environ["COREBASE"] = d.getVar("COREBASE", True) |
72 | os.environ["TOPDIR"] = d.getVar("TOPDIR", True) | 71 | os.environ["TOPDIR"] = d.getVar("TOPDIR", True) |
73 | os.environ["OE_TMPDIR"] = d.getVar("TMPDIR", True) | 72 | os.environ["OE_TMPDIR"] = d.getVar("TMPDIR", True) |
@@ -76,6 +75,16 @@ def qemuimagetest_main(d): | |||
76 | os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True) | 75 | os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True) |
77 | os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True) | 76 | os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True) |
78 | 77 | ||
78 | # Add in all variables from the user's original environment which | ||
79 | # haven't subsequntly been set/changed | ||
80 | origbbenv = d.getVar("BB_ORIGENV", False) or {} | ||
81 | for key in origbbenv: | ||
82 | if key in os.environ: | ||
83 | continue | ||
84 | value = origbbenv.getVar(key, True) | ||
85 | if value is not None: | ||
86 | os.environ[key] = str(value) | ||
87 | |||
79 | """run Test Case""" | 88 | """run Test Case""" |
80 | bb.note("Run %s test in scenario %s" % (case, scen)) | 89 | bb.note("Run %s test in scenario %s" % (case, scen)) |
81 | subprocess.call("%s" % fulltestpath, shell=True) | 90 | subprocess.call("%s" % fulltestpath, shell=True) |