Module: Mesa
Branch: main
Commit: b87fc2125e9a4423fa760a16ecf30f473ad33609
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b87fc2125e9a4423fa760a16ecf30f473ad33609

Author: Sviatoslav Peleshko <sviatoslav.peles...@globallogic.com>
Date:   Wed Oct 11 13:44:17 2023 +0300

intel/tools/tests: Unbreak i965_asm tests

Currently it's searching for test cases in the nonexistent folders, and
because there are none, tests always pass. Point the script onto the
correct ones. And while we're at it, add a check to make sure this
situation won't repeat in the future.

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peles...@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.gh...@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25657>

---

 src/intel/tools/meson.build       | 3 ++-
 src/intel/tools/tests/run-test.py | 5 +++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/intel/tools/meson.build b/src/intel/tools/meson.build
index 741e22feb58..98c4d995bfb 100644
--- a/src/intel/tools/meson.build
+++ b/src/intel/tools/meson.build
@@ -247,7 +247,8 @@ test_runner = find_program('tests/run-test.py')
 foreach testcase : asm_testcases
   _gen_name = testcase[0]
   _gen_num = testcase[1]
-  _gen_folder = join_paths(meson.current_source_dir(), 'tests', _gen_num)
+  _gen_folder = join_paths(meson.current_source_dir(), 'tests',
+                           _gen_num.replace('gfx', 'gen'))
   test(
     'i965_asm_' + _gen_num, test_runner,
     args : [
diff --git a/src/intel/tools/tests/run-test.py 
b/src/intel/tools/tests/run-test.py
index 221c991bdb9..5217bc4276b 100755
--- a/src/intel/tools/tests/run-test.py
+++ b/src/intel/tools/tests/run-test.py
@@ -31,6 +31,11 @@ if wrapper is not None:
 else:
     i965_asm = [args.i965_asm]
 
+if not args.gen_folder.is_dir():
+    print('Test files path does not exist or is not a directory.',
+          file=sys.stderr)
+    exit(99)
+
 success = True
 
 for asm_file in args.gen_folder.glob('*.asm'):

Reply via email to