diff mbox

[i-g-t] tests/drv_missed_irq_hang: Allow running test under piglit.

Message ID 1463404081-2013-1-git-send-email-marius.c.vlad@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Marius Vlad May 16, 2016, 1:08 p.m. UTC
This fixes invalid path handling under piglit.

/opt/igt/tests/drv_missed_irq_hang: line 14:
/opt/igt/piglit//opt/igt/tests/../benchmarks/gem_blt: No such file or
directory

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 tests/drv_missed_irq_hang | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tests/drv_missed_irq_hang b/tests/drv_missed_irq_hang
index e76c7db..4c07cdd 100755
--- a/tests/drv_missed_irq_hang
+++ b/tests/drv_missed_irq_hang
@@ -11,7 +11,12 @@  oldpath=`pwd`
 cd $i915_dfs_path
 
 function blt_wait {
-	$oldpath/$SOURCE_DIR/../benchmarks/gem_blt -r 1 -b 64 -t 1 -S > /dev/null
+	if [ ! -x $oldpath/$SOURCE_DIR/../benchmarks/gem_blt ]; then
+		GEM_BLT=$SOURCE_DIR/../benchmarks/gem_blt
+	else
+		GEM_BLT=$oldpath/$SOURCE_DIR/../benchmarks/gem_blt
+	fi
+	$GEM_BLT -r 1 -b 64 -t 1 -S > /dev/null
 }
 
 function check_for_missed_irq {