aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorAleksey Filippov <alekseyf@google.com>2018-01-18 16:44:06 +0000
committerAleksey Filippov <alekseyf@google.com>2018-02-05 01:28:07 +0000
commit8ca3cc0c3db481b467233151e481a190cbb84c31 (patch)
treee3f247cfdaa3db28ef073d5f6513fbae1da2fb80 /test cases
parent86ee89b400fc4acbb506cc44d5a287958397edf9 (diff)
downloadmeson-8ca3cc0c3db481b467233151e481a190cbb84c31.zip
meson-8ca3cc0c3db481b467233151e481a190cbb84c31.tar.gz
meson-8ca3cc0c3db481b467233151e481a190cbb84c31.tar.bz2
Add elide_directory keyword for install_subdir() function
If elide_directory=true install_subdir() installs directory contents instead of directory itself, eliding name of the source directory. Closes #2869.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/66 install subdir/installed_files.txt6
-rw-r--r--test cases/common/66 install subdir/meson.build4
-rw-r--r--test cases/common/66 install subdir/nested_elided/sub/dircheck/nineth.dat1
-rw-r--r--test cases/common/66 install subdir/nested_elided/sub/eighth.dat1
-rw-r--r--test cases/common/66 install subdir/sub_elided/dircheck/fifth.dat1
-rw-r--r--test cases/common/66 install subdir/sub_elided/fourth.dat1
-rw-r--r--test cases/common/66 install subdir/subdir/meson.build2
-rw-r--r--test cases/common/66 install subdir/subdir/sub_elided/dircheck/seventh.dat1
-rw-r--r--test cases/common/66 install subdir/subdir/sub_elided/sixth.dat1
9 files changed, 18 insertions, 0 deletions
diff --git a/test cases/common/66 install subdir/installed_files.txt b/test cases/common/66 install subdir/installed_files.txt
index e5d2307..3f561d5 100644
--- a/test cases/common/66 install subdir/installed_files.txt
+++ b/test cases/common/66 install subdir/installed_files.txt
@@ -1,3 +1,9 @@
+usr/share/dircheck/fifth.dat
+usr/share/dircheck/seventh.dat
+usr/share/dircheck/nineth.dat
+usr/share/eighth.dat
+usr/share/fourth.dat
+usr/share/sixth.dat
usr/share/sub1/data1.dat
usr/share/sub1/second.dat
usr/share/sub1/third.dat
diff --git a/test cases/common/66 install subdir/meson.build b/test cases/common/66 install subdir/meson.build
index 18e0eaf..b65ab79 100644
--- a/test cases/common/66 install subdir/meson.build
+++ b/test cases/common/66 install subdir/meson.build
@@ -11,3 +11,7 @@ subdir('subdir')
# 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')
+
+# elide_directory
+install_subdir('sub_elided', install_dir : 'share', elide_directory : true)
+install_subdir('nested_elided/sub', install_dir : 'share', elide_directory : true)
diff --git a/test cases/common/66 install subdir/nested_elided/sub/dircheck/nineth.dat b/test cases/common/66 install subdir/nested_elided/sub/dircheck/nineth.dat
new file mode 100644
index 0000000..c4eaca7
--- /dev/null
+++ b/test cases/common/66 install subdir/nested_elided/sub/dircheck/nineth.dat
@@ -0,0 +1 @@
+Nested file under nested elided directory.
diff --git a/test cases/common/66 install subdir/nested_elided/sub/eighth.dat b/test cases/common/66 install subdir/nested_elided/sub/eighth.dat
new file mode 100644
index 0000000..fa9b7b7
--- /dev/null
+++ b/test cases/common/66 install subdir/nested_elided/sub/eighth.dat
@@ -0,0 +1 @@
+File in nested elided directory.
diff --git a/test cases/common/66 install subdir/sub_elided/dircheck/fifth.dat b/test cases/common/66 install subdir/sub_elided/dircheck/fifth.dat
new file mode 100644
index 0000000..b6ca009
--- /dev/null
+++ b/test cases/common/66 install subdir/sub_elided/dircheck/fifth.dat
@@ -0,0 +1 @@
+Data file in a subdir of elided directory.
diff --git a/test cases/common/66 install subdir/sub_elided/fourth.dat b/test cases/common/66 install subdir/sub_elided/fourth.dat
new file mode 100644
index 0000000..ca5f26a
--- /dev/null
+++ b/test cases/common/66 install subdir/sub_elided/fourth.dat
@@ -0,0 +1 @@
+Test that this file is installed directly into install_dir.
diff --git a/test cases/common/66 install subdir/subdir/meson.build b/test cases/common/66 install subdir/subdir/meson.build
index a1dadd4..270da57 100644
--- a/test cases/common/66 install subdir/subdir/meson.build
+++ b/test cases/common/66 install subdir/subdir/meson.build
@@ -1,3 +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', elide_directory : true)
diff --git a/test cases/common/66 install subdir/subdir/sub_elided/dircheck/seventh.dat b/test cases/common/66 install subdir/subdir/sub_elided/dircheck/seventh.dat
new file mode 100644
index 0000000..ea0b8dc
--- /dev/null
+++ b/test cases/common/66 install subdir/subdir/sub_elided/dircheck/seventh.dat
@@ -0,0 +1 @@
+Nested file in a subdir.
diff --git a/test cases/common/66 install subdir/subdir/sub_elided/sixth.dat b/test cases/common/66 install subdir/subdir/sub_elided/sixth.dat
new file mode 100644
index 0000000..140f075
--- /dev/null
+++ b/test cases/common/66 install subdir/subdir/sub_elided/sixth.dat
@@ -0,0 +1 @@
+Elide test file in a subdir.