build-perf-test: improve handling of test case failures
cover build-perf-test: improve handling of test case failures
This patchset makes build-perf-test wrapper script behave more reasonably if some build perf test cases fail. Previously, there was no distinction between failed test cases or more serious errors, e.g. runtime failures of oe-build-perf-test itself. In both cases the wrapper script just exited prematurely with an error. This patch makes the wrapper script to "tolerate" test case failures, allowing it to display and archive the results even in their presence.
Markus Lehtonen (2):
oe-build-perf-test: return 2 if some tests failed build-perf-test-wrapper.sh: accept test case failures
scripts/contrib/build-perf-test-wrapper.sh | 23 ++++++++++++++--------- scripts/oe-build-perf-test | 2 +- 2 files changed, 15 insertions(+), 10 deletions(-)
Signature · 1 line
2.6.6
PATCH 1/2 oe-build-perf-test: return 2 if some tests failed
Add a new return value '2' that indicates that some tests failed but there were no fatal errors (i.e. configuration mistakes or bugs in the tests themselves).
--- scripts/oe-build-perf-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/oe-build-perf-test +1 -1
@@ -203,7 +203,7 @@ def main(argv=None): if result.wasSuccessful(): return 0 - return 1 + return 2 if __name__ == '__main__':
Signature · 1 line
2.6.6
PATCH 2/2 build-perf-test-wrapper.sh: accept test case failures
In reply to Markus LehtonenUtilize the new return value (2) from oe-build-perf-test. Do not exit with an error in case some individual tests fail. Even if some tests fail we still want to complete successfully, that is, display and archive the results and do cleanup. The individual tests do not depend on each other anymore so test failures shouldn't affect the results of successful tests.
--- scripts/contrib/build-perf-test-wrapper.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
scripts/contrib/build-perf-test-wrapper.sh +14 -9
@@ -117,15 +117,20 @@ if [ -f "$base_dir/auto.conf.extra" ]; then fi # Run actual test script -if ! oe-build-perf-test --out-dir "$results_dir" \ - --globalres-file "$globalres_log" \ - --lock-file "$base_dir/oe-build-perf.lock" \ - "${commit_results[@]}" \ - --commit-results-branch "{tester_host}/{git_branch}/$machine" \ - --commit-results-tag "{tester_host}/{git_branch}/$machine/{git_commit_count}-g{git_commit}/{tag_num}"; then - echo "oe-build-perf-test script failed!" - exit 1 -fi +oe-build-perf-test --out-dir "$results_dir" \ + --globalres-file "$globalres_log" \ + --lock-file "$base_dir/oe-build-perf.lock" \ + "${commit_results[@]}" \ + --commit-results-branch "{tester_host}/{git_branch}/$machine" \ + --commit-results-tag "{tester_host}/{git_branch}/$machine/{git_commit_count}-g{git_commit}/{tag_num}" + +case $? in + 1) echo "ERROR: oe-build-perf-test script failed!" + exit 1 + ;; + 2) echo "NOTE: some tests failed!" + ;; +esac echo -ne "\n\n-----------------\n" echo "Global results file:"
Signature · 1 line
2.6.6