[at-spi2-atk: 1/4] tests: Fix running atk-test
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk: 1/4] tests: Fix running atk-test
- Date: Mon, 26 Aug 2019 20:27:53 +0000 (UTC)
commit 6f233b459cef66b3f0201cdb2d9b46c1f11bc5f5
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Sun Aug 25 18:46:53 2019 +0200
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.
tests/atk_test_util.c | 4 ++--
tests/meson.build | 9 ++++++++-
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]