From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- .../generator.py | 16 +++++++++++ .../meson.build | 13 +++++++++ .../test.json | 33 ++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100755 test cases/failing/41 custom target outputs not matching install_dirs/generator.py create mode 100644 test cases/failing/41 custom target outputs not matching install_dirs/meson.build create mode 100644 test cases/failing/41 custom target outputs not matching install_dirs/test.json (limited to 'test cases/failing/41 custom target outputs not matching install_dirs') diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/generator.py b/test cases/failing/41 custom target outputs not matching install_dirs/generator.py new file mode 100755 index 0000000..4ac6179 --- /dev/null +++ b/test cases/failing/41 custom target outputs not matching install_dirs/generator.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import sys, os + +if len(sys.argv) != 3: + print(sys.argv[0], '', '') + +name = sys.argv[1] +odir = sys.argv[2] + +with open(os.path.join(odir, name + '.h'), 'w') as f: + f.write('int func();\n') +with open(os.path.join(odir, name + '.c'), 'w') as f: + f.write('int main(int argc, char *argv[]) { return 0; }') +with open(os.path.join(odir, name + '.sh'), 'w') as f: + f.write('#!/bin/bash') diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/meson.build b/test cases/failing/41 custom target outputs not matching install_dirs/meson.build new file mode 100644 index 0000000..ed99dba --- /dev/null +++ b/test cases/failing/41 custom target outputs not matching install_dirs/meson.build @@ -0,0 +1,13 @@ +project('outputs not matching install_dirs') + +gen = find_program('generator.py') + +if meson.backend() != 'ninja' + error('MESON_SKIP_TEST test is only for the ninja backend') +endif + +custom_target('too-few-install-dirs', + output : ['toofew.h', 'toofew.c', 'toofew.sh'], + command : [gen, 'toofew', '@OUTDIR@'], + install : true, + install_dir : [join_paths(get_option('prefix'), get_option('includedir')), false]) diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/test.json b/test cases/failing/41 custom target outputs not matching install_dirs/test.json new file mode 100644 index 0000000..f9e2ba7 --- /dev/null +++ b/test cases/failing/41 custom target outputs not matching install_dirs/test.json @@ -0,0 +1,33 @@ +{ + "installed": [ + { + "type": "file", + "file": "usr/include/diff.h" + }, + { + "type": "file", + "file": "usr/include/first.h" + }, + { + "type": "file", + "file": "usr/bin/diff.sh" + }, + { + "type": "file", + "file": "usr/bin/second.sh" + }, + { + "type": "file", + "file": "opt/same.h" + }, + { + "type": "file", + "file": "opt/same.sh" + } + ], + "stdout": [ + { + "line": "ERROR: Target 'too-few-install-dirs' has 3 outputs: ['toofew.h', 'toofew.c', 'toofew.sh'], but only 2 \"install_dir\"s were found." + } + ] +} -- cgit v1.2.3