8484# check if the numad daemon is running
8585numad_grep_output=` ps -ef | grep numad | grep -v grep`
8686if [[ " ${numad_grep_output} " != " " ]]; then
87- echo " *********************************************************************"
88- echo " *** DANGER, DANGER, 'numad' appears to be running on this computer!"
89- echo " *** 'ps' output: ${numad_grep_output} "
90- echo " *** <ctrl-c> now if you want to abort this testing."
91- echo " *********************************************************************"
92- sleep 3
87+ echo " *********************************************************************"
88+ echo " *** DANGER, DANGER, 'numad' appears to be running on this computer!"
89+ echo " *** 'ps' output: ${numad_grep_output} "
90+ echo " *** <ctrl-c> now if you want to abort this testing."
91+ echo " *********************************************************************"
92+ sleep 3
9393fi
9494
9595# other setup
@@ -114,54 +114,52 @@ let total_number_of_tests=${number_of_individual_tests}*${individual_test_reques
114114let overall_test_index=0 # this is only used for user feedback
115115let full_set_loop_count=0
116116while [[ ${full_set_loop_count} -lt ${full_set_requested_interations} ]]; do
117- let test_index=0
118- for TEST_NAME in ${integtest_list[@]} ; do
119- if [[ ${test_index} -ge ${first_test_index} && ${test_index} -le ${last_test_index} ]]; then
120- requested_test=` echo ${TEST_NAME} | egrep -i ${requested_test_names:- ${TEST_NAME} } `
121- if [[ " ${requested_test} " != " " ]]; then
122-
123- let individual_loop_count=0
124- while [[ ${individual_loop_count} -lt ${individual_test_requested_iterations} ]]; do
125- let overall_test_index=${overall_test_index} +1
126- echo " "
127- echo -e " \U0001F535 \033[0;34mStarting test ${overall_test_index} of ${total_number_of_tests} ...\033[0m \U0001F535" | tee -a ${ITGRUNNER_LOG_FILE}
128-
129- echo -e " \u2B95 \033[0;1mRunning ${TEST_NAME} \033[0m \u2B05" | tee -a ${ITGRUNNER_LOG_FILE}
130- if [[ -e " ./${TEST_NAME} " ]]; then
131- pytest -s ./${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
132- elif [[ -e " ${DBT_AREA_ROOT} /sourcecode/dfmodules/integtest/${TEST_NAME} " ]]; then
133- if [[ -w " ${DBT_AREA_ROOT} " ]]; then
134- pytest -s ${DBT_AREA_ROOT} /sourcecode/dfmodules/integtest/${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
135- else
136- pytest -s -p no:cacheprovider ${DBT_AREA_ROOT} /sourcecode/dfmodules/integtest/${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
137- fi
138- else
139- pytest -s -p no:cacheprovider ${DFMODULES_SHARE} /integtest/${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
140- fi
141- let pytest_return_code=${PIPESTATUS[0]}
142-
143- let individual_loop_count=${individual_loop_count} +1
144-
145- if [[ ${stop_on_failure} -gt 0 ]]; then
146- if [[ ${pytest_return_code} -ne 0 ]]; then
147- break 3
148- fi
149- fi
150- if [[ ${stop_on_skip} -gt 0 ]]; then
151- search_result=` tail -20 ${ITGRUNNER_LOG_FILE} | grep -i skip`
152- # echo "skip search result is ${search_result}"
153- if [[ ${search_result} != " " ]]; then
154- break 3
117+ let test_index=0
118+ for TEST_NAME in ${integtest_list[@]} ; do
119+ if [[ ${test_index} -ge ${first_test_index} && ${test_index} -le ${last_test_index} ]]; then
120+ requested_test=` echo ${TEST_NAME} | egrep -i ${requested_test_names:- ${TEST_NAME} } `
121+ if [[ " ${requested_test} " != " " ]]; then
122+ let individual_loop_count=0
123+ while [[ ${individual_loop_count} -lt ${individual_test_requested_iterations} ]]; do
124+ let overall_test_index=${overall_test_index} +1
125+ echo " "
126+ echo -e " \U0001F535 \033[0;34mStarting test ${overall_test_index} of ${total_number_of_tests} ...\033[0m \U0001F535" | tee -a ${ITGRUNNER_LOG_FILE}
127+
128+ echo -e " \u2B95 \033[0;1mRunning ${TEST_NAME} \033[0m \u2B05" | tee -a ${ITGRUNNER_LOG_FILE}
129+ if [[ -e " ./${TEST_NAME} " ]]; then
130+ pytest -s ./${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
131+ elif [[ -e " ${DBT_AREA_ROOT} /sourcecode/dfmodules/integtest/${TEST_NAME} " ]]; then
132+ if [[ -w " ${DBT_AREA_ROOT} " ]]; then
133+ pytest -s ${DBT_AREA_ROOT} /sourcecode/dfmodules/integtest/${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
134+ else
135+ pytest -s -p no:cacheprovider ${DBT_AREA_ROOT} /sourcecode/dfmodules/integtest/${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
136+ fi
137+ else
138+ pytest -s -p no:cacheprovider ${DFMODULES_SHARE} /integtest/${TEST_NAME} | tee -a ${ITGRUNNER_LOG_FILE}
139+ fi
140+ let pytest_return_code=${PIPESTATUS[0]}
141+
142+ let individual_loop_count=${individual_loop_count} +1
143+
144+ if [[ ${stop_on_failure} -gt 0 ]]; then
145+ if [[ ${pytest_return_code} -ne 0 ]]; then
146+ break 3
147+ fi
148+ fi
149+ if [[ ${stop_on_skip} -gt 0 ]]; then
150+ search_result=` tail -20 ${ITGRUNNER_LOG_FILE} | grep -i skip`
151+ # echo "skip search result is ${search_result}"
152+ if [[ ${search_result} != " " ]]; then
153+ break 3
154+ fi
155+ fi
156+ done
155157 fi
156158 fi
157- done
158-
159- fi
160- fi
161- let test_index=${test_index} +1
162- done
159+ let test_index=${test_index} +1
160+ done
163161
164- let full_set_loop_count=${full_set_loop_count} +1
162+ let full_set_loop_count=${full_set_loop_count} +1
165163done
166164
167165# print out summary information
@@ -179,13 +177,13 @@ egrep $'=====|\u2B95' ${ITGRUNNER_LOG_FILE} | egrep ' in |Running' | tee -a ${IT
179177# check again if the numad daemon is running
180178numad_grep_output=` ps -ef | grep numad | grep -v grep`
181179if [[ " ${numad_grep_output} " != " " ]]; then
182- echo " " | tee -a ${ITGRUNNER_LOG_FILE}
183- echo " ********************************************************************************" | tee -a ${ITGRUNNER_LOG_FILE}
184- echo " *** WARNING: 'numad' appears to be running on this computer!" | tee -a ${ITGRUNNER_LOG_FILE}
185- echo " *** 'ps' output: ${numad_grep_output} " | tee -a ${ITGRUNNER_LOG_FILE}
186- echo " *** This daemon can adversely affect the running of these tests, especially ones" | tee -a ${ITGRUNNER_LOG_FILE}
187- echo " *** that are resource intensive in the Readout Apps. This is because numad moves" | tee -a ${ITGRUNNER_LOG_FILE}
188- echo " *** processes (threads?) to different cores/numa nodes periodically, and that" | tee -a ${ITGRUNNER_LOG_FILE}
189- echo " *** context switch can disrupt the stable running of the DAQ processes." | tee -a ${ITGRUNNER_LOG_FILE}
190- echo " ********************************************************************************" | tee -a ${ITGRUNNER_LOG_FILE}
180+ echo " " | tee -a ${ITGRUNNER_LOG_FILE}
181+ echo " ********************************************************************************" | tee -a ${ITGRUNNER_LOG_FILE}
182+ echo " *** WARNING: 'numad' appears to be running on this computer!" | tee -a ${ITGRUNNER_LOG_FILE}
183+ echo " *** 'ps' output: ${numad_grep_output} " | tee -a ${ITGRUNNER_LOG_FILE}
184+ echo " *** This daemon can adversely affect the running of these tests, especially ones" | tee -a ${ITGRUNNER_LOG_FILE}
185+ echo " *** that are resource intensive in the Readout Apps. This is because numad moves" | tee -a ${ITGRUNNER_LOG_FILE}
186+ echo " *** processes (threads?) to different cores/numa nodes periodically, and that" | tee -a ${ITGRUNNER_LOG_FILE}
187+ echo " *** context switch can disrupt the stable running of the DAQ processes." | tee -a ${ITGRUNNER_LOG_FILE}
188+ echo " ********************************************************************************" | tee -a ${ITGRUNNER_LOG_FILE}
191189fi
0 commit comments