--- a/python/tests/meson.build Sat Feb 22 03:29:51 2020 -0600
+++ b/python/tests/meson.build Sat Feb 22 03:33:17 2020 -0600
@@ -1,26 +1,22 @@
-e = executable('test-python-loader', 'test-python-loader.c',
+e = executable('test-python3-loader', 'test-python3-loader.c', include_directories : include_directories('.'),
- '-DPYTHON_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')),
- '-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()),
+ '-DPYTHON3_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')), + '-DPYTHON3_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()), link_with : gplugin_loader_tests,
dependencies : [GLIB, GOBJECT, PYTHON3, PYGOBJECT, gplugin_dep])
-test('Python loader', e)
+test('Python3 loader', e) # we can't see the symbols in gplugin-python externally, so use the static
-e = executable('test-python-utils', 'test-python-utils.c',
+e = executable('test-python3-utils', 'test-python3-utils.c', include_directories : include_directories('.'),
- '-DPYTHON_LOADER_DIR="@0@"'.format(join_paths(meson.current_build_dir(), '..')),
- '-DPYTHON_PLUGIN_DIR="@0@/plugins"'.format(meson.current_source_dir()),
link_with : [gplugin_loader_tests],
dependencies : [GLIB, GOBJECT, PYTHON3, PYGOBJECT,
gplugin_python_static_dep])
+test('Python3 utils', e) --- a/python/tests/test-python-loader.c Sat Feb 22 03:29:51 2020 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include <gplugin/gplugin-loader-tests.h>
-/******************************************************************************
- *****************************************************************************/
-main(gint argc, gchar **argv) {
- g_test_init(&argc, &argv, NULL);
- gplugin_loader_tests_main(PYTHON_LOADER_DIR, PYTHON_PLUGIN_DIR, "python3");
--- a/python/tests/test-python-utils.c Sat Feb 22 03:29:51 2020 -0600
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
- * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com>
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#include "gplugin-python-utils.h"
-/******************************************************************************
- * filename to module tests
- *****************************************************************************/
-test_filename_to_module_NULL_subprocess(void) {
- gplugin_python_filename_to_module(NULL);
-test_filename_to_module_NULL(void) {
- g_test_trap_subprocess("/loaders/python/utils/filename_to_module/NULL/subprocess", 0, 0);
- g_test_trap_assert_failed();
-test_filename_to_module_empty(void) {
- gchar *module = gplugin_python_filename_to_module("");
- g_assert_cmpstr(module, ==, "");
-test_filename_to_module_no_extension(void) {
- gchar *module = gplugin_python_filename_to_module("foo");
- g_assert_cmpstr(module, ==, "foo");
-/******************************************************************************
- *****************************************************************************/
-main(gint argc, gchar **argv) {
- g_test_init(&argc, &argv, NULL);
- g_test_add_func("/loaders/python/utils/filename_to_module/NULL",
- test_filename_to_module_NULL);
- g_test_add_func("/loaders/python/utils/filename_to_module/NULL/subprocess",
- test_filename_to_module_NULL_subprocess);
- g_test_add_func("/loaders/python/utils/filename_to_module/empty",
- test_filename_to_module_empty);
- g_test_add_func("/loaders/python/utils/filename_to_module/no-extension",
- test_filename_to_module_no_extension);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/python/tests/test-python3-loader.c Sat Feb 22 03:33:17 2020 -0600
@@ -0,0 +1,33 @@
+ * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#include <gplugin/gplugin-loader-tests.h> +/****************************************************************************** + *****************************************************************************/ +main(gint argc, gchar **argv) { + g_test_init(&argc, &argv, NULL); + gplugin_loader_tests_main(PYTHON3_LOADER_DIR, PYTHON3_PLUGIN_DIR, "python3"); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/python/tests/test-python3-utils.c Sat Feb 22 03:33:17 2020 -0600
@@ -0,0 +1,75 @@
+ * Copyright (C) 2011-2020 Gary Kramlich <grim@reaperworld.com> + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. +#include "gplugin-python-utils.h" +/****************************************************************************** + * filename to module tests + *****************************************************************************/ +test_filename_to_module_NULL_subprocess(void) { + gplugin_python_filename_to_module(NULL); +test_filename_to_module_NULL(void) { + g_test_trap_subprocess("/loaders/python/utils/filename_to_module/NULL/subprocess", 0, 0); + g_test_trap_assert_failed(); +test_filename_to_module_empty(void) { + gchar *module = gplugin_python_filename_to_module(""); + g_assert_cmpstr(module, ==, ""); +test_filename_to_module_no_extension(void) { + gchar *module = gplugin_python_filename_to_module("foo"); + g_assert_cmpstr(module, ==, "foo"); +/****************************************************************************** + *****************************************************************************/ +main(gint argc, gchar **argv) { + g_test_init(&argc, &argv, NULL); + g_test_add_func("/loaders/python/utils/filename_to_module/NULL", + test_filename_to_module_NULL); + g_test_add_func("/loaders/python/utils/filename_to_module/NULL/subprocess", + test_filename_to_module_NULL_subprocess); + g_test_add_func("/loaders/python/utils/filename_to_module/empty", + test_filename_to_module_empty); + g_test_add_func("/loaders/python/utils/filename_to_module/no-extension", + test_filename_to_module_no_extension);