diff options
author | Will Korteland <will.korteland@mongodb.com> | 2022-03-17 09:57:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-17 10:24:10 +0000 |
commit | 7bee757376a4633e1ccf9bdccdf9fc214cb4a421 (patch) | |
tree | 39f799c9b98db52fcad855a7b5e966ea341d5b63 | |
parent | 78134885f2e555c671f61f5952ba12dd17ce64c7 (diff) | |
download | mongo-7bee757376a4633e1ccf9bdccdf9fc214cb4a421.tar.gz |
Import wiredtiger: 89550147760280fcc5271308f6edb3f767aacb0e from branch mongodb-master
ref: 324fdee42e..8955014776
for: 6.0.0
WT-8948 Empty test_*.py files cause test discovery to crash
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/test/suite/run.py | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 48ca57a0f18..ac123651642 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "324fdee42e1e5a99c274fc2e552c007aa786c523" + "commit": "89550147760280fcc5271308f6edb3f767aacb0e" } diff --git a/src/third_party/wiredtiger/test/suite/run.py b/src/third_party/wiredtiger/test/suite/run.py index 1e63fbd14d5..dee8b0a49fc 100755 --- a/src/third_party/wiredtiger/test/suite/run.py +++ b/src/third_party/wiredtiger/test/suite/run.py @@ -578,6 +578,20 @@ if __name__ == '__main__': sys.exit(2) from discover import defaultTestLoader as loader suites = loader.discover(suitedir) + + # If you have an empty Python file, it comes back as an empty entry in suites + # and then the sort explodes. Drop empty entries first. Note: this converts + # suites to a list, but the sort does that anyway. Also note: there seems to be + # no way to count other than iteration; there's a count method but it also + # returns zero for test files that contain a test class with no test functions, + # and it's not clear that dropping those here is correct. + def isempty(s): + count = 0 + for c in s: + count += 1 + return (count == 0) + suites = [s for s in suites if not isempty(s)] + suites = sorted(suites, key=lambda c: str(list(c)[0])) if configfile != None: suites = configApply(suites, configfile, configwrite) |