sleep 3
wait_for_app crash-manager
+sleep 1
for TMPFILE in $TMP1 $TMP2; do
PATTERN="path=/Org/Tizen/System/Crash/Crash; interface=org\.tizen\.system\.crash\.Crash; member=ProcessCrashed"
fi
if [ "${TMPFILE}" = ${TMP1} ]; then
- if egrep -A1 "string \"sys.callstack_native_hash" $TMPFILE | egrep 'variant.*string \"57b32ee3a2bb53a816dd102657ca210d84b9b9ac9a765f811f8131011b40a2a9'; then
- score=$(($score + 1))
- fi
+ if egrep -A1 "string \"sys.callstack_native_hash" $TMPFILE | egrep 'variant.*string'; then
+ score=$(($score + 1))
+ fi
fi
if [ $score -eq ${MAX_SCORE} ]; then
trap cleanup 0
sleep 3
+wait_for_app crash-manager
+sleep 1
PATTERN='path=/Org/Tizen/System/Crash/Crash; interface=org\.tizen\.system\.crash\.Crash; member=ProcessCrashed'
-for i in $(seq 1 10); do
- score=0
- if egrep "$PATTERN" $TMPFILE; then
- if egrep "string \"kenny" $TMPFILE; then
- score=$(($score + 1))
- fi
-
- # legacy signal must not have the report_path and additional metadata
-
- if ! egrep "string \"/opt/usr/share/crash/dump.*kenny" $TMPFILE; then
- score=$(($score + 1))
- fi
-
- if ! egrep -A1 "string \"sys.signal" $TMPFILE; then
- score=$(($score + 1))
- fi
-
- if [ $score -eq 3 ]; then
- exit_ok
- fi
+score=0
+if egrep "$PATTERN" $TMPFILE; then
+ if egrep "string \"kenny" $TMPFILE; then
+ score=$(($score + 1))
fi
- sleep 1
-done
+ # legacy signal must not have the report_path and additional metadata
+
+ if ! egrep "string \"/opt/usr/share/crash/dump.*kenny" $TMPFILE; then
+ score=$(($score + 1))
+ fi
+
+ if ! egrep -A1 "string \"sys.signal" $TMPFILE; then
+ score=$(($score + 1))
+ fi
+
+ if [ $score -eq 3 ]; then
+ exit_ok
+ fi
+fi
fail "legacy dbus signal does not match"
YELLOW="\033[1;33m"
NORMAL="\033[0m"
TEST=${1}
+ test_result=0
echo -ne "${TEST}:\t"
echo "===================================" >> ${LOG_FILE}
echo "Test ${TEST}:" >> ${LOG_FILE}
${FAIL_CODE})
echo -e "${RED}FAIL${NORMAL}"
echo "FAIL" >> ${LOG_FILE}
+ test_result=1
;;
${SKIP_CODE})
echo -e "${YELLOW}SKIP${NORMAL}"
echo "SKIP" >> ${LOG_FILE}
;;
esac
+ return ${test_result}
}
if [ -f ${LOG_FILE} ]; then
rm ${LOG_FILE}
fi
+tests_result=0
for DIR in ${CRASH_WORKER_SYSTEM_TESTS}/*/; do
test_name=`basename ${DIR}`
if [ -x ${CRASH_WORKER_SYSTEM_TESTS}/${test_name}/${test_name}.sh ]; then
- run_test ${test_name}
+ if ! run_test ${test_name}; then
+ tests_result=1
+ fi
fi
done
+exit ${tests_result}