File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,18 +28,28 @@ echo ""
2828for i in $( seq 1 " $ITERATIONS " ) ; do
2929 # Run only the explain sqllogictest file.
3030 # The -- explain argument matches files whose path contains "explain".
31- if cargo test \
32- --quiet \
31+ # Capture both stdout and stderr; use the exit code of cargo test directly.
32+ output= $( cargo test \
3333 --manifest-path " $REPO_ROOT /Cargo.toml" \
3434 -p datafusion-sqllogictest \
3535 --test sqllogictests \
3636 -- explain \
37- 2>&1 | grep -q " test result: ok" ; then
37+ 2>&1 ) && cargo_exit=0 || cargo_exit=$?
38+
39+ if [[ $cargo_exit -eq 0 ]]; then
3840 STATUS=" PASS"
3941 PASS=$(( PASS + 1 ))
4042 else
4143 STATUS=" FAIL"
4244 FAIL=$(( FAIL + 1 ))
45+ # Show the failure detail on the first failure for quick diagnosis
46+ if [[ $FAIL -eq 1 ]]; then
47+ echo " "
48+ echo " --- First failure output ---"
49+ echo " $output " | tail -40
50+ echo " ----------------------------"
51+ echo " "
52+ fi
4353 fi
4454
4555 RESULTS+=(" Run $i : $STATUS " )
You can’t perform that action at this time.
0 commit comments