aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/59 install subdir
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/59 install subdir')
-rw-r--r--meson/test cases/common/59 install subdir/meson.build21
-rw-r--r--meson/test cases/common/59 install subdir/nested_elided/sub/dircheck/ninth.dat1
-rw-r--r--meson/test cases/common/59 install subdir/nested_elided/sub/eighth.dat1
-rw-r--r--meson/test cases/common/59 install subdir/sub/sub1/third.dat1
-rw-r--r--meson/test cases/common/59 install subdir/sub1/second.dat1
-rw-r--r--meson/test cases/common/59 install subdir/sub2/dircheck/excluded-three.dat0
-rw-r--r--meson/test cases/common/59 install subdir/sub2/excluded-three.dat0
-rw-r--r--meson/test cases/common/59 install subdir/sub2/excluded/two.dat0
-rw-r--r--meson/test cases/common/59 install subdir/sub2/one.dat0
-rw-r--r--meson/test cases/common/59 install subdir/sub_elided/dircheck/fifth.dat1
-rw-r--r--meson/test cases/common/59 install subdir/sub_elided/fourth.dat1
-rw-r--r--meson/test cases/common/59 install subdir/subdir/meson.build5
-rw-r--r--meson/test cases/common/59 install subdir/subdir/sub1/data1.dat1
-rw-r--r--meson/test cases/common/59 install subdir/subdir/sub1/sub2/data2.dat1
-rw-r--r--meson/test cases/common/59 install subdir/subdir/sub_elided/dircheck/seventh.dat1
-rw-r--r--meson/test cases/common/59 install subdir/subdir/sub_elided/sixth.dat1
-rw-r--r--meson/test cases/common/59 install subdir/test.json17
17 files changed, 53 insertions, 0 deletions
diff --git a/meson/test cases/common/59 install subdir/meson.build b/meson/test cases/common/59 install subdir/meson.build
new file mode 100644
index 000000000..59f3b4dc5
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/meson.build
@@ -0,0 +1,21 @@
+project('install a whole subdir', 'c',
+ default_options : ['install_umask=preserve'])
+
+# A subdir with an exclusion:
+install_subdir('sub2',
+ exclude_files : ['excluded-three.dat'],
+ exclude_directories : ['excluded'],
+ install_dir : 'share')
+
+subdir('subdir')
+# A subdir with write perms only for the owner
+# and read-list perms for owner and group
+install_subdir('sub1', install_dir : 'share', install_mode : ['rwxr-x--t', 'root'])
+install_subdir('sub/sub1', install_dir : 'share')
+
+# strip_directory
+install_subdir('sub_elided', install_dir : 'share', strip_directory : true)
+install_subdir('nested_elided/sub', install_dir : 'share', strip_directory : true)
+
+# Create new empty directory that doesn't exist in the source tree
+install_subdir('new_directory', install_dir : 'share')
diff --git a/meson/test cases/common/59 install subdir/nested_elided/sub/dircheck/ninth.dat b/meson/test cases/common/59 install subdir/nested_elided/sub/dircheck/ninth.dat
new file mode 100644
index 000000000..c4eaca780
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/nested_elided/sub/dircheck/ninth.dat
@@ -0,0 +1 @@
+Nested file under nested elided directory.
diff --git a/meson/test cases/common/59 install subdir/nested_elided/sub/eighth.dat b/meson/test cases/common/59 install subdir/nested_elided/sub/eighth.dat
new file mode 100644
index 000000000..fa9b7b77f
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/nested_elided/sub/eighth.dat
@@ -0,0 +1 @@
+File in nested elided directory.
diff --git a/meson/test cases/common/59 install subdir/sub/sub1/third.dat b/meson/test cases/common/59 install subdir/sub/sub1/third.dat
new file mode 100644
index 000000000..5ccbc43c7
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub/sub1/third.dat
@@ -0,0 +1 @@
+This is a third data file for sub1 dir.
diff --git a/meson/test cases/common/59 install subdir/sub1/second.dat b/meson/test cases/common/59 install subdir/sub1/second.dat
new file mode 100644
index 000000000..48857a8b6
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub1/second.dat
@@ -0,0 +1 @@
+Test that multiple install_subdirs meld their results. \ No newline at end of file
diff --git a/meson/test cases/common/59 install subdir/sub2/dircheck/excluded-three.dat b/meson/test cases/common/59 install subdir/sub2/dircheck/excluded-three.dat
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub2/dircheck/excluded-three.dat
diff --git a/meson/test cases/common/59 install subdir/sub2/excluded-three.dat b/meson/test cases/common/59 install subdir/sub2/excluded-three.dat
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub2/excluded-three.dat
diff --git a/meson/test cases/common/59 install subdir/sub2/excluded/two.dat b/meson/test cases/common/59 install subdir/sub2/excluded/two.dat
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub2/excluded/two.dat
diff --git a/meson/test cases/common/59 install subdir/sub2/one.dat b/meson/test cases/common/59 install subdir/sub2/one.dat
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub2/one.dat
diff --git a/meson/test cases/common/59 install subdir/sub_elided/dircheck/fifth.dat b/meson/test cases/common/59 install subdir/sub_elided/dircheck/fifth.dat
new file mode 100644
index 000000000..b6ca0098f
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub_elided/dircheck/fifth.dat
@@ -0,0 +1 @@
+Data file in a subdir of elided directory.
diff --git a/meson/test cases/common/59 install subdir/sub_elided/fourth.dat b/meson/test cases/common/59 install subdir/sub_elided/fourth.dat
new file mode 100644
index 000000000..ca5f26a62
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/sub_elided/fourth.dat
@@ -0,0 +1 @@
+Test that this file is installed directly into install_dir.
diff --git a/meson/test cases/common/59 install subdir/subdir/meson.build b/meson/test cases/common/59 install subdir/subdir/meson.build
new file mode 100644
index 000000000..0f81cdb8f
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/subdir/meson.build
@@ -0,0 +1,5 @@
+install_subdir('sub1', install_dir : 'share',
+ # This mode will be overridden by the mode set in the outer install_subdir
+ install_mode : 'rwxr-x---')
+
+install_subdir('sub_elided', install_dir : 'share', strip_directory : true)
diff --git a/meson/test cases/common/59 install subdir/subdir/sub1/data1.dat b/meson/test cases/common/59 install subdir/subdir/sub1/data1.dat
new file mode 100644
index 000000000..d83c370e3
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/subdir/sub1/data1.dat
@@ -0,0 +1 @@
+This is a data file in a subdir.
diff --git a/meson/test cases/common/59 install subdir/subdir/sub1/sub2/data2.dat b/meson/test cases/common/59 install subdir/subdir/sub1/sub2/data2.dat
new file mode 100644
index 000000000..8ce1392b0
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/subdir/sub1/sub2/data2.dat
@@ -0,0 +1 @@
+This is a data file in a deeper subdir.
diff --git a/meson/test cases/common/59 install subdir/subdir/sub_elided/dircheck/seventh.dat b/meson/test cases/common/59 install subdir/subdir/sub_elided/dircheck/seventh.dat
new file mode 100644
index 000000000..ea0b8dc5c
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/subdir/sub_elided/dircheck/seventh.dat
@@ -0,0 +1 @@
+Nested file in a subdir.
diff --git a/meson/test cases/common/59 install subdir/subdir/sub_elided/sixth.dat b/meson/test cases/common/59 install subdir/subdir/sub_elided/sixth.dat
new file mode 100644
index 000000000..140f07560
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/subdir/sub_elided/sixth.dat
@@ -0,0 +1 @@
+Elide test file in a subdir.
diff --git a/meson/test cases/common/59 install subdir/test.json b/meson/test cases/common/59 install subdir/test.json
new file mode 100644
index 000000000..0dd885cb5
--- /dev/null
+++ b/meson/test cases/common/59 install subdir/test.json
@@ -0,0 +1,17 @@
+{
+ "installed": [
+ {"type": "file", "file": "usr/share/dircheck/fifth.dat"},
+ {"type": "file", "file": "usr/share/dircheck/seventh.dat"},
+ {"type": "file", "file": "usr/share/dircheck/ninth.dat"},
+ {"type": "file", "file": "usr/share/eighth.dat"},
+ {"type": "file", "file": "usr/share/fourth.dat"},
+ {"type": "file", "file": "usr/share/sixth.dat"},
+ {"type": "file", "file": "usr/share/sub1/data1.dat"},
+ {"type": "file", "file": "usr/share/sub1/second.dat"},
+ {"type": "file", "file": "usr/share/sub1/third.dat"},
+ {"type": "file", "file": "usr/share/sub1/sub2/data2.dat"},
+ {"type": "file", "file": "usr/share/sub2/one.dat"},
+ {"type": "file", "file": "usr/share/sub2/dircheck/excluded-three.dat"},
+ {"type": "dir", "file": "usr/share/new_directory"}
+ ]
+}