File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ failed_version() {
26
26
27
27
analyze_logs_by_logdetective () {
28
28
# logdetective should not break the test functionality
29
+ # Therefore `set +e` is setup
29
30
set +e
30
31
local log_file_name=" $1 "
31
32
echo " Sending failed log by fpaste command to paste bin."
@@ -46,21 +47,25 @@ analyze_logs_by_logdetective() {
46
47
echo " ERROR: Failed to analyze log file by logdetective server."
47
48
cat " ${logdetective_test_file} "
48
49
echo " -------- LOGDETECTIVE TEST LOG ANALYSIS FAILED --------"
50
+ # Let's switch it back
49
51
set -e
50
52
return
51
53
fi
52
- set -e
53
54
jq -rC ' .explanation.text' < " ${logdetective_test_file} "
54
55
# This part of code is from https://github.com/teemtee/tmt/blob/main/tmt/steps/scripts/tmt-file-submit
55
56
if [ -z " $TMT_TEST_PIDFILE " ]; then
56
57
echo " File submit to data dir can be used only in the context of a running test."
58
+ # Let's switch it back
59
+ set -e
57
60
return
58
61
fi
59
62
# This variable is set by tmt
60
63
[ -d " $TMT_TEST_DATA " ] || mkdir -p " $TMT_TEST_DATA "
61
64
cp -f " ${logdetective_test_file} " " $TMT_TEST_DATA "
62
65
echo " File '${logdetective_test_file} ' stored to '$TMT_TEST_DATA '."
63
66
echo " -------- LOGDETECTIVE TEST LOG ANALYSIS FINISHED --------"
67
+ # Let's switch it back
68
+ set -e
64
69
}
65
70
66
71
# This adds backwards compatibility if only single version needs to be testing
You can’t perform that action at this time.
0 commit comments