Skip to content

Commit 3147945

Browse files
authored
Merge pull request #312 from smuppand/graphics
Fix weston-simple-egl overlay detection for Adreno GLVND vendor JSON
2 parents af4a762 + 5c88871 commit 3147945

1 file changed

Lines changed: 19 additions & 11 deletions

File tree

  • Runner/suites/Multimedia/Graphics/weston-simple-egl

Runner/suites/Multimedia/Graphics/weston-simple-egl/run.sh

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,38 @@ EXPECT_FPS="${EXPECT_FPS:-60}"
5656
FPS_TOL_PCT="${FPS_TOL_PCT:-10}"
5757
REQUIRE_FPS="${REQUIRE_FPS:-1}"
5858

59-
# Detect overlay by presence of any *EGL_adreno.json (e.g., 10_EGL_adreno.json)
59+
# Detect overlay by presence of Adreno GLVND vendor JSON
6060
BUILD_FLAVOUR="base"
6161
EGL_VENDOR_JSON=""
62-
for f in /usr/share/glvnd/egl_vendor.d/*EGL_adreno.json; do
63-
if [ -f "$f" ]; then
64-
EGL_VENDOR_JSON="$f"
65-
BUILD_FLAVOUR="overlay"
66-
break
67-
fi
62+
63+
# Check common vendor JSON locations and filename patterns
64+
for d in /usr/share/glvnd/egl_vendor.d /etc/glvnd/egl_vendor.d; do
65+
[ -d "$d" ] || continue
66+
67+
# Try both naming styles: 10_adreno.json and 10_EGL_adreno.json
68+
for f in "$d"/*adreno*.json "$d"/*EGL_adreno*.json; do
69+
[ -e "$f" ] || continue
70+
if [ -f "$f" ]; then
71+
EGL_VENDOR_JSON="$f"
72+
BUILD_FLAVOUR="overlay"
73+
break 2
74+
fi
75+
done
6876
done
69-
77+
7078
log_info "Weston log directory: $SCRIPT_DIR"
7179
log_info "--------------------------------------------------------------------------"
7280
log_info "------------------- Starting ${TESTNAME} Testcase --------------------------"
73-
81+
7482
# Optional platform details (helper from functestlib)
7583
if command -v detect_platform >/dev/null 2>&1; then
7684
detect_platform
7785
fi
78-
86+
7987
if [ "$BUILD_FLAVOUR" = "overlay" ]; then
8088
log_info "Build flavor: overlay (EGL vendor JSON present: ${EGL_VENDOR_JSON})"
8189
else
82-
log_info "Build flavor: base (no *EGL_adreno.json overlay)"
90+
log_info "Build flavor: base (no Adreno EGL vendor JSON found)"
8391
fi
8492

8593
log_info "Config: DURATION=${DURATION} STOP_GRACE=${STOP_GRACE} EXPECT_FPS=${EXPECT_FPS}+/-${FPS_TOL_PCT}% REQUIRE_FPS=${REQUIRE_FPS} BUILD_FLAVOUR=${BUILD_FLAVOUR}"

0 commit comments

Comments
 (0)