diff options
author | Mats Wichmann <mats@linux.com> | 2021-06-30 07:18:56 -0600 |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-06-30 07:18:56 -0600 |
commit | af25bb2996719c72e61d11427684c1b0c26c7504 (patch) | |
tree | e8033c945253636ad2ce7d6d12c0fc16f99184d1 | |
parent | 73bba55b8acd9bfc38c757b1ae340712cefba874 (diff) | |
download | scons-git-af25bb2996719c72e61d11427684c1b0c26c7504.tar.gz |
[PR #3965] add TODO per review comment
Signed-off-by: Mats Wichmann <mats@linux.com>
-rwxr-xr-x | runtest.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/runtest.py b/runtest.py index a6e6d2057..52ceea469 100755 --- a/runtest.py +++ b/runtest.py @@ -157,6 +157,7 @@ if args.testlistfile: # args.testlistfile changes from a string to a pathlib Path object try: p = Path(args.testlistfile) + # TODO simplify when Py3.5 dropped if sys.version_info.major == 3 and sys.version_info.minor < 6: args.testlistfile = p.resolve() else: @@ -172,6 +173,7 @@ if args.excludelistfile: # args.excludelistfile changes from a string to a pathlib Path object try: p = Path(args.excludelistfile) + # TODO simplify when Py3.5 dropped if sys.version_info.major == 3 and sys.version_info.minor < 6: args.excludelistfile = p.resolve() else: @@ -564,21 +566,22 @@ def find_e2e_tests(directory): if 'sconstest.skip' in filenames: continue - p = Path(dirpath).joinpath(".exclude_tests") - try: + # Slurp in any tests in exclude lists + excludes = [] + if ".exclude_tests" in filenames: + p = Path(dirpath).joinpath(".exclude_tests") + # TODO simplify when Py3.5 dropped if sys.version_info.major == 3 and sys.version_info.minor < 6: excludefile = p.resolve() else: excludefile = p.resolve(strict=True) - except FileNotFoundError: - excludes = [] - else: with excludefile.open() as f: excludes = scanlist(f) for fname in filenames: if fname.endswith(".py") and fname not in excludes: result.append(os.path.join(dirpath, fname)) + return sorted(result) |