diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-10-25 12:41:33 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-25 23:10:19 +0100 |
commit | 71bf3fcf0f529acc8c06962b29d7fe9f89707167 (patch) | |
tree | 746cca57dcce7adf374ac534b62717dc8ff437dc | |
parent | d1c21e9eea7b19cd8104680a0c9b9c1f8f1b6d7b (diff) | |
download | poky-71bf3fcf0f529acc8c06962b29d7fe9f89707167.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: 3331f53c0be2575784a042bb2401eeba4f2a5a3e)
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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-x | meta/lib/patchtest/selftest/selftest | 11 |
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 |
19 | repodir = os.path.dirname(os.path.dirname(parentdir)) | 19 | repodir = os.path.dirname(os.path.dirname(parentdir)) |
20 | 20 | ||
21 | def print_results(passcount, skipcount, failcount, xpasscount, xfailcount, errorcount): | 21 | def 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) |