[ACT][PATCH] UBUNTU: SAUCE: ubuntu_bpf: stop the test when the build fails
Po-Hsu Lin
po-hsu.lin at canonical.com
Mon Aug 2 05:18:00 UTC 2021
BugLink: https://bugs.launchpad.net/bugs/1938663
If the setup job in ubuntu_bpf has failed, it should be stopped at
this point. Otherwise it will try to run the test_verifier and
test_maps sub-tests. These two will try to build the test again and
fail with the same reason.
By doing so we can shorten the time and simplify the hinting task,
there will be just one setup test case in the result page, which will
be the only thing we need to hint.
Tested on a KVM ndoe with OEM kernel and this works as expected.
Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.com>
---
ubuntu_bpf/control | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/ubuntu_bpf/control b/ubuntu_bpf/control
index d397f1bc..798d7f28 100644
--- a/ubuntu_bpf/control
+++ b/ubuntu_bpf/control
@@ -11,10 +11,13 @@ TEST_TYPE = "client"
DOC = ""
name = 'ubuntu_bpf'
-tests = ['setup', 'test_verifier', 'test_maps']
-
-for test in tests:
- results = job.run_test_detail(name, test_name=test, tag=test, timeout=60*30)
+results = job.run_test_detail(name, test_name='setup', tag='setup', timeout=60*30)
+if results == 'ERROR':
+ print("ERROR: test failed to build, skipping all the sub tests")
+else:
+ tests = ['test_verifier', 'test_maps']
+ for test in tests:
+ results = job.run_test_detail(name, test_name=test, tag=test, timeout=60*30)
# vi:set ts=4 sw=4 expandtab syntax=python:
--
2.25.1
More information about the kernel-team
mailing list