[gjs/meson.msvc: 7/9] test/meson.build: Do not build on Windows



commit bfc5d482b3f1222991ab93315d86d2cb13e85f3c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Oct 25 17:22:18 2019 +0800

    test/meson.build: Do not build on Windows
    
    The test program in test/ must be ported to Windows first, so don't
    build it on Windows for now.

 test/meson.build | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)
---
diff --git a/test/meson.build b/test/meson.build
index de2d7c0e..61dfc0fc 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,22 +1,27 @@
 ### Unit tests #################################################################
 
-mock_js_resources_files = gnome.compile_resources('mock-js-resources',
-    'mock-js-resources.gresource.xml', c_name: 'mock_js_resources',
-    source_dir: '..')
+# Note: The test program needs to be ported to Windows
+#       before we can build it on Windows.
+if host_machine.system() != 'windows'
+    mock_js_resources_files = gnome.compile_resources('mock-js-resources',
+        'mock-js-resources.gresource.xml', c_name: 'mock_js_resources',
+        source_dir: '..')
 
-gjs_tests_sources = [
-    'gjs-tests.cpp',
-    'gjs-test-common.cpp', 'gjs-test-common.h',
-    'gjs-test-utils.cpp', 'gjs-test-utils.h',
-    'gjs-test-call-args.cpp',
-    'gjs-test-coverage.cpp',
-    'gjs-test-rooting.cpp',
-]
+    gjs_tests_sources = [
+        'gjs-tests.cpp',
+        'gjs-test-common.cpp', 'gjs-test-common.h',
+        'gjs-test-utils.cpp', 'gjs-test-utils.h',
+        'gjs-test-call-args.cpp',
+        'gjs-test-coverage.cpp',
+        'gjs-test-rooting.cpp',
+    ]
 
-gjs_tests = executable('gjs-tests', gjs_tests_sources, mock_js_resources_files,
-    cpp_args: ['-DGJS_COMPILATION'] + directory_defines,
-    include_directories: top_include, dependencies: libgjs_dep)
+    gjs_tests = executable('gjs-tests', gjs_tests_sources,
+        mock_js_resources_files,
+        cpp_args: ['-DGJS_COMPILATION'] + directory_defines,
+        include_directories: top_include, dependencies: libgjs_dep)
 
-test('API tests', gjs_tests, args: ['--tap', '--keep-going', '--verbose'],
-    depends: gjs_private_typelib, env: tests_environment, protocol: 'tap',
-    suite: 'C')
+    test('API tests', gjs_tests, args: ['--tap', '--keep-going', '--verbose'],
+        depends: gjs_private_typelib, env: tests_environment, protocol: 'tap',
+        suite: 'C')
+endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]