@@ -51,13 +51,27 @@ run_test() {
5151
5252 echo -e " ${YELLOW} ========================================${NC} "
5353
54+ # Check for error conditions first
55+ if grep -qi " rate limit" " $tmpfile " || \
56+ grep -q " ERROR:" " $tmpfile " || \
57+ grep -q " Max rate limit backoff reached" " $tmpfile " || \
58+ grep -q " APITimeoutError" " $tmpfile " || \
59+ grep -q " Exception:" " $tmpfile " ; then
60+ echo -e " ${RED} ✗ $name failed (error detected)${NC} "
61+ (( FAILED++ ))
62+ FAILED_TESTS+=(" $name " )
63+ rm " $tmpfile "
64+ return 1
65+ fi
66+
67+ # Check for successful start
5468 if grep -q " Running Task Flow" " $tmpfile " ; then
5569 echo -e " ${GREEN} ✓ $name passed${NC} "
5670 (( PASSED++ ))
5771 rm " $tmpfile "
5872 return 0
5973 else
60- echo -e " ${RED} ✗ $name failed${NC} "
74+ echo -e " ${RED} ✗ $name failed (did not start) ${NC} "
6175 (( FAILED++ ))
6276 FAILED_TESTS+=(" $name " )
6377 rm " $tmpfile "
@@ -94,7 +108,15 @@ echo -e "${YELLOW}========================================${NC}"
94108tmpfile=$( mktemp)
95109timeout 30 python -m seclab_taskflow_agent -t examples.taskflows.example_reusable_taskflows 2>&1 | tee " $tmpfile " || true
96110echo -e " ${YELLOW} ========================================${NC} "
97- if grep -q " Running Task Flow" " $tmpfile " ; then
111+
112+ # Check for errors first
113+ if grep -qi " rate limit" " $tmpfile " || \
114+ grep -q " Max rate limit backoff reached" " $tmpfile " || \
115+ grep -q " APITimeoutError" " $tmpfile " ; then
116+ echo -e " ${RED} ✗ example_reusable_taskflows failed (error detected)${NC} "
117+ (( FAILED++ ))
118+ FAILED_TESTS+=(" example_reusable_taskflows" )
119+ elif grep -q " Running Task Flow" " $tmpfile " ; then
98120 echo -e " ${GREEN} ✓ example_reusable_taskflows YAML loaded correctly${NC} "
99121 (( PASSED++ ))
100122else
0 commit comments