tests: add testcase to check igt runtime enviroment
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 18 Dec 2012 21:55:58 +0000 (22:55 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Dec 2012 10:02:19 +0000 (11:02 +0100)
Now that we've abandonded the autohell testrunner, need to port this
over. Easiest is to just add another testcase ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
tests/Makefile.am
tests/test_rte_check [new file with mode: 0755]

index 0476908..b0ac7dd 100644 (file)
@@ -104,6 +104,7 @@ TESTS_scripts_M = \
        $(NULL)
 
 TESTS_scripts = \
+       test_rte_check
        debugfs_reader \
        debugfs_emon_crash \
        sysfs_l3_parity \
diff --git a/tests/test_rte_check b/tests/test_rte_check
new file mode 100755 (executable)
index 0000000..6389592
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+whoami | grep root || ( echo ERROR: not running as root; exit 1 )
+
+SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+. $SOURCE_DIR/drm_lib.sh
+
+exit 0