summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2023-10-25 12:41:33 -0400
committerSteve Sakoman <steve@sakoman.com>2023-11-24 05:01:37 -1000
commit5f1c17d70cb6f4c16218827070e3d940d530c28c (patch)
tree75e64e3e78f566117c9563f70c16b54c987130d2
parent3f4011aba42814dfd9c019c7140364553c08231e (diff)
downloadpoky-5f1c17d70cb6f4c16218827070e3d940d530c28c.tar.gz
patchtest/selftest: add XSKIP, update test files
Since we are skipping the merge test, two of the selftests now report SKIP instead of XPASS/XFAIL as expected. Adjust the two files to have the right endings for XSKIP, and add the category so that it can be used for more extensive testing in the future. (From OE-Core rev: a354265065516ec634042ea8210f97aaba7ff43c) Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3331f53c0be2575784a042bb2401eeba4f2a5a3e) Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip (renamed from meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass)0
-rw-r--r--meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip (renamed from meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail)0
-rwxr-xr-xmeta/lib/patchtest/selftest/selftest11
3 files changed, 8 insertions, 3 deletions
diff --git a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip
index 2a72457878..2a72457878 100644
--- a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.pass
+++ b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.1.skip
diff --git a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip
index 49bd1f8ede..49bd1f8ede 100644
--- a/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.fail
+++ b/meta/lib/patchtest/selftest/files/Merge.test_series_merge_on_head.2.skip
diff --git a/meta/lib/patchtest/selftest/selftest b/meta/lib/patchtest/selftest/selftest
index 006d1badf8..6fad50ce61 100755
--- a/meta/lib/patchtest/selftest/selftest
+++ b/meta/lib/patchtest/selftest/selftest
@@ -18,14 +18,15 @@ parentdir = os.path.dirname(topdir)
18# path to the repo root 18# path to the repo root
19repodir = os.path.dirname(os.path.dirname(parentdir)) 19repodir = os.path.dirname(os.path.dirname(parentdir))
20 20
21def print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount): 21def print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount):
22 total = passcount + skipcount + failcount + xpasscount + xfailcount + errorcount 22 total = passcount + skipcount + failcount + xpasscount + xfailcount + xskipcount + errorcount
23 print("============================================================================") 23 print("============================================================================")
24 print("Testsuite summary for %s" % os.path.basename(topdir)) 24 print("Testsuite summary for %s" % os.path.basename(topdir))
25 print("============================================================================") 25 print("============================================================================")
26 print("# TOTAL: %s" % str(total)) 26 print("# TOTAL: %s" % str(total))
27 print("# XPASS: %s" % str(xpasscount)) 27 print("# XPASS: %s" % str(xpasscount))
28 print("# XFAIL: %s" % str(xfailcount)) 28 print("# XFAIL: %s" % str(xfailcount))
29 print("# XSKIP: %s" % str(xskipcount))
29 print("# PASS: %s" % str(passcount)) 30 print("# PASS: %s" % str(passcount))
30 print("# FAIL: %s" % str(failcount)) 31 print("# FAIL: %s" % str(failcount))
31 print("# SKIP: %s" % str(skipcount)) 32 print("# SKIP: %s" % str(skipcount))
@@ -48,6 +49,7 @@ if __name__ == '__main__':
48 skipcount = 0 49 skipcount = 0
49 xpasscount = 0 50 xpasscount = 0
50 xfailcount = 0 51 xfailcount = 0
52 xskipcount = 0
51 errorcount = 0 53 errorcount = 0
52 54
53 results = None 55 results = None
@@ -71,6 +73,9 @@ if __name__ == '__main__':
71 elif expected_result.upper() == "PASS" and result.upper() == "PASS": 73 elif expected_result.upper() == "PASS" and result.upper() == "PASS":
72 xpasscount = xpasscount + 1 74 xpasscount = xpasscount + 1
73 print("XPASS: %s (file: %s)" % (testid.strip("."), os.path.basename(patch))) 75 print("XPASS: %s (file: %s)" % (testid.strip("."), os.path.basename(patch)))
76 elif expected_result.upper() == "SKIP" and result.upper() == "SKIP":
77 xskipcount = xskipcount + 1
78 print("XSKIP: %s (file: %s)" % (testid.strip("."), os.path.basename(patch)))
74 else: 79 else:
75 print("%s: %s (%s)" % (result.upper(), testid.strip("."), os.path.basename(patch))) 80 print("%s: %s (%s)" % (result.upper(), testid.strip("."), os.path.basename(patch)))
76 if result.upper() == "PASS": 81 if result.upper() == "PASS":
@@ -86,4 +91,4 @@ if __name__ == '__main__':
86 else: 91 else:
87 print ("No test for=%s" % patch) 92 print ("No test for=%s" % patch)
88 93
89 print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount) 94 print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount)