This is a simple test case, checking for installed_files.txt, which just makes sure the syntax is accepted. Manual tests confirmed the permissions were set correctly. A follow up commit adds a unit test based on this directory.pull/3134/head
parent
df2f6a71e7
commit
862e1dd838
11 changed files with 83 additions and 0 deletions
@ -0,0 +1,5 @@ |
||||
#define MESSAGE "@var@" |
||||
#define OTHER "@other@" "@second@" "@empty@" |
||||
|
||||
#mesondefine BE_TRUE |
||||
#mesondefine SHOULD_BE_UNDEF |
@ -0,0 +1 @@ |
||||
This is a text only input file. |
@ -0,0 +1 @@ |
||||
this is a man page of foo.1 its contents are irrelevant |
@ -0,0 +1,8 @@ |
||||
usr/bin/runscript.sh |
||||
usr/bin/trivialprog?exe |
||||
usr/include/config.h |
||||
usr/include/rootdir.h |
||||
usr/libtest/libstat.a |
||||
usr/share/man/man1/foo.1.gz |
||||
usr/share/sub1/second.dat |
||||
usr/subdir/data.dat |
@ -0,0 +1,52 @@ |
||||
project('install_mode test', 'c', |
||||
default_options : ['install_umask=027', 'libdir=libtest']) |
||||
|
||||
# confirm no regressions in install_data |
||||
install_data('runscript.sh', |
||||
install_dir : get_option('bindir'), |
||||
install_mode : ['rwxr-sr-x', 'root', 0]) |
||||
|
||||
# confirm no regressions in install_subdir |
||||
install_subdir('sub1', |
||||
install_dir : 'share', |
||||
install_mode : ['rwxr-x--t', 'root']) |
||||
|
||||
# test install_mode in configure_file |
||||
conf = configuration_data() |
||||
conf.set('var', 'mystring') |
||||
conf.set('other', 'string 2') |
||||
conf.set('second', ' bonus') |
||||
conf.set('BE_TRUE', true) |
||||
configure_file(input : 'config.h.in', |
||||
output : 'config.h', |
||||
configuration : conf, |
||||
install_dir : 'include', |
||||
install_mode : 'rw-rwSr--') |
||||
|
||||
# test install_mode in custom_target |
||||
custom_target('bindat', |
||||
output : 'data.dat', |
||||
input : 'data_source.txt', |
||||
command : ['cp', '@INPUT@', '@OUTPUT@'], |
||||
install : true, |
||||
install_dir : 'subdir', |
||||
install_mode : 'rw-rwSr--') |
||||
|
||||
# test install_mode in install_headers |
||||
install_headers('rootdir.h', |
||||
install_mode : 'r--r--r-T') |
||||
|
||||
# test install_mode in install_man |
||||
install_man('foo.1', |
||||
install_mode : 'r--r--r-T') |
||||
|
||||
# test install_mode in executable |
||||
executable('trivialprog', |
||||
sources : 'trivial.c', |
||||
install : true, |
||||
install_mode : ['rwxr-sr-x', 'root', 'root']) |
||||
|
||||
# test install_mode in static_library |
||||
static_library('stat', 'stat.c', |
||||
install : true, |
||||
install_mode : ['rw---Sr--']) |
@ -0,0 +1,3 @@ |
||||
/* This header goes to include dir root. */ |
||||
|
||||
int root_func(); |
@ -0,0 +1,3 @@ |
||||
#!/bin/sh |
||||
|
||||
echo "Runscript" |
@ -0,0 +1 @@ |
||||
int func() { return 933; } |
@ -0,0 +1 @@ |
||||
Test that multiple install_subdirs meld their results. |
@ -0,0 +1,6 @@ |
||||
#include<stdio.h> |
||||
|
||||
int main(int argc, char **argv) { |
||||
printf("Trivial test is working.\n"); |
||||
return 0; |
||||
} |
Loading…
Reference in new issue