From f2df2baa70da482db0dd2f60435925ffa154e024 Mon Sep 17 00:00:00 2001
From: Orestis <orestis.malaspinas@pm.me>
Date: Fri, 12 Feb 2021 23:57:48 +0100
Subject: [PATCH] updated tests

---
 meson.build | 11 ++++++++---
 run_test.sh |  6 ++++++
 2 files changed, 14 insertions(+), 3 deletions(-)
 create mode 100755 run_test.sh

diff --git a/meson.build b/meson.build
index 0eea922..3425c6a 100644
--- a/meson.build
+++ b/meson.build
@@ -72,7 +72,12 @@ tests = executable(
     c_args : ['-Wall', '-Wextra', '-pedantic', build_args],
 )
 
-add_test_setup('liblbm_tests', exe_wrapper: ['echo', '""'], is_default: true)
+# testing = run_target('lib_tests',
+#   command : './run_test.sh')
 
-test('lbm3d test execution', lbm3d, args: ['10', '10', '1.0'])
-test('liblbm test execution', tests)
\ No newline at end of file
+# We need to use a script to test with futhark
+# otherwise it makes a timeout (need an input and I'm unable to provide it otherwise)
+testing = find_program('./run_test.sh')
+
+test('lbm3d test execution', lbm3d, args: ['10', '10', '1.0'], suite: 'exec')
+test('liblbm test execution', testing, suite: 'scripted')
diff --git a/run_test.sh b/run_test.sh
new file mode 100755
index 0000000..90a9a88
--- /dev/null
+++ b/run_test.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+cd "${MESON_BUILD_ROOT}"
+echo "" | ./liblbm_tests
+
+
-- 
GitLab