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-20 08:40:39 -1000
commita354265065516ec634042ea8210f97aaba7ff43c (patch)
tree25d9c008b61fcfd5877bf2cfcd50464b949e847c
parent8e7e39134df926203b7bdfad22916e0d5da0589d (diff)
downloadopenembedded-core-a354265065516ec634042ea8210f97aaba7ff43c.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. 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)
# path to the repo root
repodir = os.path.dirname(os.path.dirname(parentdir))
-def print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount):
- total = passcount + skipcount + failcount + xpasscount + xfailcount + errorcount
+def print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount):
+ total = passcount + skipcount + failcount + xpasscount + xfailcount + xskipcount + errorcount
print("============================================================================")
print("Testsuite summary for %s" % os.path.basename(topdir))
print("============================================================================")
print("# TOTAL: %s" % str(total))
print("# XPASS: %s" % str(xpasscount))
print("# XFAIL: %s" % str(xfailcount))
+ print("# XSKIP: %s" % str(xskipcount))
print("# PASS: %s" % str(passcount))
print("# FAIL: %s" % str(failcount))
print("# SKIP: %s" % str(skipcount))
@@ -48,6 +49,7 @@ if __name__ == '__main__':
skipcount = 0
xpasscount = 0
xfailcount = 0
+ xskipcount = 0
errorcount = 0
results = None
@@ -71,6 +73,9 @@ if __name__ == '__main__':
elif expected_result.upper() == "PASS" and result.upper() == "PASS":
xpasscount = xpasscount + 1
print("XPASS: %s (file: %s)" % (testid.strip("."), os.path.basename(patch)))
+ elif expected_result.upper() == "SKIP" and result.upper() == "SKIP":
+ xskipcount = xskipcount + 1
+ print("XSKIP: %s (file: %s)" % (testid.strip("."), os.path.basename(patch)))
else:
print("%s: %s (%s)" % (result.upper(), testid.strip("."), os.path.basename(patch)))
if result.upper() == "PASS":
@@ -86,4 +91,4 @@ if __name__ == '__main__':
else:
print ("No test for=%s" % patch)
- print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount)
+ print_results(passcount, failcount, skipcount, xpasscount, xfailcount, xskipcount, errorcount)