mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 20:07:25 +00:00
libteam: improve the ptest output
There is no PASS or FAIL related status report before, so improve the ptest output to print the status. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
|||||||
|
From e86a58271d7d0a3b9cd546251d2527e93898bdb8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Mingli Yu <mingli.yu@windriver.com>
|
||||||
|
Date: Tue, 21 Dec 2021 11:15:31 +0800
|
||||||
|
Subject: [PATCH] team_basic_test.py: check the return value
|
||||||
|
|
||||||
|
Not only print the traceback like before, also check the
|
||||||
|
return value.
|
||||||
|
|
||||||
|
Upstream-Status: Submitted [https://github.com/jpirko/libteam/pull/63]
|
||||||
|
|
||||||
|
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||||
|
---
|
||||||
|
scripts/team_basic_test.py | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/scripts/team_basic_test.py b/scripts/team_basic_test.py
|
||||||
|
index 0b64af2..17588c7 100755
|
||||||
|
--- a/scripts/team_basic_test.py
|
||||||
|
+++ b/scripts/team_basic_test.py
|
||||||
|
@@ -203,4 +203,10 @@ def main():
|
||||||
|
btest.run()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
- main()
|
||||||
|
+ try:
|
||||||
|
+ ret = main()
|
||||||
|
+ except Exception as esc:
|
||||||
|
+ ret = 1
|
||||||
|
+ import traceback
|
||||||
|
+ traceback.print_exc()
|
||||||
|
+ sys.exit(ret)
|
||||||
|
--
|
||||||
|
2.17.1
|
||||||
|
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
python3 $(dirname $0)/team_basic_test.py
|
python3 $(dirname $0)/team_basic_test.py
|
||||||
|
if [ $? -eq 0 ] ; then
|
||||||
|
echo "PASS: libteam"
|
||||||
|
else
|
||||||
|
echo "FAIL: libteam"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/jpirko/libteam;branch=master;protocol=https \
|
|||||||
file://0002-teamd-Re-adjust-include-header-order.patch \
|
file://0002-teamd-Re-adjust-include-header-order.patch \
|
||||||
file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
|
file://0001-team_basic_test.py-disable-RedHat-specific-test.patch \
|
||||||
file://0001-team_basic_test.py-switch-to-python3.patch \
|
file://0001-team_basic_test.py-switch-to-python3.patch \
|
||||||
|
file://0001-team_basic_test.py-check-the-return-value.patch \
|
||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
"
|
"
|
||||||
SRCREV = "3ee12c6d569977cf1cd30d0da77807a07aa77158"
|
SRCREV = "3ee12c6d569977cf1cd30d0da77807a07aa77158"
|
||||||
|
|||||||
Reference in New Issue
Block a user