Skip to content

Commit 903ad59

Browse files
committed
Added shellcheck disable=SC2317 for the cleanup function in all gst mm runner scripts, added help section and updated readme files for audio
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
1 parent 9d7004f commit 903ad59

4 files changed

Lines changed: 20 additions & 7 deletions

File tree

  • Runner/suites/Multimedia/GSTreamer

Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ At a high level, the test:
5858

5959
## Test Cases
6060

61-
By default, the test runs **8 test cases** with 10 second duration:
61+
By default, the test runs **10 test cases** with 10 second duration:
6262

6363
### ENCODE PHASE (4 tests)
6464

@@ -70,7 +70,7 @@ By default, the test runs **8 test cases** with 10 second duration:
7070
3. **record_pulsesrc_wav** - Record WAV format using pulsesrc → audioconvert → wavenc
7171
4. **record_pulsesrc_flac** - Record FLAC format using pulsesrc → audioconvert → flacenc
7272

73-
### DECODE PHASE (4 tests)
73+
### DECODE PHASE (6 tests)
7474

7575
#### Playback Tests - audiotestsrc recordings
7676
5. **playback_wav** - Playback WAV file using filesrc → wavparse → audioconvert → pulsesink
@@ -80,20 +80,28 @@ By default, the test runs **8 test cases** with 10 second duration:
8080
7. **playback_pulsesrc_wav** - Playback WAV file using filesrc → wavparse → audioconvert → pulsesink
8181
8. **playback_pulsesrc_flac** - Playback FLAC file using filesrc → flacparse → flacdec → pulsesink
8282

83-
**Total: 8 test cases** (4 encode + 4 decode)
83+
#### Playback Tests - External Test Files (OGG/MP3)
84+
9. **playback_sample_ogg** - Playback OGG file using filesrc → oggdemux → vorbisdec → pulsesink
85+
10. **playback_sample_mp3** - Playback MP3 file using filesrc → mpegaudioparse → mpg123audiodec → pulsesink
86+
87+
**Total: 10 test cases** (4 encode + 6 decode)
88+
89+
**Note:** OGG/MP3 playback tests require external test files (downloaded from URL or provided via `--clip-path`). If test files are not available, these tests will be skipped.
8490

8591
---
8692

8793
## PASS / FAIL / SKIP criteria
8894

8995
### PASS
9096
- **Recording**: Output file is created and has size > 1000 bytes
91-
- **Playback**: Pipeline completes successfully (exit code 0, 124, or 143)
97+
- **Playback**: Pipeline completes successfully with exit code 0 (clean completion)
98+
- **Note**: Timeout (exit code 124) or termination (exit code 143) are treated as **FAIL** for controlled-duration recordings
99+
- This ensures playback completed successfully rather than being interrupted
92100
- **Overall**: At least one test passes and no tests fail
93101

94102
### FAIL
95103
- **Recording**: No output file created or file size too small
96-
- **Playback**: Pipeline fails or GStreamer errors detected
104+
- **Playback**: Pipeline exits with non-zero code (including timeout 124 or termination 143) or GStreamer errors detected
97105
- **Overall**: One or more tests fail
98106

99107
### SKIP

Runner/suites/Multimedia/GSTreamer/Audio/Audio_Record_Playback/run.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ for param in AUDIO_DURATION AUDIO_GST_DEBUG GST_DEBUG_LEVEL; do
127127
fi
128128
done
129129

130+
# shellcheck disable=SC2317
130131
cleanup() {
131132
# Best-effort: try to kill only children first; fall back to name-based kill
132133
if ! pkill -P "$$" -x gst-launch-1.0 >/dev/null 2>&1; then
@@ -718,7 +719,7 @@ run_playback_ogg_mp3_test() {
718719
fi
719720

720721
# Check for successful completion
721-
if [ "$gstRc" -eq 0 ] || [ "$gstRc" -eq 124 ] || [ "$gstRc" -eq 143 ]; then
722+
if [ "$gstRc" -eq 0 ]; then
722723
log_pass "$testname: PASS"
723724
pass_count=$((pass_count + 1))
724725
return 0
@@ -769,9 +770,10 @@ provision_test_files() {
769770
log_warn "Test file download failed (offline or URL issue)"
770771
fi
771772
fi
773+
772774
fi
773775

774-
# Check what we have
776+
# Check what we have AFTER all provisioning attempts
775777
have_ogg=0
776778
have_mp3=0
777779

@@ -791,6 +793,7 @@ provision_test_files() {
791793
fi
792794
fi
793795

796+
# Only warn if BOTH files are missing after all attempts
794797
if [ "$have_ogg" -eq 0 ] && [ "$have_mp3" -eq 0 ]; then
795798
log_warn "No Test files (OGG/MP3) available for playback tests"
796799
fi

Runner/suites/Multimedia/GSTreamer/Display/Waylandsink_Playback/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ height="${VIDEO_HEIGHT:-1080}"
9292
framerate="${VIDEO_FRAMERATE:-30}"
9393
gstDebugLevel="${VIDEO_GST_DEBUG:-${GST_DEBUG_LEVEL:-2}}"
9494

95+
# shellcheck disable=SC2317
9596
cleanup() {
9697
# Best-effort: try to kill only children first; fall back to name-based kill
9798
if ! pkill -P "$$" -x gst-launch-1.0 >/dev/null 2>&1; then

Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ for param in VIDEO_DURATION RUNTIMESEC VIDEO_FRAMERATE VIDEO_GST_DEBUG GST_DEBUG
103103
fi
104104
done
105105

106+
# shellcheck disable=SC2317
106107
cleanup() {
107108
# Best-effort: try to kill only children first; fall back to name-based kill
108109
if ! pkill -P "$$" -x gst-launch-1.0 >/dev/null 2>&1; then

0 commit comments

Comments
 (0)