File tree Expand file tree Collapse file tree
Runner/suites/Multimedia/GSTreamer
Audio/Audio_Record_Playback
Video/Video_Encode_Decode Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,7 +130,10 @@ for param in AUDIO_DURATION AUDIO_GST_DEBUG GST_DEBUG_LEVEL; do
130130done
131131
132132cleanup () {
133- pkill -x gst-launch-1.0 > /dev/null 2>&1 || true
133+ # Best-effort: try to kill only children first; fall back to name-based kill
134+ if ! pkill -P " $$ " -x gst-launch-1.0 > /dev/null 2>&1 ; then
135+ pkill -x gst-launch-1.0 > /dev/null 2>&1 || true
136+ fi
134137}
135138trap cleanup INT TERM EXIT
136139
@@ -358,6 +361,14 @@ run_playback_test() {
358361 return 1
359362 fi
360363
364+ # Check if file has minimum content (same threshold as recording: 1000 bytes)
365+ file_size=" $( gstreamer_file_size_bytes " $input_file " ) "
366+ if [ " $file_size " -le 1000 ]; then
367+ log_warn " $testname : SKIP - recorded file too small: $file_size bytes (recording likely failed)"
368+ skip_count=$(( skip_count + 1 ))
369+ return 1
370+ fi
371+
361372 test_log=" $OUTDIR /${testname} .log"
362373 : > " $test_log "
363374
@@ -503,6 +514,14 @@ run_playback_pulsesrc_test() {
503514 return 1
504515 fi
505516
517+ # Check if file has minimum content (same threshold as recording: 1000 bytes)
518+ file_size=" $( gstreamer_file_size_bytes " $input_file " ) "
519+ if [ " $file_size " -le 1000 ]; then
520+ log_warn " $testname : SKIP - recorded file too small: $file_size bytes (pulsesrc recording likely failed)"
521+ skip_count=$(( skip_count + 1 ))
522+ return 1
523+ fi
524+
506525 test_log=" $OUTDIR /${testname} .log"
507526 : > " $test_log "
508527
Original file line number Diff line number Diff line change @@ -111,7 +111,10 @@ for param in VIDEO_DURATION RUNTIMESEC VIDEO_FRAMERATE VIDEO_GST_DEBUG GST_DEBUG
111111done
112112
113113cleanup () {
114- pkill -x gst-launch-1.0 > /dev/null 2>&1 || true
114+ # Best-effort: try to kill only children first; fall back to name-based kill
115+ if ! pkill -P " $$ " -x gst-launch-1.0 > /dev/null 2>&1 ; then
116+ pkill -x gst-launch-1.0 > /dev/null 2>&1 || true
117+ fi
115118}
116119trap cleanup INT TERM EXIT
117120
You can’t perform that action at this time.
0 commit comments