diff options
3 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-check-the-return-value.patch b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-check-the-return-value.patch new file mode 100644 index 0000000000..96891c9ea7 --- /dev/null +++ b/meta-oe/recipes-support/libteam/libteam/0001-team_basic_test.py-check-the-return-value.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From e86a58271d7d0a3b9cd546251d2527e93898bdb8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
| 3 | Date: Tue, 21 Dec 2021 11:15:31 +0800 | ||
| 4 | Subject: [PATCH] team_basic_test.py: check the return value | ||
| 5 | |||
| 6 | Not only print the traceback like before, also check the | ||
| 7 | return value. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/jpirko/libteam/pull/63] | ||
| 10 | |||
| 11 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
| 12 | --- | ||
| 13 | scripts/team_basic_test.py | 8 +++++++- | ||
| 14 | 1 file changed, 7 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py | ||
| 17 | index 0b64af2..17588c7 100755 | ||
| 18 | --- a/scripts/team_basic_test.py | ||
| 19 | +++ b/scripts/team_basic_test.py | ||
| 20 | @@ -203,4 +203,10 @@ def main(): | ||
| 21 | btest.run() | ||
| 22 | |||
| 23 | if __name__ == "__main__": | ||
| 24 | - main() | ||
| 25 | + try: | ||
| 26 | + ret = main() | ||
| 27 | + except Exception as esc: | ||
| 28 | + ret = 1 | ||
| 29 | + import traceback | ||
| 30 | + traceback.print_exc() | ||
| 31 | + sys.exit(ret) | ||
| 32 | -- | ||
| 33 | 2.17.1 | ||
| 34 | |||
diff --git a/meta-oe/recipes-support/libteam/libteam/run-ptest b/meta-oe/recipes-support/libteam/libteam/run-ptest index b5c6f4ebb9..26f097d587 100644 --- a/meta-oe/recipes-support/libteam/libteam/run-ptest +++ b/meta-oe/recipes-support/libteam/libteam/run-ptest | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | python3 $(dirname $0)/team_basic_test.py | 3 | python3 $(dirname $0)/team_basic_test.py |
| 4 | if [ $? -eq 0 ] ; then | ||
| 5 | echo "PASS: libteam" | ||
| 6 | else | ||
| 7 | echo "FAIL: libteam" | ||
| 8 | fi | ||
diff --git a/meta-oe/recipes-support/libteam/libteam_1.31.bb b/meta-oe/recipes-support/libteam/libteam_1.31.bb index a3bed722e7..e43d3e0dae 100644 --- a/meta-oe/recipes-support/libteam/libteam_1.31.bb +++ b/meta-oe/recipes-support/libteam/libteam_1.31.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI = "git://github.com/jpirko/libteam;branch=master;protocol=https \ | |||
| 12 | file://0002-teamd-Re-adjust-include-header-order.patch \ | 12 | file://0002-teamd-Re-adjust-include-header-order.patch \ |
| 13 | file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \ | 13 | file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \ |
| 14 | file://0001-team_basic_test.py-switch-to-python3.patch \ | 14 | file://0001-team_basic_test.py-switch-to-python3.patch \ |
| 15 | file://0001-team_basic_test.py-check-the-return-value.patch \ | ||
| 15 | file://run-ptest \ | 16 | file://run-ptest \ |
| 16 | " | 17 | " |
| 17 | SRCREV = "3ee12c6d569977cf1cd30d0da77807a07aa77158" | 18 | SRCREV = "3ee12c6d569977cf1cd30d0da77807a07aa77158" |
