diff options
author | William Deegan <bill@baddogconsulting.com> | 2018-10-01 00:20:50 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2018-10-01 00:20:50 (GMT) |
commit | b257b48fe5c7006efca86e323836f6b73cb5c359 (patch) | |
tree | 1916ed6ffbb892f0a4489ff11c43ab62899e2b5d /testing | |
parent | 6c916c5723add8bd00f891d1bad165b79696400a (diff) | |
download | SCons-b257b48fe5c7006efca86e323836f6b73cb5c359.zip SCons-b257b48fe5c7006efca86e323836f6b73cb5c359.tar.gz SCons-b257b48fe5c7006efca86e323836f6b73cb5c359.tar.bz2 |
Add test for 1.8. Modularize java tests and move files to a fixture. Change TestCommon's options_arguments to keep passed lists and not join them into a string.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/framework/TestCommon.py | 11 | ||||
-rw-r--r-- | testing/framework/TestSCons.py | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/testing/framework/TestCommon.py b/testing/framework/TestCommon.py index e55b491..012f134 100644 --- a/testing/framework/TestCommon.py +++ b/testing/framework/TestCommon.py @@ -242,11 +242,16 @@ class TestCommon(TestCmd): if options: if arguments is None: return options + + # If not list, then split into lists + # this way we're not losing arguments specified with + # Spaces in quotes. if isinstance(options, str): - options = [options] + options = options.split() if isinstance(arguments, str): - arguments = [arguments] - arguments = ' '.join(options + arguments) + arguments = arguments.split() + arguments = options + arguments + return arguments def must_be_writable(self, *files): diff --git a/testing/framework/TestSCons.py b/testing/framework/TestSCons.py index bf6aabb..5ae6846 100644 --- a/testing/framework/TestSCons.py +++ b/testing/framework/TestSCons.py @@ -418,6 +418,10 @@ class TestSCons(TestCommon): # TestCommon.run(self, *args, **kw) def up_to_date(self, arguments = '.', read_str = "", **kw): + """Asserts that all of the targets listed in arguments is + up to date, but does not make any assumptions on other targets. + This function is most useful in conjunction with the -n option. + """ s = "" for arg in arguments.split(): s = s + "scons: `%s' is up to date.\n" % arg |