diff options
author | Diana Picus <diana.picus@linaro.org> | 2018-02-15 05:52:34 +0100 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2018-02-21 13:48:24 +0000 |
commit | 49ee93aa15132f4a90a98bca433678b622a5bdb2 (patch) | |
tree | a37bf74e3c5ab79179c944979b0a9986a5a6be7a /scripts/llvm.py | |
parent | 6cdb516102c258904c250090b801776c2dffb919 (diff) |
build-and-test: Make it possible to customize test suite run
Allow the user to pass flags to LNT when running the test-suite.
Change-Id: Idb66ac25934281613f6392750b38d5c53f99761a
Diffstat (limited to 'scripts/llvm.py')
-rw-r--r-- | scripts/llvm.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/llvm.py b/scripts/llvm.py index bdeae85..8d9a4c1 100644 --- a/scripts/llvm.py +++ b/scripts/llvm.py @@ -206,6 +206,7 @@ def build_and_test(args): enableTestSuite = args.enableTestSuite sandboxDir = args.sandbox + testSuiteFlags = args.testSuiteFlags if dryRun: consumer = CommandPrinter() @@ -266,7 +267,7 @@ def build_and_test(args): lit = os.path.join(testedBuildDir, "bin", "llvm-lit") clang = os.path.join(testedBuildDir, "bin", "clang") run_test_suite(consumer, sandboxDir, testSuiteDir, lit, - ["--cc={}".format(clang)]) + ["--cc={}".format(clang)] + testSuiteFlags) except RuntimeError as exc: die("Failed because:\n{}".format(str(exc))) @@ -567,6 +568,15 @@ buildAndTest.add_argument( "--sandbox", help="Path to the sandbox where the test-suite should be setup.") buildAndTest.add_argument( + '--lnt-flag', + dest='testSuiteFlags', + metavar='FLAG', + default=[], + action='append', + help="Additional flags to be passed to LNT when running the test-suite." + "May be passed several times. If your flag starts with a '-', use " + "'--lnt-flag=-FLAG' to pass it.") +buildAndTest.add_argument( '-n', '--dry-run', dest='dry', action='store_true', |