Skip to content

Commit c5c5318

Browse files
committed
gstreamer(video): use shared encoded artifact directory for decode inputs
Update Video_Encode_Decode to resolve encoded outputs through the shared GStreamer artifact directory helper instead of using the testcase-local logs path. This allows decode runs to locate files produced by earlier encode runs when LAVA executes encode and decode in separate testcase workspaces. Also log the resolved encoded artifact directory to improve traceability in CI and LAVA logs. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
1 parent 77db409 commit c5c5318

1 file changed

Lines changed: 20 additions & 5 deletions

File tree

  • Runner/suites/Multimedia/GSTreamer/Video/Video_Encode_Decode

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

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ LOG_DIR="${SCRIPT_DIR}/logs"
1818
OUTDIR="$LOG_DIR/$TESTNAME"
1919
GST_LOG="$OUTDIR/gst.log"
2020
DMESG_DIR="$OUTDIR/dmesg"
21-
ENCODED_DIR="$OUTDIR/encoded"
22-
23-
mkdir -p "$OUTDIR" "$DMESG_DIR" "$ENCODED_DIR" >/dev/null 2>&1 || true
24-
: >"$RES_FILE"
25-
: >"$GST_LOG"
2621

2722
INIT_ENV=""
2823
SEARCH="$SCRIPT_DIR"
@@ -55,6 +50,25 @@ fi
5550
# shellcheck disable=SC1091
5651
[ -f "$TOOLS/lib_video.sh" ] && . "$TOOLS/lib_video.sh"
5752

53+
# Use the shared encoded directory if supported; otherwise default to $OUTDIR/encoded.
54+
if command -v gstreamer_shared_encoded_dir >/dev/null 2>&1; then
55+
ENCODED_DIR="$(gstreamer_shared_encoded_dir "$SCRIPT_DIR" "$OUTDIR")"
56+
else
57+
ENCODED_DIR="$OUTDIR/encoded"
58+
fi
59+
60+
if ! mkdir -p "$OUTDIR" "$DMESG_DIR" "$ENCODED_DIR"; then
61+
log_error "Failed to create required directories:"
62+
log_error " OUTDIR=$OUTDIR"
63+
log_error " DMESG_DIR=$DMESG_DIR"
64+
log_error " ENCODED_DIR=$ENCODED_DIR"
65+
echo "$TESTNAME FAIL" >"$RES_FILE" 2>/dev/null || true
66+
exit 0
67+
fi
68+
69+
: >"$RES_FILE"
70+
: >"$GST_LOG"
71+
5872
result="FAIL"
5973
reason="unknown"
6074
pass_count=0
@@ -384,6 +398,7 @@ log_info "Resolutions: $resolutionList"
384398
log_info "Duration: ${duration}s, Framerate: ${framerate}fps"
385399
log_info "GST debug: GST_DEBUG=$gstDebugLevel"
386400
log_info "Logs: $OUTDIR"
401+
log_info "Encoded artifact dir: $ENCODED_DIR"
387402
log_info "VP9 clip URL: $clipUrl"
388403
if [ -n "$clipPath" ]; then
389404
log_info "VP9 clip local path: $clipPath"

0 commit comments

Comments
 (0)