summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-08-25 18:46:53 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-08-25 20:19:43 +0200
commit6f233b459cef66b3f0201cdb2d9b46c1f11bc5f5 (patch)
treee9c78219a8638d43200be6e792f5fdbf7dced42d /tests
parente032abac5cc3406965ccbe9b7ff274c54aaa316b (diff)
downloadat-spi2-atk-6f233b459cef66b3f0201cdb2d9b46c1f11bc5f5.tar.gz
tests: Fix running atk-test
- Actually add it to the meson tests. - Let run_app find app-test when run from the build root by ninja by making it use the build dir. - It takes almost three minutes due to waiting for 1s for application startup, give it 5 minutes to run.
Diffstat (limited to 'tests')
-rw-r--r--tests/atk_test_util.c4
-rw-r--r--tests/meson.build9
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/atk_test_util.c b/tests/atk_test_util.c
index c776ae1..fd4ee8b 100644
--- a/tests/atk_test_util.c
+++ b/tests/atk_test_util.c
@@ -38,8 +38,8 @@ run_app (const char *file_name)
{
child_pid = fork ();
if (child_pid == 0) {
- execlp ("./app-test",
- "./app-test",
+ execlp (TESTS_BUILD_DIR "/app-test",
+ TESTS_BUILD_DIR "/app-test",
"--test-data-file",
file_name,
NULL);
diff --git a/tests/meson.build b/tests/meson.build
index 8bb9b8a..dfe48bf 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -7,7 +7,8 @@ xmlloader_dep = declare_dependency(link_with: xmlloader)
testutils = static_library('testutils', [ 'atk_test_util.c' ],
dependencies: [ glib_dep, atspi_dep ],
- include_directories: [ root_inc, include_directories('.') ])
+ include_directories: [ root_inc, include_directories('.') ],
+ c_args: ['-DTESTS_BUILD_DIR="@0@"'.format(meson.current_build_dir()) ] )
testutils_dep = declare_dependency(link_with: testutils)
# tests:
@@ -72,4 +73,10 @@ foreach t: tests
'-DTESTS_SRC_DIR="@0@"'.format(meson.current_source_dir()),
'-DTESTS_DATA_DIR="@0@"'.format(join_paths(meson.current_source_dir(), 'data')),
])
+
+ if test_name == 'atk-test'
+ atk_test_bin = test_bin
+ endif
endforeach
+
+test('atk-test', atk_test_bin, timeout: 300)