diff options
author | Mats Wichmann <mats@linux.com> | 2021-08-21 19:12:42 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-08-21 19:12:42 (GMT) |
commit | 34fe584f89e0623528af41f1b3b6fead1a46345f (patch) | |
tree | ae74953e44539aca8f8d4cae5901d5d1512d3e34 | |
parent | 36fbf4537a8f6364eb2380763f95a55a5ab78d92 (diff) | |
download | SCons-34fe584f89e0623528af41f1b3b6fead1a46345f.zip SCons-34fe584f89e0623528af41f1b3b6fead1a46345f.tar.gz SCons-34fe584f89e0623528af41f1b3b6fead1a46345f.tar.bz2 |
Two small test tweaks
Modernize the C in test/Libs/LIBS.py to avoid clang errors (gcc
and MSVC only warn here).
Change where test list is sorted in SCons/cppTests.py.
Signed-off-by: Mats Wichmann <mats@linux.com>
-rw-r--r-- | SCons/cppTests.py | 3 | ||||
-rw-r--r-- | test/Libs/LIBS.py | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/SCons/cppTests.py b/SCons/cppTests.py index c19046c..99fa6cf 100644 --- a/SCons/cppTests.py +++ b/SCons/cppTests.py @@ -878,10 +878,9 @@ if __name__ == '__main__': for tclass in tclasses: names = unittest.getTestCaseNames(tclass, 'test_') try: - names = list(set(names)) + names = sorted(set(names)) except NameError: pass - names.sort() suite.addTests(list(map(tclass, names))) TestUnit.run(suite) diff --git a/test/Libs/LIBS.py b/test/Libs/LIBS.py index 5639228..04206ac 100644 --- a/test/Libs/LIBS.py +++ b/test/Libs/LIBS.py @@ -97,6 +97,7 @@ test.write('foo5.c', foo_contents) test.write('sl.c', """\ #include <stdio.h> + void sl(void) { @@ -105,7 +106,11 @@ sl(void) """) test.write('slprog.c', """\ +#include <stdlib.h> #include <stdio.h> + +void sl(void); + int main(int argc, char *argv[]) { |