Skip to content

Commit b249c28

Browse files
committed
pw: support and use pending states
Russell complains that we flag contest as failing when 99% of the time it's not his changes that caused it. Maintainers report contest failures manually. Support reporting pending in NIPA core and use it from contest. Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2a62819 commit b249c28

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

core/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def write_result(self, result_dir, retcode=0, out="", err="", desc=""):
7171
fp.write("==========\n")
7272
if retcode == 0:
7373
fp.write("%s - OKAY\n" % (self.name, ))
74+
elif retcode == 111:
75+
fp.write("%s - PENDING\n" % (self.name, ))
7476
elif retcode == 250:
7577
fp.write("%s - WARNING\n" % (self.name, ))
7678
else:

pw_contest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class Codes:
5959
Codes.PENDING: PatchworkCheckState.PENDING,
6060
2: PatchworkCheckState.WARNING,
6161
3: PatchworkCheckState.WARNING,
62-
4: PatchworkCheckState.FAIL,
62+
4: PatchworkCheckState.PENDING,
6363
}
6464

6565

pw_upload.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def __init__(self, test_name: str, root_dir: str, url: str):
4242
retcode = f.read()
4343
if retcode == "0":
4444
self.state = PatchworkCheckState.SUCCESS
45+
elif retcode == "111":
46+
self.state = PatchworkCheckState.PENDING
4547
elif retcode == "250":
4648
self.state = PatchworkCheckState.WARNING
4749
else:

0 commit comments

Comments
 (0)