summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-12-20 21:23:56 +0200
committerGitHub <noreply@github.com>2016-12-20 21:23:56 +0200
commitc7685e8ab3642a14e9d962e420bf2b8c7e7f28fa (patch)
treed00b92c38729bd2afe3ee2343216deda89ec9b22 /test cases
parent4317edca25a29a191c51c520e2861f6d45f7b6b1 (diff)
parent701e3932619779a57f95732d61189d47e34dcb88 (diff)
downloadmeson-c7685e8ab3642a14e9d962e420bf2b8c7e7f28fa.tar.gz
Merge pull request #1228 from mesonbuild/runcross
Fix cross test and run them if a cross compiler is available.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/103 manygen/meson.build14
-rw-r--r--test cases/common/111 has header symbol/meson.build13
-rw-r--r--test cases/common/97 selfbuilt custom/meson.build2
3 files changed, 19 insertions, 10 deletions
diff --git a/test cases/common/103 manygen/meson.build b/test cases/common/103 manygen/meson.build
index 5079d1b82..e70a55a17 100644
--- a/test cases/common/103 manygen/meson.build
+++ b/test cases/common/103 manygen/meson.build
@@ -1,8 +1,14 @@
project('manygen', 'c')
-subdir('subdir')
+if meson.is_cross_build()
+ # FIXME error out with skip message once cross test runner
+ # recognizes it.
+ message('Not running this test during cross build.')
+else
+ subdir('subdir')
-exe = executable('depuser', 'depuser.c',
- generated)
+ exe = executable('depuser', 'depuser.c',
+ generated)
-test('depuser test', exe)
+ test('depuser test', exe)
+endif
diff --git a/test cases/common/111 has header symbol/meson.build b/test cases/common/111 has header symbol/meson.build
index b5c865f1d..2a9f5d471 100644
--- a/test cases/common/111 has header symbol/meson.build
+++ b/test cases/common/111 has header symbol/meson.build
@@ -24,9 +24,12 @@ assert (cpp.has_header_symbol('iostream', 'std::iostream'), 'iostream not found
assert (cpp.has_header_symbol('vector', 'std::vector'), 'vector not found in vector.h')
assert (not cpp.has_header_symbol('limits.h', 'std::iostream'), 'iostream should not be defined in limits.h')
-boost = dependency('boost', required : false)
-if boost.found()
- assert (cpp.has_header_symbol('boost/math/quaternion.hpp', 'boost::math::quaternion', dependencies : boost), 'quaternion not found')
-else
- assert (not cpp.has_header_symbol('boost/math/quaternion.hpp', 'boost::math::quaternion', dependencies : boost), 'quaternion found?!')
+# Cross compilation and boost do not mix.
+if not meson.is_cross_build()
+ boost = dependency('boost', required : false)
+ if boost.found()
+ assert (cpp.has_header_symbol('boost/math/quaternion.hpp', 'boost::math::quaternion', dependencies : boost), 'quaternion not found')
+ else
+ assert (not cpp.has_header_symbol('boost/math/quaternion.hpp', 'boost::math::quaternion', dependencies : boost), 'quaternion found?!')
+ endif
endif
diff --git a/test cases/common/97 selfbuilt custom/meson.build b/test cases/common/97 selfbuilt custom/meson.build
index 4b677a729..e5da27ef9 100644
--- a/test cases/common/97 selfbuilt custom/meson.build
+++ b/test cases/common/97 selfbuilt custom/meson.build
@@ -3,7 +3,7 @@ project('selfbuilt custom', 'cpp')
# Build an exe and use it in a custom target
# whose output is used to build a different exe.
-tool = executable('tool', 'tool.cpp')
+tool = executable('tool', 'tool.cpp', native : true)
hfile = custom_target('datah',
output : 'data.h',