aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/failing/19 target clash
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/failing/19 target clash
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/failing/19 target clash')
-rw-r--r--meson/test cases/failing/19 target clash/clash.c6
-rw-r--r--meson/test cases/failing/19 target clash/meson.build15
-rw-r--r--meson/test cases/failing/19 target clash/test.json7
3 files changed, 28 insertions, 0 deletions
diff --git a/meson/test cases/failing/19 target clash/clash.c b/meson/test cases/failing/19 target clash/clash.c
new file mode 100644
index 000000000..2daa06cf6
--- /dev/null
+++ b/meson/test cases/failing/19 target clash/clash.c
@@ -0,0 +1,6 @@
+#include<stdio.h>
+
+int main(int argc, char **argv) {
+ printf("Clash 2.\n");
+ return 0;
+}
diff --git a/meson/test cases/failing/19 target clash/meson.build b/meson/test cases/failing/19 target clash/meson.build
new file mode 100644
index 000000000..4fd09348e
--- /dev/null
+++ b/meson/test cases/failing/19 target clash/meson.build
@@ -0,0 +1,15 @@
+project('clash', 'c')
+
+# This setup causes a namespace clash when two Meson targets would
+# produce a Ninja targets with the same name. It only works on
+# unix, because on Windows the target has a '.exe' suffix.
+#
+# This test might fail to work on different backends or when
+# output location is redirected.
+
+if host_machine.system() == 'windows' or host_machine.system() == 'cygwin'
+ error('MESON_SKIP_TEST test only works on platforms where executables have no suffix.')
+endif
+
+executable('clash', 'clash.c')
+run_target('clash', command: ['echo', 'clash 1'])
diff --git a/meson/test cases/failing/19 target clash/test.json b/meson/test cases/failing/19 target clash/test.json
new file mode 100644
index 000000000..d22b894c4
--- /dev/null
+++ b/meson/test cases/failing/19 target clash/test.json
@@ -0,0 +1,7 @@
+{
+ "stdout": [
+ {
+ "line": "ERROR: Multiple producers for Ninja target \"clash\". Please rename your targets."
+ }
+ ]
+}