summaryrefslogtreecommitdiffstats
path: root/test cases/common/153 wrap file should not failed
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/common/153 wrap file should not failed
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/common/153 wrap file should not failed')
-rw-r--r--test cases/common/153 wrap file should not failed/meson.build23
-rw-r--r--test cases/common/153 wrap file should not failed/src/meson.build6
-rw-r--r--test cases/common/153 wrap file should not failed/src/subprojects/foo/prog2.c7
-rw-r--r--test cases/common/153 wrap file should not failed/src/subprojects/prog.c7
-rw-r--r--test cases/common/153 wrap file should not failed/src/test.c9
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/.gitignore3
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/bar-1.0/bar.c3
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/bar-1.0/meson.build2
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/bar.wrap8
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/foo.c3
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/meson.build2
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/.meson-subproject-wrap-hash.txt1
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/foo.c7
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/meson.build2
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0/foo.c3
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo-1.0/meson.build2
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/foo.wrap11
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0-patch.tar.xzbin0 -> 244 bytes
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0.tar.xzbin0 -> 196 bytes
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8-8-wrap.zip1
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8.tar.gz1
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0-patch.tar.xzbin0 -> 244 bytes
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0.tar.xzbin0 -> 200 bytes
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagefiles/foo-1.0/meson.build2
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-foo-to-executable.patch33
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-return-value-to-43.patch21
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0002-Change-return-value-to-44.patch21
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/patchdir.wrap9
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/patchfile.wrap14
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/foo.c3
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build2
-rw-r--r--test cases/common/153 wrap file should not failed/subprojects/zlib.wrap10
32 files changed, 216 insertions, 0 deletions
diff --git a/test cases/common/153 wrap file should not failed/meson.build b/test cases/common/153 wrap file should not failed/meson.build
new file mode 100644
index 0000000..5448502
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/meson.build
@@ -0,0 +1,23 @@
+project('mainproj', 'c',
+ default_options : ['wrap_mode=nodownload'],
+)
+
+if not find_program('patch', required : false).found() and not find_program('git', required : false).found()
+ error('MESON_SKIP_TEST: patch/git not found.')
+endif
+
+subproject('zlib')
+foo = subproject('foo')
+bar = subproject('bar')
+
+libfoo = foo.get_variable('libfoo')
+libbar = bar.get_variable('libbar')
+
+executable('grabprog', files('src/subprojects/prog.c'))
+executable('grabprog2', files('src/subprojects/foo/prog2.c'))
+subdir('src')
+
+subproject('patchdir')
+
+exe = subproject('patchfile').get_variable('foo_exe')
+test('test_foo', exe)
diff --git a/test cases/common/153 wrap file should not failed/src/meson.build b/test cases/common/153 wrap file should not failed/src/meson.build
new file mode 100644
index 0000000..0c82165
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/src/meson.build
@@ -0,0 +1,6 @@
+executable('grabprog3', files('subprojects/prog.c'))
+executable('grabprog4', files('subprojects/foo/prog2.c'))
+
+texe = executable('testexe', files('test.c'), link_with: [libfoo, libbar])
+
+test('t1', texe)
diff --git a/test cases/common/153 wrap file should not failed/src/subprojects/foo/prog2.c b/test cases/common/153 wrap file should not failed/src/subprojects/foo/prog2.c
new file mode 100644
index 0000000..849b400
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/src/subprojects/foo/prog2.c
@@ -0,0 +1,7 @@
+#include<stdio.h>
+
+int main(void) {
+ printf("Do not have a file layout like this in your own projects.\n");
+ printf("This is only to test that this works.\n");
+ return 0;
+}
diff --git a/test cases/common/153 wrap file should not failed/src/subprojects/prog.c b/test cases/common/153 wrap file should not failed/src/subprojects/prog.c
new file mode 100644
index 0000000..849b400
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/src/subprojects/prog.c
@@ -0,0 +1,7 @@
+#include<stdio.h>
+
+int main(void) {
+ printf("Do not have a file layout like this in your own projects.\n");
+ printf("This is only to test that this works.\n");
+ return 0;
+}
diff --git a/test cases/common/153 wrap file should not failed/src/test.c b/test cases/common/153 wrap file should not failed/src/test.c
new file mode 100644
index 0000000..34cf991
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/src/test.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int bar_dummy_func(void);
+int dummy_func(void);
+
+int main(void) {
+ printf("Hello world %d\n", bar_dummy_func() + dummy_func());
+ return 0;
+}
diff --git a/test cases/common/153 wrap file should not failed/subprojects/.gitignore b/test cases/common/153 wrap file should not failed/subprojects/.gitignore
new file mode 100644
index 0000000..aabded6
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/.gitignore
@@ -0,0 +1,3 @@
+/foo-1.0
+/bar-1.0
+/foo-1.0-patchdir
diff --git a/test cases/common/153 wrap file should not failed/subprojects/bar-1.0/bar.c b/test cases/common/153 wrap file should not failed/subprojects/bar-1.0/bar.c
new file mode 100644
index 0000000..36dcff0
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/bar-1.0/bar.c
@@ -0,0 +1,3 @@
+int bar_dummy_func(void) {
+ return 42;
+}
diff --git a/test cases/common/153 wrap file should not failed/subprojects/bar-1.0/meson.build b/test cases/common/153 wrap file should not failed/subprojects/bar-1.0/meson.build
new file mode 100644
index 0000000..c3d9fee
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/bar-1.0/meson.build
@@ -0,0 +1,2 @@
+project('static lib bar', 'c')
+libbar = static_library('bar', 'bar.c')
diff --git a/test cases/common/153 wrap file should not failed/subprojects/bar.wrap b/test cases/common/153 wrap file should not failed/subprojects/bar.wrap
new file mode 100644
index 0000000..4e8f7e3
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/bar.wrap
@@ -0,0 +1,8 @@
+[wrap-file]
+directory = bar-1.0
+lead_directory_missing = true
+
+source_filename = bar-1.0.tar.xz
+source_hash = f0f61948530dc0d33e3028cd71a9f8ee869f6b3665960d8f41d715cf4aed6467
+
+patch_filename = bar-1.0-patch.tar.xz
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/foo.c b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/foo.c
new file mode 100644
index 0000000..267b43a
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/foo.c
@@ -0,0 +1,3 @@
+int dummy_func(void) {
+ return 42;
+}
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/meson.build b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/meson.build
new file mode 100644
index 0000000..dbaf91f
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchdir/meson.build
@@ -0,0 +1,2 @@
+project('static lib patchdir', 'c')
+libfoo = static_library('foo', 'foo.c')
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/.meson-subproject-wrap-hash.txt b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/.meson-subproject-wrap-hash.txt
new file mode 100644
index 0000000..81b251f
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/.meson-subproject-wrap-hash.txt
@@ -0,0 +1 @@
+0af7983865d151deb48307cc86e9631767501d73016dcf6193523e306caa5485
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/foo.c b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/foo.c
new file mode 100644
index 0000000..d78f25c
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/foo.c
@@ -0,0 +1,7 @@
+int dummy_func(void) {
+ return 44;
+}
+
+int main(void) {
+ return dummy_func() == 44 ? 0 : 1;
+}
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/meson.build b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/meson.build
new file mode 100644
index 0000000..ae5d800
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0-patchfile/meson.build
@@ -0,0 +1,2 @@
+project('static lib patchdir', 'c')
+foo_exe = executable('foo', 'foo.c')
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0/foo.c b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0/foo.c
new file mode 100644
index 0000000..267b43a
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0/foo.c
@@ -0,0 +1,3 @@
+int dummy_func(void) {
+ return 42;
+}
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo-1.0/meson.build b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0/meson.build
new file mode 100644
index 0000000..bcb8bf7
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo-1.0/meson.build
@@ -0,0 +1,2 @@
+project('static lib', 'c')
+libfoo = static_library('foo', 'foo.c')
diff --git a/test cases/common/153 wrap file should not failed/subprojects/foo.wrap b/test cases/common/153 wrap file should not failed/subprojects/foo.wrap
new file mode 100644
index 0000000..c67c5e5
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/foo.wrap
@@ -0,0 +1,11 @@
+[wrap-file]
+directory = foo-1.0
+
+source_url = http://something.invalid
+source_filename = foo-1.0.tar.xz
+source_hash = 9ed8f67d75e43d3be161efb6eddf30dd01995a958ca83951ea64234bac8908c1
+lead_directory_missing = true
+
+patch_url = https://something.invalid/patch
+patch_filename = foo-1.0-patch.tar.xz
+patch_hash = d0ddc5e60fdb27d808552f5ac8d0bb603ea2cba306538b4427b985535b26c9c5
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0-patch.tar.xz b/test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0-patch.tar.xz
new file mode 100644
index 0000000..e26b8e0
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0-patch.tar.xz
Binary files differ
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0.tar.xz b/test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0.tar.xz
new file mode 100644
index 0000000..37eb6cc
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagecache/foo-1.0.tar.xz
Binary files differ
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8-8-wrap.zip b/test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8-8-wrap.zip
new file mode 100644
index 0000000..421376d
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8-8-wrap.zip
@@ -0,0 +1 @@
+dummy
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8.tar.gz b/test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8.tar.gz
new file mode 100644
index 0000000..421376d
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagecache/zlib-1.2.8.tar.gz
@@ -0,0 +1 @@
+dummy
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0-patch.tar.xz b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0-patch.tar.xz
new file mode 100644
index 0000000..f257a19
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0-patch.tar.xz
Binary files differ
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0.tar.xz b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0.tar.xz
new file mode 100644
index 0000000..d90a9e8
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/bar-1.0.tar.xz
Binary files differ
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagefiles/foo-1.0/meson.build b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/foo-1.0/meson.build
new file mode 100644
index 0000000..dbaf91f
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/foo-1.0/meson.build
@@ -0,0 +1,2 @@
+project('static lib patchdir', 'c')
+libfoo = static_library('foo', 'foo.c')
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-foo-to-executable.patch b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-foo-to-executable.patch
new file mode 100644
index 0000000..a29fb6c
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-foo-to-executable.patch
@@ -0,0 +1,33 @@
+From b79f6cc4a096f6c2888f73b947b652491885896a Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Fri, 30 Nov 2018 14:13:47 -0500
+Subject: [PATCH] Change foo to executable
+
+---
+ foo.c | 4 ++++
+ meson.build | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/foo.c b/foo.c
+index 54f9119..468f033 100644
+--- a/foo.c
++++ b/foo.c
+@@ -1,3 +1,7 @@
+ int dummy_func(void) {
+ return 44;
+ }
++
++int main(void) {
++ return dummy_func() == 44 ? 0 : 1;
++}
+diff --git a/meson.build b/meson.build
+index 318e81d..4a281d9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -1,2 +1,2 @@
+ project('static lib patchdir', 'c')
+-libfoo = static_library('foo', 'foo.c')
++foo_exe = executable('foo', 'foo.c')
+--
+2.17.1
+
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-return-value-to-43.patch b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-return-value-to-43.patch
new file mode 100644
index 0000000..49cf1e9
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0001-Change-return-value-to-43.patch
@@ -0,0 +1,21 @@
+From 7001dcc738e5ae7dfa8af20ed582b9a985804f72 Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Fri, 30 Nov 2018 10:15:33 -0500
+Subject: [PATCH 1/2] Change return value to 43
+
+---
+ foo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/foo.c b/foo.c
+index 019f2ba..e4577b8 100644
+--- a/foo.c
++++ b/foo.c
+@@ -1,3 +1,3 @@
+ int dummy_func(void) {
+- return 42;
++ return 43;
+ }
+--
+2.17.1
+
diff --git a/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0002-Change-return-value-to-44.patch b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0002-Change-return-value-to-44.patch
new file mode 100644
index 0000000..4794cea
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/packagefiles/patchfile/0002-Change-return-value-to-44.patch
@@ -0,0 +1,21 @@
+From c2da2e490b09f2e251c7f4ef7c1240acee215fec Mon Sep 17 00:00:00 2001
+From: Xavier Claessens <xavier.claessens@collabora.com>
+Date: Fri, 30 Nov 2018 10:15:47 -0500
+Subject: [PATCH 2/2] Change return value to 44
+
+---
+ foo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/foo.c b/foo.c
+index e4577b8..54f9119 100644
+--- a/foo.c
++++ b/foo.c
+@@ -1,3 +1,3 @@
+ int dummy_func(void) {
+- return 43;
++ return 44;
+ }
+--
+2.17.1
+
diff --git a/test cases/common/153 wrap file should not failed/subprojects/patchdir.wrap b/test cases/common/153 wrap file should not failed/subprojects/patchdir.wrap
new file mode 100644
index 0000000..1a2134c
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/patchdir.wrap
@@ -0,0 +1,9 @@
+[wrap-file]
+directory = foo-1.0-patchdir
+
+source_url = http://something.invalid
+source_filename = foo-1.0.tar.xz
+source_hash = 9ed8f67d75e43d3be161efb6eddf30dd01995a958ca83951ea64234bac8908c1
+lead_directory_missing = true
+
+patch_directory = foo-1.0
diff --git a/test cases/common/153 wrap file should not failed/subprojects/patchfile.wrap b/test cases/common/153 wrap file should not failed/subprojects/patchfile.wrap
new file mode 100644
index 0000000..3d446fe
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/patchfile.wrap
@@ -0,0 +1,14 @@
+[wrap-file]
+directory = foo-1.0-patchfile
+
+source_url = http://something.invalid
+source_filename = foo-1.0.tar.xz
+source_hash = 9ed8f67d75e43d3be161efb6eddf30dd01995a958ca83951ea64234bac8908c1
+lead_directory_missing = true
+
+patch_directory = foo-1.0
+
+diff_files =
+ patchfile/0001-Change-return-value-to-43.patch,
+ patchfile/0002-Change-return-value-to-44.patch,
+ patchfile/0001-Change-foo-to-executable.patch
diff --git a/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/foo.c b/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/foo.c
new file mode 100644
index 0000000..267b43a
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/foo.c
@@ -0,0 +1,3 @@
+int dummy_func(void) {
+ return 42;
+}
diff --git a/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build b/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build
new file mode 100644
index 0000000..70d493f
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/zlib-1.2.8/meson.build
@@ -0,0 +1,2 @@
+project('shared lib', 'c')
+library('foo', 'foo.c')
diff --git a/test cases/common/153 wrap file should not failed/subprojects/zlib.wrap b/test cases/common/153 wrap file should not failed/subprojects/zlib.wrap
new file mode 100644
index 0000000..6d5896f
--- /dev/null
+++ b/test cases/common/153 wrap file should not failed/subprojects/zlib.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = zlib-1.2.8
+
+source_url = http://zlib.net/fossils/zlib-1.2.8.tar.gz
+source_filename = zlib-1.2.8.tar.gz
+source_hash = 36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d
+
+patch_url = https://wrapdb.mesonbuild.com/v1/projects/zlib/1.2.8/8/get_zip
+patch_filename = zlib-1.2.8-8-wrap.zip
+patch_hash = 17c52a0e0c59ce926d3959005d5cd8178c6c7e2c9a4a1304279a8320c955ac60