Skip to content

Commit bf17e92

Browse files
committed
Made changes to handle display and video sh scripts to follow sourcing as per repo standards
Signed-off-by: Nitin Nakka <nitinn@qti.qualcomm.com>
1 parent 2b50999 commit bf17e92

2 files changed

Lines changed: 32 additions & 10 deletions

File tree

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

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ mkdir -p "$OUTDIR" >/dev/null 2>&1 || true
2323
: >"$GST_LOG"
2424
: >"$RUN_LOG"
2525

26+
SCRIPT_DIR="$(
27+
cd "$(dirname "$0")" || exit 1
28+
pwd
29+
)"
30+
2631
INIT_ENV=""
2732
SEARCH="$SCRIPT_DIR"
2833
while [ "$SEARCH" != "/" ]; do
@@ -32,14 +37,20 @@ while [ "$SEARCH" != "/" ]; do
3237
fi
3338
SEARCH=$(dirname "$SEARCH")
3439
done
35-
36-
if [ -z "$INIT_ENV" ]; then
40+
41+
RES_FILE="$SCRIPT_DIR/${TESTNAME}.res"
42+
43+
if [ -z "${INIT_ENV:-}" ]; then
3744
echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2
45+
echo "$TESTNAME SKIP" >"$RES_FILE" 2>/dev/null || true
3846
exit 0
3947
fi
40-
41-
# shellcheck disable=SC1090
42-
. "$INIT_ENV"
48+
49+
if [ -z "${__INIT_ENV_LOADED:-}" ]; then
50+
# shellcheck disable=SC1090
51+
. "$INIT_ENV"
52+
__INIT_ENV_LOADED=1
53+
fi
4354

4455
# shellcheck disable=SC1091
4556
. "$TOOLS/functestlib.sh"

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

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ mkdir -p "$OUTDIR" "$DMESG_DIR" "$ENCODED_DIR" >/dev/null 2>&1 || true
2424
: >"$RES_FILE"
2525
: >"$GST_LOG"
2626

27+
SCRIPT_DIR="$(
28+
cd "$(dirname "$0")" || exit 1
29+
pwd
30+
)"
31+
2732
INIT_ENV=""
2833
SEARCH="$SCRIPT_DIR"
2934
while [ "$SEARCH" != "/" ]; do
@@ -33,14 +38,20 @@ while [ "$SEARCH" != "/" ]; do
3338
fi
3439
SEARCH=$(dirname "$SEARCH")
3540
done
36-
37-
if [ -z "$INIT_ENV" ]; then
41+
42+
RES_FILE="$SCRIPT_DIR/${TESTNAME}.res"
43+
44+
if [ -z "${INIT_ENV:-}" ]; then
3845
echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2
46+
echo "$TESTNAME SKIP" >"$RES_FILE" 2>/dev/null || true
3947
exit 0
4048
fi
41-
42-
# shellcheck disable=SC1090
43-
. "$INIT_ENV"
49+
50+
if [ -z "${__INIT_ENV_LOADED:-}" ]; then
51+
# shellcheck disable=SC1090
52+
. "$INIT_ENV"
53+
__INIT_ENV_LOADED=1
54+
fi
4455

4556
# shellcheck disable=SC1091
4657
. "$TOOLS/functestlib.sh"

0 commit comments

Comments
 (0)