diff options
author | Ricardo Martincoski <ricardo.martincoski@datacom.ind.br> | 2019-02-05 21:25:29 -0600 |
---|---|---|
committer | Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> | 2019-02-06 10:40:15 +0100 |
commit | 0461ef4dea3d39a53894bf68697c266db2d33f5a (patch) | |
tree | 75a81cbf97d93f78b1cfebf991b024592efbaf7e /support/testing/run-tests | |
parent | e0d540bdda33c21c3c20edfa93c910a874bd4df1 (diff) | |
download | buildroot-0461ef4dea3d39a53894bf68697c266db2d33f5a.tar.gz buildroot-0461ef4dea3d39a53894bf68697c266db2d33f5a.zip |
testing/infra: Add BRConfigTest as superclass of BRTest
The git tests don't need to do a full build, they only need to do a
configure and download and/or legal-info. More tests of that type will
be added in the future. Therefore, we want to have a test base class
that doesn't automatically do a full build in the setUp().
Add this new class as a superclass of the existing BRTest class, so we
don't need to update existing tests. Only the code in run-tests that
iterates over all subclasses of BRTest has to be adapted to use
BRConfigTest instead.
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@datacom.ind.br>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Diffstat (limited to 'support/testing/run-tests')
-rwxr-xr-x | support/testing/run-tests | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/support/testing/run-tests b/support/testing/run-tests index 76dd15e9f0..813b927045 100755 --- a/support/testing/run-tests +++ b/support/testing/run-tests @@ -5,7 +5,7 @@ import os import nose2 import multiprocessing -from infra.basetest import BRTest +from infra.basetest import BRConfigTest def main(): @@ -38,7 +38,7 @@ def main(): test_dir = os.path.dirname(script_path) if args.stdout: - BRTest.logtofile = False + BRConfigTest.logtofile = False if args.list: print("List of tests") @@ -57,7 +57,7 @@ def main(): parser.print_help() return 1 - BRTest.downloaddir = os.path.abspath(args.download) + BRConfigTest.downloaddir = os.path.abspath(args.download) if args.output is None: print("Missing output directory, please use -o/--output") @@ -68,7 +68,7 @@ def main(): if not os.path.exists(args.output): os.mkdir(args.output) - BRTest.outputdir = os.path.abspath(args.output) + BRConfigTest.outputdir = os.path.abspath(args.output) if args.all is False and len(args.testname) == 0: print("No test selected") @@ -76,7 +76,7 @@ def main(): parser.print_help() return 1 - BRTest.keepbuilds = args.keep + BRConfigTest.keepbuilds = args.keep if args.testcases != 1: if args.testcases < 1: @@ -89,7 +89,7 @@ def main(): each_testcase = br2_jlevel / args.testcases if each_testcase < 1: each_testcase = 1 - BRTest.jlevel = each_testcase + BRConfigTest.jlevel = each_testcase if args.jlevel: if args.jlevel < 0: @@ -98,14 +98,14 @@ def main(): parser.print_help() return 1 # the user can override the auto calculated value - BRTest.jlevel = args.jlevel + BRConfigTest.jlevel = args.jlevel if args.timeout_multiplier < 1: print("Invalid multiplier for timeout values") print("") parser.print_help() return 1 - BRTest.timeout_multiplier = args.timeout_multiplier + BRConfigTest.timeout_multiplier = args.timeout_multiplier nose2_args = ["-v", "-N", str(args.testcases), |