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 <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 5 years ago committed by Daniel Stone
parent 56b94b5894
commit 7df5349763
  1. 75
      tests/meson.build
  2. 47
      tests/weston-test.c

@ -200,9 +200,6 @@ tests_standalone = [
], ],
] ]
tests_weston = [
]
if get_option('xwayland') if get_option('xwayland')
d = dependency('x11', required: false) d = dependency('x11', required: false)
if not d.found() if not d.found()
@ -261,12 +258,6 @@ if get_option('shell-ivi')
] ]
endif 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 = configuration_data()
test_config_h.set_quoted('WESTON_TEST_REFERENCE_PATH', meson.current_source_dir() + '/reference') test_config_h.set_quoted('WESTON_TEST_REFERENCE_PATH', meson.current_source_dir() + '/reference')
test_config_h.set_quoted('WESTON_MODULE_MAP', env_modmap) test_config_h.set_quoted('WESTON_MODULE_MAP', env_modmap)
@ -337,72 +328,6 @@ foreach t : tests_standalone
endif endif
endforeach 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') if get_option('backend-drm')
executable( executable(
'setbacklight', 'setbacklight',

@ -56,7 +56,6 @@ struct weston_test {
struct weston_log_scope *log; struct weston_log_scope *log;
struct weston_layer layer; struct weston_layer layer;
struct weston_process process;
struct weston_seat seat; struct weston_seat seat;
struct weston_touch_device *touch_device[MAX_TOUCH_DEVICES]; struct weston_touch_device *touch_device[MAX_TOUCH_DEVICES];
int nr_touch_devices; int nr_touch_devices;
@ -73,23 +72,6 @@ struct weston_test_surface {
struct weston_test *test; 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 static void
touch_device_add(struct weston_test *test) 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); 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 static void
client_thread_cleanup(void *data_) client_thread_cleanup(void *data_)
{ {
@ -878,7 +832,6 @@ wet_module_init(struct weston_compositor *ec,
goto out_free; goto out_free;
loop = wl_display_get_event_loop(ec->wl_display); 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); wl_event_loop_add_idle(loop, idle_launch_testsuite, test);
return 0; return 0;

Loading…
Cancel
Save