[Intel-gfx] [PATCH intel-gpu-tools 3/3] drm-lib: Skip test when not running on i915
Micah Fedke
micah.fedke at collabora.co.uk
Tue Apr 21 08:03:49 PDT 2015
From: Daniel Stone <daniels at collabora.com>
Since drm_lib.sh tries to access the i915 debugfs path, skip the test if
we find that we have GPUs in debugfs, but none of them are i915.
Signed-off-by: Daniel Stone <daniels at collabora.com>
---
tests/drm_lib.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/drm_lib.sh b/tests/drm_lib.sh
index c50664c..c35287c 100755
--- a/tests/drm_lib.sh
+++ b/tests/drm_lib.sh
@@ -46,14 +46,23 @@ if [ -d /sys/kernel/debug/dri ] ; then
fi
i915_dfs_path=x
+found_any=0
for minor in `seq 0 16`; do
if [ -f $debugfs_path/$minor/i915_error_state ] ; then
i915_dfs_path=$debugfs_path/$minor
break
fi
+ if [ -f $debugfs_path/$minor/name ] ; then
+ found_any=1
+ fi
done
if [ $i915_dfs_path = "x" ] ; then
+ # Found DRM devices in debugfs but not i915; skip the test.
+ if [ $found_any = 1 ]; then
+ exit 77
+ fi
+
die " i915 debugfs path not found."
fi
--
2.3.5
More information about the Intel-gfx
mailing list