diff options
-rw-r--r-- | tests/Makefile.am | 13 | ||||
-rwxr-xr-x | tests/debugfs_reader | 27 |
2 files changed, 36 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 288baae..27ee014 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ if HAVE_DRM noinst_PROGRAMS = \ gem_stress \ - $(TESTS) \ + $(TESTS_progs) \ $(HANG) \ $(NULL) @@ -14,7 +14,8 @@ gem_stress_SOURCES = \ gem_stress_gen6.c \ $(NULL) -TESTS = getversion \ +TESTS_progs = \ + getversion \ getclient \ getstats \ gem_basic \ @@ -55,13 +56,17 @@ TESTS = getversion \ gem_unref_active_buffers \ $(NULL) +TESTS = $(TESTS_progs) \ + debugfs_reader \ + $(NULL) + HANG = \ gem_bad_batch \ gem_hang \ gem_bad_blit \ $(NULL) -EXTRA_PROGRAMS = $(TESTS) $(HANG) +EXTRA_PROGRAMS = $(TESTS_progs) $(HANG) CLEANFILES = $(EXTRA_PROGRAMS) AM_CFLAGS = $(DRM_CFLAGS) $(WARN_CFLAGS) \ @@ -72,7 +77,7 @@ LDADD = ../lib/libintel_tools.la $(PCIACCESS_LIBS) $(DRM_LIBS) if HAVE_CAIRO if HAVE_LIBUDEV if HAVE_GLIB -TESTS += testdisplay +TESTS_progs += testdisplay LDADD += $(CAIRO_LIBS) $(LIBUDEV_LIBS) $(GLIB_LIBS) AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS) endif diff --git a/tests/debugfs_reader b/tests/debugfs_reader new file mode 100755 index 0000000..8874185 --- /dev/null +++ b/tests/debugfs_reader @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ -d /debug/dri ] ; then + debugfs_path=/debug_dri +fi + +if [ -d /sys/kernel/debug/dri ] ; then + debugfs_path=/sys/kernel/debug/dri +fi + +i915_path=x +for dir in `ls $debugfs_path` ; do + if [ -f $debugfs_path/$dir/i915_error_state ] ; then + i915_path=$debugfs_path/$dir + break + fi +done + +if [ $i915_path = "x" ] ; then + echo i915 debugfs path not found. + exit 1 +fi + +# read everything we can +cat $i915_path/* >& /dev/null + +exit 0 |