guile: update unit tests

Make it work with meson.
This commit is contained in:
Dirk-Jan C. Binnema 2022-03-13 12:36:53 +02:00
parent 2fb6356ab6
commit 3a7bfab5f5
2 changed files with 28 additions and 25 deletions

View File

@ -1,4 +1,4 @@
## Copyright (C) 2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
## Copyright (C) 2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -15,13 +15,16 @@
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
guile_load_path=':'.join([
join_paths(meson.source_root(), 'guile'),
join_paths(meson.current_build_dir(), '..')])
test('test-mu-guile',
executable('test-mu-guile',
'test-mu-guile.cc',
install: false,
cpp_args: [
'-DABS_SRCDIR="' + meson.current_source_dir() + '"',
'-DMU_GUILE_LIBRARY_PATH="' + guile_builddir + '"',
'-DMU_GUILE_MODULE_PATH="' + guile_builddir + '"'
'-DGUILE_LOAD_PATH="' + guile_load_path + '"'
],
dependencies: [glib_dep, lib_mu_dep, lib_test_mu_common_dep]))

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2012-2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2012-2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
@ -67,14 +67,14 @@ test_something(const char* what)
char *dir, *cmdline;
gint result;
g_setenv("GUILE_AUTO_COMPILE", "0", TRUE);
g_setenv("GUILE_LOAD_PATH", GUILE_LOAD_PATH, TRUE);
dir = fill_database();
cmdline = g_strdup_printf("GUILE_AUTO_COMPILE=0 "
"LD_LIBRARY_PATH=%s:$LD_LIBRARY_PATH "
"%s -q -L %s -e main %s/test-mu-guile.scm "
cmdline = g_strdup_printf("%s -q -e main %s/test-mu-guile.scm "
"--muhome=%s --test=%s",
MU_GUILE_LIBRARY_PATH,
GUILE_BINARY,
MU_GUILE_MODULE_PATH,
ABS_SRCDIR,
dir,
what);