diff options
Diffstat (limited to 'meta/classes/imagetest-qemu.bbclass')
-rw-r--r-- | meta/classes/imagetest-qemu.bbclass | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass index d56b44b5c4..f51eeba98c 100644 --- a/meta/classes/imagetest-qemu.bbclass +++ b/meta/classes/imagetest-qemu.bbclass | |||
@@ -28,6 +28,7 @@ def qemuimagetest_main(d): | |||
28 | import re | 28 | import re |
29 | import os | 29 | import os |
30 | import shutil | 30 | import shutil |
31 | import subprocess | ||
31 | 32 | ||
32 | """ | 33 | """ |
33 | Test Controller for automated testing. | 34 | Test Controller for automated testing. |
@@ -58,7 +59,7 @@ def qemuimagetest_main(d): | |||
58 | logpath = d.getVar('TEST_LOG', True) | 59 | logpath = d.getVar('TEST_LOG', True) |
59 | bb.utils.mkdirhier("%s/%s" % (logpath, scen)) | 60 | bb.utils.mkdirhier("%s/%s" % (logpath, scen)) |
60 | caselog = os.path.join(logpath, "%s/log_%s.%s" % (scen, case, d.getVar('DATETIME', True))) | 61 | caselog = os.path.join(logpath, "%s/log_%s.%s" % (scen, case, d.getVar('DATETIME', True))) |
61 | os.system("touch %s" % caselog) | 62 | subprocess.call("touch %s" % caselog, shell=True) |
62 | 63 | ||
63 | """export TEST_TMP, TEST_RESULT, DEPLOY_DIR and QEMUARCH""" | 64 | """export TEST_TMP, TEST_RESULT, DEPLOY_DIR and QEMUARCH""" |
64 | os.environ["PATH"] = d.getVar("PATH", True) | 65 | os.environ["PATH"] = d.getVar("PATH", True) |
@@ -78,7 +79,7 @@ def qemuimagetest_main(d): | |||
78 | 79 | ||
79 | """run Test Case""" | 80 | """run Test Case""" |
80 | bb.note("Run %s test in scenario %s" % (case, scen)) | 81 | bb.note("Run %s test in scenario %s" % (case, scen)) |
81 | os.system("%s" % fulltestpath) | 82 | subprocess.call("%s" % fulltestpath, shell=True) |
82 | 83 | ||
83 | """function to check testcase list and remove inappropriate cases""" | 84 | """function to check testcase list and remove inappropriate cases""" |
84 | def check_list(list): | 85 | def check_list(list): |
@@ -168,7 +169,7 @@ def qemuimagetest_main(d): | |||
168 | test_status = d.getVar('TEST_STATUS', True) | 169 | test_status = d.getVar('TEST_STATUS', True) |
169 | if os.path.exists(test_status): | 170 | if os.path.exists(test_status): |
170 | os.remove(test_status) | 171 | os.remove(test_status) |
171 | os.system("touch %s" % test_status) | 172 | subprocess.call("touch %s" % test_status, shell=True) |
172 | 173 | ||
173 | """initialize result file""" | 174 | """initialize result file""" |
174 | resultpath = d.getVar('TEST_RESULT', True) | 175 | resultpath = d.getVar('TEST_RESULT', True) |
@@ -180,7 +181,7 @@ def qemuimagetest_main(d): | |||
180 | 181 | ||
181 | if os.path.exists(sresultfile): | 182 | if os.path.exists(sresultfile): |
182 | os.remove(sresultfile) | 183 | os.remove(sresultfile) |
183 | os.system("touch %s" % resultfile) | 184 | subprocess.call("touch %s" % resultfile, shell=True) |
184 | os.symlink(resultfile, sresultfile) | 185 | os.symlink(resultfile, sresultfile) |
185 | f = open(sresultfile, "a") | 186 | f = open(sresultfile, "a") |
186 | f.write("\tTest Result for %s %s\n" % (machine, pname)) | 187 | f.write("\tTest Result for %s %s\n" % (machine, pname)) |