aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-05-23 17:52:20 +0100
committerGitHub <noreply@github.com>2021-05-23 17:52:20 +0100
commitdf960b0a35613bc665448d1be3ed6ad6586b5803 (patch)
tree0a61a082762a91306b4deef0ecfa440d8f79f550
parentcdb91f493e3d3c3c73047e74b83c87be126c7fa6 (diff)
parentf76c6b8d0a7966ab43d826dc3e19de4ccaa1f7e4 (diff)
downloadmeson-df960b0a35613bc665448d1be3ed6ad6586b5803.zip
meson-df960b0a35613bc665448d1be3ed6ad6586b5803.tar.gz
meson-df960b0a35613bc665448d1be3ed6ad6586b5803.tar.bz2
Merge pull request #8786 from jon-turney/cygwin-tests-reenable
Re-enable various tests on Cygwin
-rw-r--r--azure-pipelines.yml4
-rwxr-xr-xrun_unittests.py2
-rw-r--r--test cases/common/127 generated assembly/meson.build4
-rw-r--r--test cases/common/6 linkshared/cpplib.cpp7
-rw-r--r--test cases/common/6 linkshared/cpplib.h12
-rw-r--r--test cases/common/6 linkshared/cppmain.cpp2
-rw-r--r--test cases/frameworks/11 gir subproject/meson.build4
-rw-r--r--test cases/frameworks/12 multiple gir/meson.build4
-rw-r--r--test cases/frameworks/22 gir link order/meson.build4
-rw-r--r--test cases/frameworks/28 gir link order 2/meson.build4
-rw-r--r--test cases/vala/11 generated vapi/meson.build4
11 files changed, 17 insertions, 34 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 49e0227..497579b 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -116,8 +116,8 @@ jobs:
displayName: Install Dependencies
- script: |
set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32
- env.exe -- python3 -m pip --disable-pip-version-check install gcovr pefile jsonschema
- displayName: "pip install gcovr pefile jsonschema (pytest-xdist broken, skipped: CHECK ME AGAIN)"
+ env.exe -- python3 -m pip --disable-pip-version-check install gcovr pefile pytest-xdist jsonschema
+ displayName: pip install gcovr pefile pytest-xdist jsonschema
- script: |
set BOOST_ROOT=
set PATH=%CYGWIN_ROOT%\bin;%SYSTEMROOT%\system32
diff --git a/run_unittests.py b/run_unittests.py
index 25e7c31..ebecad1 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3075,8 +3075,6 @@ class AllPlatformTests(BasePlatformTests):
@skip_if_not_base_option('b_lto_threads')
def test_lto_threads(self):
- if is_cygwin():
- raise unittest.SkipTest('LTO is broken on Cygwin.')
testdir = os.path.join(self.common_test_dir, '6 linkshared')
env = get_fake_env(testdir, self.builddir, self.prefix)
diff --git a/test cases/common/127 generated assembly/meson.build b/test cases/common/127 generated assembly/meson.build
index 9d406cf..6d614a9 100644
--- a/test cases/common/127 generated assembly/meson.build
+++ b/test cases/common/127 generated assembly/meson.build
@@ -2,10 +2,6 @@ project('generated assembly', 'c')
cc = meson.get_compiler('c')
-if build_machine.system() == 'cygwin'
- error('MESON_SKIP_TEST: Cygwin is broken and nobody knows how to fix it. Patches welcome.')
-endif
-
if ['msvc', 'intel-cl'].contains(cc.get_id())
error('MESON_SKIP_TEST: assembly files cannot be compiled directly by the compiler')
endif
diff --git a/test cases/common/6 linkshared/cpplib.cpp b/test cases/common/6 linkshared/cpplib.cpp
index 395859d..247f820 100644
--- a/test cases/common/6 linkshared/cpplib.cpp
+++ b/test cases/common/6 linkshared/cpplib.cpp
@@ -1,8 +1,5 @@
-#if defined _WIN32
- #define DLL_PUBLIC __declspec(dllexport)
-#else
- #define DLL_PUBLIC __attribute__ ((visibility ("default")))
-#endif
+#define BUILDING_DLL
+#include "cpplib.h"
int DLL_PUBLIC cppfunc(void) {
return 42;
diff --git a/test cases/common/6 linkshared/cpplib.h b/test cases/common/6 linkshared/cpplib.h
new file mode 100644
index 0000000..e2b0206
--- /dev/null
+++ b/test cases/common/6 linkshared/cpplib.h
@@ -0,0 +1,12 @@
+/* See http://gcc.gnu.org/wiki/Visibility#How_to_use_the_new_C.2B-.2B-_visibility_support */
+#if defined(_WIN32) || defined(__CYGWIN__)
+ #ifdef BUILDING_DLL
+ #define DLL_PUBLIC __declspec(dllexport)
+ #else
+ #define DLL_PUBLIC __declspec(dllimport)
+ #endif
+#else
+ #define DLL_PUBLIC __attribute__ ((visibility ("default")))
+#endif
+
+int DLL_PUBLIC cppfunc(void);
diff --git a/test cases/common/6 linkshared/cppmain.cpp b/test cases/common/6 linkshared/cppmain.cpp
index 8e16485..29e9a44 100644
--- a/test cases/common/6 linkshared/cppmain.cpp
+++ b/test cases/common/6 linkshared/cppmain.cpp
@@ -1,4 +1,4 @@
-int cppfunc(void);
+#include "cpplib.h"
int main(void) {
return cppfunc() != 42;
diff --git a/test cases/frameworks/11 gir subproject/meson.build b/test cases/frameworks/11 gir subproject/meson.build
index 75cd941..a599ae9 100644
--- a/test cases/frameworks/11 gir subproject/meson.build
+++ b/test cases/frameworks/11 gir subproject/meson.build
@@ -5,10 +5,6 @@ if not gir.found()
error('MESON_SKIP_TEST g-ir-scanner not found.')
endif
-if build_machine.system() == 'cygwin'
- error('MESON_SKIP_TEST GIR seems to be broken in Cygwin and no-one knows how to fix it. Thus we have to disable this.')
-endif
-
python3 = import('python3')
py3 = python3.find_python()
if run_command(py3, '-c', 'import gi;').returncode() != 0
diff --git a/test cases/frameworks/12 multiple gir/meson.build b/test cases/frameworks/12 multiple gir/meson.build
index cf5df8c..ddc9830 100644
--- a/test cases/frameworks/12 multiple gir/meson.build
+++ b/test cases/frameworks/12 multiple gir/meson.build
@@ -5,10 +5,6 @@ if not gir.found()
error('MESON_SKIP_TEST g-ir-scanner not found.')
endif
-if build_machine.system() == 'cygwin'
- error('MESON_SKIP_TEST GIR seems to be broken in Cygwin and no-one knows how to fix it. Thus we have to disable this.')
-endif
-
gnome = import('gnome')
gobj = dependency('gobject-2.0')
diff --git a/test cases/frameworks/22 gir link order/meson.build b/test cases/frameworks/22 gir link order/meson.build
index 36c652d..8a714b5 100644
--- a/test cases/frameworks/22 gir link order/meson.build
+++ b/test cases/frameworks/22 gir link order/meson.build
@@ -4,10 +4,6 @@ if not dependency('glib-2.0', required : false).found() or not find_program('g-i
error('MESON_SKIP_TEST glib not found.')
endif
-if build_machine.system() == 'cygwin'
- error('MESON_SKIP_TEST GIR seems to be broken in Cygwin and no-one knows how to fix it. Thus we have to disable this.')
-endif
-
gnome = import('gnome')
glib = dependency('glib-2.0')
gobject = dependency('gobject-2.0')
diff --git a/test cases/frameworks/28 gir link order 2/meson.build b/test cases/frameworks/28 gir link order 2/meson.build
index 88aa277..a26531b 100644
--- a/test cases/frameworks/28 gir link order 2/meson.build
+++ b/test cases/frameworks/28 gir link order 2/meson.build
@@ -4,10 +4,6 @@ if not dependency('gobject-2.0', required : false).found() or not find_program('
error('MESON_SKIP_TEST gobject not found.')
endif
-if build_machine.system() == 'cygwin'
- error('MESON_SKIP_TEST GIR seems to be broken in Cygwin and no-one knows how to fix it. Thus we have to disable this.')
-endif
-
gnome = import('gnome')
gobject = dependency('gobject-2.0')
diff --git a/test cases/vala/11 generated vapi/meson.build b/test cases/vala/11 generated vapi/meson.build
index eb57649..d5f38ca 100644
--- a/test cases/vala/11 generated vapi/meson.build
+++ b/test cases/vala/11 generated vapi/meson.build
@@ -1,9 +1,5 @@
project('vapi-test', ['c', 'vala'])
-if build_machine.system() == 'cygwin'
- error('MESON_SKIP_TEST GIR seems to be broken in Cygwin and no-one knows how to fix it. Thus we have to disable this.')
-endif
-
gnome = import('gnome')
subdir('libfoo')
subdir('libbar')