aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-01-27 23:34:39 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-01-28 01:05:22 +0530
commit626bdd183630e7b2cd15529f88ccb394054d713d (patch)
treec5f7b9ad18c3079d87bb8f328ee6a14b71a9434f
parent2e3091244727f9b2450fcb074992a82bd5a534f1 (diff)
downloadmeson-626bdd183630e7b2cd15529f88ccb394054d713d.zip
meson-626bdd183630e7b2cd15529f88ccb394054d713d.tar.gz
meson-626bdd183630e7b2cd15529f88ccb394054d713d.tar.bz2
tests/common/117: Check that capturing wrote to a file
Without this, the test isn't testing for anything at all. This revealed that custom target output capturing was actually broken on the VS backends.
-rw-r--r--test cases/common/117 custom target capture/meson.build15
1 files changed, 12 insertions, 3 deletions
diff --git a/test cases/common/117 custom target capture/meson.build b/test cases/common/117 custom target capture/meson.build
index d3214e8..16b6ac9 100644
--- a/test cases/common/117 custom target capture/meson.build
+++ b/test cases/common/117 custom target capture/meson.build
@@ -1,8 +1,9 @@
project('custom target', 'c')
-python3 = find_program('python3', required : false)
-if not python3.found()
- python3 = find_program('python')
+python3 = import('python3').find_python()
+
+if meson.backend().startswith('vs')
+ error('MESON_SKIP_TEST: capturing of custom target output is broken with the VS backends')
endif
# Note that this will not add a dependency to the compiler executable.
@@ -17,3 +18,11 @@ mytarget = custom_target('bindat',
install : true,
install_dir : 'subdir'
)
+
+ct_output_exists = '''import os, sys
+if not os.path.exists(sys.argv[1]):
+ print("could not find {!r} in {!r}".format(sys.argv[1], os.getcwd()))
+ sys.exit(1)
+'''
+
+test('capture-wrote', python3, args : ['-c', ct_output_exists, mytarget])