diff options
author | Jiajun Xu <jiajun.xu@intel.com> | 2011-05-03 10:07:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-04 00:56:33 +0100 |
commit | ea4857a98b500e0b73d875b28c43e2d1d0f740b6 (patch) | |
tree | 23cbe4dab67160a869b2689949720b10de1a3c99 /meta/classes | |
parent | 49e2fcc60458853d7ff7f2908e695b11a95f3061 (diff) | |
download | ast2050-yocto-poky-ea4857a98b500e0b73d875b28c43e2d1d0f740b6.zip ast2050-yocto-poky-ea4857a98b500e0b73d875b28c43e2d1d0f740b6.tar.gz |
qemuimagetest: Enable toolchain automation tests in qemuimagetest
Enable toolchain automation tests in qemuimagetest framework. 3 C/C++ test
projects are added to test toolchain - cvs, iptables and sudoku-savant. User
needs to set TEST_SCEN to "toolchain" in local.conf to enable tests. Test case
will check if toolchain tarball exists under "${DEPLOY_DIR}/sdk". And it will
extract toolchain tarball into /opt. It requires user to chown /opt to non-root
user, who will run qemuimagetest.
Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/imagetest-qemu.bbclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass index daeb8d8..e259ae9 100644 --- a/meta/classes/imagetest-qemu.bbclass +++ b/meta/classes/imagetest-qemu.bbclass @@ -27,6 +27,7 @@ def qemuimagetest_main(d): import sys import re import os + import shutil """ Test Controller for automated testing. @@ -72,6 +73,7 @@ def qemuimagetest_main(d): os.environ["TEST_STATUS"] = bb.data.getVar("TEST_STATUS", d, True) os.environ["TARGET_IPSAVE"] = bb.data.getVar("TARGET_IPSAVE", d, True) os.environ["TEST_SERIALIZE"] = bb.data.getVar("TEST_SERIALIZE", d, True) + os.environ["SDK_NAME"] = bb.data.getVar("SDK_NAME", d, True) """run Test Case""" bb.note("Run %s test in scenario %s" % (case, scen)) @@ -120,7 +122,10 @@ def qemuimagetest_main(d): if os.path.isdir(tmppath): for f in os.listdir(tmppath): tmpfile = os.path.join(tmppath, f) - os.remove(tmpfile) + if os.path.isfile(tmpfile): + os.remove(tmpfile) + elif os.path.isdir(tmpfile): + shutil.rmtree(tmpfile, True) """Before running testing, clean temp folder first""" clean_tmp() @@ -154,7 +159,7 @@ def qemuimagetest_main(d): os.system("touch %s" % resultfile) os.symlink(resultfile, sresultfile) f = open(sresultfile, "a") - f.write("\tTest Result for %s\n" % machine) + f.write("\tTest Result for %s %s\n" % (machine, pname)) f.write("\t%-15s%-15s%-15s%-15s\n" % ("Testcase", "PASS", "FAIL", "NORESULT")) f.close() |