diff options
Diffstat (limited to 'meta/lib/oeqa/runexported.py')
-rwxr-xr-x | meta/lib/oeqa/runexported.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/meta/lib/oeqa/runexported.py b/meta/lib/oeqa/runexported.py index 125e86d0e6..7e37213df6 100755 --- a/meta/lib/oeqa/runexported.py +++ b/meta/lib/oeqa/runexported.py @@ -1,9 +1,9 @@ #!/usr/bin/env python3 - - +# # Copyright (C) 2013 Intel Corporation # -# Released under the MIT license (see COPYING.MIT) +# SPDX-License-Identifier: MIT +# # This script should be used outside of the build system to run image tests. # It needs a json file as input as exported by the build. @@ -43,8 +43,8 @@ class FakeTarget(object): self.ip = None self.server_ip = None self.datetime = time.strftime('%Y%m%d%H%M%S',time.gmtime()) - self.testdir = d.getVar("TEST_LOG_DIR", True) - self.pn = d.getVar("PN", True) + self.testdir = d.getVar("TEST_LOG_DIR") + self.pn = d.getVar("PN") def exportStart(self): self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime) @@ -81,6 +81,7 @@ def main(): specified in the json if that directory actually exists or it will error out.") parser.add_argument("-l", "--log-dir", dest="log_dir", help="This sets the path for TEST_LOG_DIR. If not specified \ the current dir is used. This is used for usually creating a ssh log file and a scp test file.") + parser.add_argument("-a", "--tag", dest="tag", help="Only run test with specified tag.") parser.add_argument("json", help="The json file exported by the build system", default="testdata.json", nargs='?') args = parser.parse_args() @@ -107,6 +108,9 @@ def main(): if not os.path.isdir(d["DEPLOY_DIR"]): print("WARNING: The path to DEPLOY_DIR does not exist: %s" % d["DEPLOY_DIR"]) + parsedArgs = {} + parsedArgs["tag"] = args.tag + extract_sdk(d) target = FakeTarget(d) @@ -114,7 +118,7 @@ def main(): setattr(target, key, loaded["target"][key]) target.exportStart() - tc = ExportTestContext(d, target, True) + tc = ExportTestContext(d, target, True, parsedArgs) tc.loadTests() tc.runTests() @@ -126,8 +130,8 @@ def extract_sdk(d): """ export_dir = os.path.dirname(os.path.realpath(__file__)) - tools_dir = d.getVar("TEST_EXPORT_SDK_DIR", True) - tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME", True) + tools_dir = d.getVar("TEST_EXPORT_SDK_DIR") + tarball_name = "%s.sh" % d.getVar("TEST_EXPORT_SDK_NAME") tarball_path = os.path.join(export_dir, tools_dir, tarball_name) extract_path = os.path.join(export_dir, "sysroot") if os.path.isfile(tarball_path): |