mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-22 15:26:21 +00:00
tests: Basic tools tester
Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
parent
f801b92882
commit
89d96a12d6
@ -115,6 +115,7 @@ TESTS_scripts_M = \
|
|||||||
|
|
||||||
TESTS_scripts = \
|
TESTS_scripts = \
|
||||||
test_rte_check \
|
test_rte_check \
|
||||||
|
tools_test \
|
||||||
debugfs_reader \
|
debugfs_reader \
|
||||||
debugfs_emon_crash \
|
debugfs_emon_crash \
|
||||||
sysfs_l3_parity \
|
sysfs_l3_parity \
|
||||||
|
@ -4,6 +4,10 @@ die() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do_or_die() {
|
||||||
|
$@ > /dev/null 2>&1 || (echo "FAIL: $@ ($?)" && exit -1)
|
||||||
|
}
|
||||||
|
|
||||||
if [ -d /debug/dri ] ; then
|
if [ -d /debug/dri ] ; then
|
||||||
debugfs_path=/debug/dri
|
debugfs_path=/debug/dri
|
||||||
fi
|
fi
|
||||||
|
18
tests/tools_test
Executable file
18
tests/tools_test
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Test some of the most critical tools we have accidentally broken before.
|
||||||
|
# TODO: Possibly make tests parse output
|
||||||
|
|
||||||
|
whoami | grep -q root || ( echo ERROR: not running as root; exit 1 )
|
||||||
|
|
||||||
|
SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
|
||||||
|
. $SOURCE_DIR/drm_lib.sh
|
||||||
|
|
||||||
|
# ARB_MODE has existed for many gens
|
||||||
|
do_or_die "$SOURCE_DIR/../tools/intel_reg_read 0x4030"
|
||||||
|
|
||||||
|
do_or_die "$SOURCE_DIR/../tools/intel_reg_dumper"
|
||||||
|
|
||||||
|
# TODO: Add more tests
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user