From 7df5349763d060efa2fa1da833c544acc0b92c87 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Wed, 13 Nov 2019 16:47:40 +0200 Subject: [PATCH] tests: remove tests_weston and WESTON_TEST_CLIENT_PATH This test category is empty, so it and all the supporting code can go. Signed-off-by: Pekka Paalanen --- tests/meson.build | 75 --------------------------------------------- tests/weston-test.c | 47 ---------------------------- 2 files changed, 122 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 5ae110de..87dad82e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -200,9 +200,6 @@ tests_standalone = [ ], ] -tests_weston = [ -] - if get_option('xwayland') d = dependency('x11', required: false) if not d.found() @@ -261,12 +258,6 @@ if get_option('shell-ivi') ] endif -env_test_weston = [ - 'WESTON_TEST_REFERENCE_PATH=@0@/reference'.format(meson.current_source_dir()), - 'WESTON_MODULE_MAP=@0@'.format(env_modmap), - 'WESTON_DATA_DIR=' + join_paths(meson.current_source_dir(), '..', 'data'), -] - test_config_h = configuration_data() test_config_h.set_quoted('WESTON_TEST_REFERENCE_PATH', meson.current_source_dir() + '/reference') test_config_h.set_quoted('WESTON_MODULE_MAP', env_modmap) @@ -337,72 +328,6 @@ foreach t : tests_standalone endif endforeach -foreach t : tests_weston - srcs_t = [ - '@0@-test.c'.format(t.get(0)), - weston_test_client_protocol_h, - ] - if t.length() > 1 - srcs_t += t.get(1) - endif - - deps_t = [ - dep_test_client - ] - if t.length() > 2 - deps_t += t.get(2) - endif - - args_t = [ - '--backend=headless-backend.so', - '--socket=test-@0@'.format(t.get(0)), - '--modules=@0@'.format(exe_plugin_test.full_path()), - '--width=320', - '--height=240', - ] - - if t.get(0) == 'xwayland' - args_t += '--xwayland' - endif - - # FIXME: Get this from the array ... ? - if t.get(0) == 'internal-screenshot' - args_t += [ '--config=@0@/internal-screenshot.ini'.format(meson.current_source_dir()) ] - args_t += [ '--use-pixman' ] - args_t += [ '--shell=desktop-shell.so' ] - elif t[0] == 'subsurface-shot' - args_t += [ '--no-config' ] - args_t += [ '--use-pixman' ] - args_t += [ '--width=320' ] - args_t += [ '--height=240' ] - args_t += [ '--shell=weston-test-desktop-shell.so' ] - elif t.get(0) == 'linux-explicit-synchronization' - args_t += [ '--use-pixman' ] - elif t.get(0).startswith('ivi-') - args_t += [ '--config=@0@/../ivi-shell/weston-ivi-test.ini'.format(meson.current_build_dir()) ] - args_t += [ '--shell=ivi-shell.so' ] - else - args_t += [ '--no-config' ] - args_t += [ '--shell=desktop-shell.so' ] - endif - - exe_t = executable( - 'test-@0@'.format(t.get(0)), - srcs_t, - c_args: [ '-DUNIT_TEST' ], - include_directories: common_inc, - dependencies: deps_t, - install: false, - ) - - env_t = [ - 'WESTON_TEST_CLIENT_PATH=@0@'.format(exe_t.full_path()) - ] - env_t += env_test_weston - - test(t.get(0), exe_weston, env: env_t, args: args_t) -endforeach - if get_option('backend-drm') executable( 'setbacklight', diff --git a/tests/weston-test.c b/tests/weston-test.c index f019b0a4..e438e823 100644 --- a/tests/weston-test.c +++ b/tests/weston-test.c @@ -56,7 +56,6 @@ struct weston_test { struct weston_log_scope *log; struct weston_layer layer; - struct weston_process process; struct weston_seat seat; struct weston_touch_device *touch_device[MAX_TOUCH_DEVICES]; int nr_touch_devices; @@ -73,23 +72,6 @@ struct weston_test_surface { struct weston_test *test; }; -static void -test_client_sigchld(struct weston_process *process, int status) -{ - struct weston_test *test = - container_of(process, struct weston_test, process); - - /* Chain up from weston-test-runner's exit code so that ninja - * knows the exit status and can report e.g. skipped tests. */ - if (WIFEXITED(status) && WEXITSTATUS(status) != 0) - exit(WEXITSTATUS(status)); - - /* In case the child aborted or segfaulted... */ - assert(status == 0); - - weston_compositor_exit(test->compositor); -} - static void touch_device_add(struct weston_test *test) { @@ -648,34 +630,6 @@ bind_test(struct wl_client *client, void *data, uint32_t version, uint32_t id) notify_pointer_position(test, resource); } -static void -idle_launch_client(void *data) -{ - struct weston_test *test = data; - pid_t pid; - sigset_t allsigs; - char *path; - - path = getenv("WESTON_TEST_CLIENT_PATH"); - if (path == NULL) - return; - pid = fork(); - if (pid == -1) - exit(EXIT_FAILURE); - if (pid == 0) { - sigfillset(&allsigs); - sigprocmask(SIG_UNBLOCK, &allsigs, NULL); - execl(path, path, NULL); - weston_log("compositor: executing '%s' failed: %s\n", path, - strerror(errno)); - exit(EXIT_FAILURE); - } - - test->process.pid = pid; - test->process.cleanup = test_client_sigchld; - weston_watch_process(&test->process); -} - static void client_thread_cleanup(void *data_) { @@ -878,7 +832,6 @@ wet_module_init(struct weston_compositor *ec, goto out_free; loop = wl_display_get_event_loop(ec->wl_display); - wl_event_loop_add_idle(loop, idle_launch_client, test); wl_event_loop_add_idle(loop, idle_launch_testsuite, test); return 0;