From 52202f325907361e712a1587ade048647645bc49 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 2 Jan 2022 12:16:05 +0200 Subject: Condense test directory numbers for rc1. --- .../common/245 dependency fallbacks/meson.build | 10 --- .../subprojects/png/meson.build | 3 - .../common/245 deprecated option/meson.build | 15 ---- .../common/245 deprecated option/meson_options.txt | 15 ---- test cases/common/245 deprecated option/test.json | 29 -------- .../common/246 dependency fallbacks/meson.build | 10 +++ .../subprojects/png/meson.build | 3 + test cases/common/246 install_emptydir/meson.build | 4 -- test cases/common/246 install_emptydir/test.json | 7 -- .../common/247 deprecated option/meson.build | 15 ++++ .../common/247 deprecated option/meson_options.txt | 15 ++++ test cases/common/247 deprecated option/test.json | 29 ++++++++ test cases/common/247 install_symlink/datafile.dat | 1 - test cases/common/247 install_symlink/meson.build | 9 --- test cases/common/247 install_symlink/test.json | 7 -- test cases/common/248 install_emptydir/meson.build | 4 ++ test cases/common/248 install_emptydir/test.json | 7 ++ test cases/common/249 install_symlink/datafile.dat | 1 + test cases/common/249 install_symlink/meson.build | 9 +++ test cases/common/249 install_symlink/test.json | 7 ++ .../failing/106 feature require.bis/meson.build | 2 - .../106 feature require.bis/meson_options.txt | 1 - .../failing/106 feature require.bis/test.json | 8 --- .../failing/107 feature require.bis/meson.build | 2 + .../107 feature require.bis/meson_options.txt | 1 + .../failing/107 feature require.bis/test.json | 8 +++ .../107 no build get_external_property/meson.build | 3 - .../107 no build get_external_property/test.json | 7 -- .../failing/108 enter subdir twice/meson.build | 3 - .../failing/108 enter subdir twice/sub/meson.build | 1 - .../failing/108 enter subdir twice/test.json | 7 -- .../108 no build get_external_property/meson.build | 3 + .../108 no build get_external_property/test.json | 7 ++ .../failing/109 enter subdir twice/meson.build | 3 + .../failing/109 enter subdir twice/sub/meson.build | 1 + .../failing/109 enter subdir twice/test.json | 7 ++ test cases/failing/109 invalid fstring/meson.build | 4 -- test cases/failing/109 invalid fstring/test.json | 7 -- test cases/failing/110 invalid fstring/meson.build | 3 - test cases/failing/110 invalid fstring/test.json | 7 -- .../111 compiler argument checking/meson.build | 4 -- .../111 compiler argument checking/test.json | 7 -- .../109 invalid fstring/meson.build | 4 ++ .../109 invalid fstring/test.json | 7 ++ test cases/failing/111 invalid fstring/meson.build | 3 + test cases/failing/111 invalid fstring/test.json | 7 ++ .../112 compiler argument checking/meson.build | 4 ++ .../112 compiler argument checking/test.json | 7 ++ test cases/failing/112 empty fallback/meson.build | 6 -- .../112 empty fallback/subprojects/foo/meson.build | 3 - test cases/failing/112 empty fallback/test.json | 7 -- .../113 cmake executable dependency/meson.build | 9 --- .../subprojects/cmlib/CMakeLists.txt | 5 -- .../subprojects/cmlib/main.c | 3 - .../113 cmake executable dependency/test.json | 7 -- test cases/failing/113 empty fallback/meson.build | 6 ++ .../113 empty fallback/subprojects/foo/meson.build | 3 + test cases/failing/113 empty fallback/test.json | 7 ++ .../114 allow_fallback with fallback/meson.build | 3 - .../114 allow_fallback with fallback/test.json | 8 --- .../114 cmake executable dependency/meson.build | 9 +++ .../subprojects/cmlib/CMakeLists.txt | 5 ++ .../subprojects/cmlib/main.c | 3 + .../114 cmake executable dependency/test.json | 7 ++ .../115 allow_fallback with fallback/meson.build | 3 + .../115 allow_fallback with fallback/test.json | 8 +++ .../failing/115 nonsensical bindgen/meson.build | 20 ------ .../failing/115 nonsensical bindgen/src/header.h | 8 --- .../failing/115 nonsensical bindgen/src/source.c | 8 --- .../failing/115 nonsensical bindgen/test.json | 8 --- .../failing/116 nonsensical bindgen/meson.build | 20 ++++++ .../failing/116 nonsensical bindgen/src/header.h | 8 +++ .../failing/116 nonsensical bindgen/src/source.c | 8 +++ .../failing/116 nonsensical bindgen/test.json | 8 +++ .../failing/116 run_target in test/meson.build | 4 -- .../failing/116 run_target in test/test.json | 8 --- .../failing/116 run_target in test/trivial.c | 6 -- .../meson.build | 4 -- .../117 run_target in add_install_script/test.json | 8 --- .../117 run_target in add_install_script/trivial.c | 11 --- .../failing/117 run_target in test/meson.build | 4 ++ .../failing/117 run_target in test/test.json | 8 +++ .../failing/117 run_target in test/trivial.c | 6 ++ .../118 pathsep in install_symlink/meson.build | 3 - .../118 pathsep in install_symlink/test.json | 7 -- .../meson.build | 4 ++ .../118 run_target in add_install_script/test.json | 8 +++ .../118 run_target in add_install_script/trivial.c | 11 +++ .../119 pathsep in install_symlink/meson.build | 3 + .../119 pathsep in install_symlink/test.json | 7 ++ test cases/unit/100 custom target name/file.txt.in | 0 test cases/unit/100 custom target name/meson.build | 14 ++++ .../unit/100 custom target name/subdir/meson.build | 9 +++ test cases/unit/100 rlib linkage/lib2.rs | 5 -- test cases/unit/100 rlib linkage/main.rs | 5 -- test cases/unit/100 rlib linkage/meson.build | 22 ------ .../unit/101 python without pkgconfig/meson.build | 4 -- test cases/unit/101 relative find program/foo.py | 3 + .../unit/101 relative find program/meson.build | 3 + .../101 relative find program/subdir/meson.build | 2 + test cases/unit/102 rlib linkage/lib2.rs | 5 ++ test cases/unit/102 rlib linkage/main.rs | 5 ++ test cases/unit/102 rlib linkage/meson.build | 22 ++++++ .../unit/103 python without pkgconfig/meson.build | 4 ++ test cases/unit/97 link full name/.gitignore | 5 -- .../97 link full name/libtestprovider/meson.build | 20 ------ .../97 link full name/libtestprovider/provider.c | 12 ---- .../unit/97 link full name/proguser/meson.build | 11 --- .../unit/97 link full name/proguser/receiver.c | 18 ----- .../unit/98 install all targets/bar-custom.txt | 0 test cases/unit/98 install all targets/bar-devel.h | 0 .../unit/98 install all targets/bar-notag.txt | 0 .../98 install all targets/custom_files/data.txt | 1 - test cases/unit/98 install all targets/foo.in | 0 .../unit/98 install all targets/foo1-devel.h | 0 test cases/unit/98 install all targets/lib.c | 9 --- test cases/unit/98 install all targets/main.c | 3 - test cases/unit/98 install all targets/meson.build | 82 ---------------------- test cases/unit/98 install all targets/script.py | 7 -- .../98 install all targets/subdir/bar2-devel.h | 0 .../unit/98 install all targets/subdir/foo2.in | 0 .../98 install all targets/subdir/foo3-devel.h | 0 .../unit/98 install all targets/subdir/lib.c | 9 --- .../unit/98 install all targets/subdir/main.c | 3 - .../unit/98 install all targets/subdir/meson.build | 21 ------ .../unit/98 install all targets/subdir/script.py | 7 -- test cases/unit/98 link full name/.gitignore | 5 ++ .../98 link full name/libtestprovider/meson.build | 20 ++++++ .../98 link full name/libtestprovider/provider.c | 12 ++++ .../unit/98 link full name/proguser/meson.build | 11 +++ .../unit/98 link full name/proguser/receiver.c | 18 +++++ test cases/unit/99 custom target name/file.txt.in | 0 test cases/unit/99 custom target name/meson.build | 14 ---- .../unit/99 custom target name/subdir/meson.build | 9 --- .../unit/99 install all targets/bar-custom.txt | 0 test cases/unit/99 install all targets/bar-devel.h | 0 .../unit/99 install all targets/bar-notag.txt | 0 .../99 install all targets/custom_files/data.txt | 1 + test cases/unit/99 install all targets/foo.in | 0 .../unit/99 install all targets/foo1-devel.h | 0 test cases/unit/99 install all targets/lib.c | 9 +++ test cases/unit/99 install all targets/main.c | 3 + test cases/unit/99 install all targets/meson.build | 82 ++++++++++++++++++++++ test cases/unit/99 install all targets/script.py | 7 ++ .../99 install all targets/subdir/bar2-devel.h | 0 .../unit/99 install all targets/subdir/foo2.in | 0 .../99 install all targets/subdir/foo3-devel.h | 0 .../unit/99 install all targets/subdir/lib.c | 9 +++ .../unit/99 install all targets/subdir/main.c | 3 + .../unit/99 install all targets/subdir/meson.build | 21 ++++++ .../unit/99 install all targets/subdir/script.py | 7 ++ test cases/unit/99 relative find program/foo.py | 3 - .../unit/99 relative find program/meson.build | 3 - .../99 relative find program/subdir/meson.build | 2 - 154 files changed, 585 insertions(+), 585 deletions(-) delete mode 100644 test cases/common/245 dependency fallbacks/meson.build delete mode 100644 test cases/common/245 dependency fallbacks/subprojects/png/meson.build delete mode 100644 test cases/common/245 deprecated option/meson.build delete mode 100644 test cases/common/245 deprecated option/meson_options.txt delete mode 100644 test cases/common/245 deprecated option/test.json create mode 100644 test cases/common/246 dependency fallbacks/meson.build create mode 100644 test cases/common/246 dependency fallbacks/subprojects/png/meson.build delete mode 100644 test cases/common/246 install_emptydir/meson.build delete mode 100644 test cases/common/246 install_emptydir/test.json create mode 100644 test cases/common/247 deprecated option/meson.build create mode 100644 test cases/common/247 deprecated option/meson_options.txt create mode 100644 test cases/common/247 deprecated option/test.json delete mode 100644 test cases/common/247 install_symlink/datafile.dat delete mode 100644 test cases/common/247 install_symlink/meson.build delete mode 100644 test cases/common/247 install_symlink/test.json create mode 100644 test cases/common/248 install_emptydir/meson.build create mode 100644 test cases/common/248 install_emptydir/test.json create mode 100644 test cases/common/249 install_symlink/datafile.dat create mode 100644 test cases/common/249 install_symlink/meson.build create mode 100644 test cases/common/249 install_symlink/test.json delete mode 100644 test cases/failing/106 feature require.bis/meson.build delete mode 100644 test cases/failing/106 feature require.bis/meson_options.txt delete mode 100644 test cases/failing/106 feature require.bis/test.json create mode 100644 test cases/failing/107 feature require.bis/meson.build create mode 100644 test cases/failing/107 feature require.bis/meson_options.txt create mode 100644 test cases/failing/107 feature require.bis/test.json delete mode 100644 test cases/failing/107 no build get_external_property/meson.build delete mode 100644 test cases/failing/107 no build get_external_property/test.json delete mode 100644 test cases/failing/108 enter subdir twice/meson.build delete mode 100644 test cases/failing/108 enter subdir twice/sub/meson.build delete mode 100644 test cases/failing/108 enter subdir twice/test.json create mode 100644 test cases/failing/108 no build get_external_property/meson.build create mode 100644 test cases/failing/108 no build get_external_property/test.json create mode 100644 test cases/failing/109 enter subdir twice/meson.build create mode 100644 test cases/failing/109 enter subdir twice/sub/meson.build create mode 100644 test cases/failing/109 enter subdir twice/test.json delete mode 100644 test cases/failing/109 invalid fstring/meson.build delete mode 100644 test cases/failing/109 invalid fstring/test.json delete mode 100644 test cases/failing/110 invalid fstring/meson.build delete mode 100644 test cases/failing/110 invalid fstring/test.json delete mode 100644 test cases/failing/111 compiler argument checking/meson.build delete mode 100644 test cases/failing/111 compiler argument checking/test.json create mode 100644 test cases/failing/111 invalid fstring/109 invalid fstring/meson.build create mode 100644 test cases/failing/111 invalid fstring/109 invalid fstring/test.json create mode 100644 test cases/failing/111 invalid fstring/meson.build create mode 100644 test cases/failing/111 invalid fstring/test.json create mode 100644 test cases/failing/112 compiler argument checking/meson.build create mode 100644 test cases/failing/112 compiler argument checking/test.json delete mode 100644 test cases/failing/112 empty fallback/meson.build delete mode 100644 test cases/failing/112 empty fallback/subprojects/foo/meson.build delete mode 100644 test cases/failing/112 empty fallback/test.json delete mode 100644 test cases/failing/113 cmake executable dependency/meson.build delete mode 100644 test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt delete mode 100644 test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c delete mode 100644 test cases/failing/113 cmake executable dependency/test.json create mode 100644 test cases/failing/113 empty fallback/meson.build create mode 100644 test cases/failing/113 empty fallback/subprojects/foo/meson.build create mode 100644 test cases/failing/113 empty fallback/test.json delete mode 100644 test cases/failing/114 allow_fallback with fallback/meson.build delete mode 100644 test cases/failing/114 allow_fallback with fallback/test.json create mode 100644 test cases/failing/114 cmake executable dependency/meson.build create mode 100644 test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt create mode 100644 test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c create mode 100644 test cases/failing/114 cmake executable dependency/test.json create mode 100644 test cases/failing/115 allow_fallback with fallback/meson.build create mode 100644 test cases/failing/115 allow_fallback with fallback/test.json delete mode 100644 test cases/failing/115 nonsensical bindgen/meson.build delete mode 100644 test cases/failing/115 nonsensical bindgen/src/header.h delete mode 100644 test cases/failing/115 nonsensical bindgen/src/source.c delete mode 100644 test cases/failing/115 nonsensical bindgen/test.json create mode 100644 test cases/failing/116 nonsensical bindgen/meson.build create mode 100644 test cases/failing/116 nonsensical bindgen/src/header.h create mode 100644 test cases/failing/116 nonsensical bindgen/src/source.c create mode 100644 test cases/failing/116 nonsensical bindgen/test.json delete mode 100644 test cases/failing/116 run_target in test/meson.build delete mode 100644 test cases/failing/116 run_target in test/test.json delete mode 100644 test cases/failing/116 run_target in test/trivial.c delete mode 100644 test cases/failing/117 run_target in add_install_script/meson.build delete mode 100644 test cases/failing/117 run_target in add_install_script/test.json delete mode 100644 test cases/failing/117 run_target in add_install_script/trivial.c create mode 100644 test cases/failing/117 run_target in test/meson.build create mode 100644 test cases/failing/117 run_target in test/test.json create mode 100644 test cases/failing/117 run_target in test/trivial.c delete mode 100644 test cases/failing/118 pathsep in install_symlink/meson.build delete mode 100644 test cases/failing/118 pathsep in install_symlink/test.json create mode 100644 test cases/failing/118 run_target in add_install_script/meson.build create mode 100644 test cases/failing/118 run_target in add_install_script/test.json create mode 100644 test cases/failing/118 run_target in add_install_script/trivial.c create mode 100644 test cases/failing/119 pathsep in install_symlink/meson.build create mode 100644 test cases/failing/119 pathsep in install_symlink/test.json create mode 100644 test cases/unit/100 custom target name/file.txt.in create mode 100644 test cases/unit/100 custom target name/meson.build create mode 100644 test cases/unit/100 custom target name/subdir/meson.build delete mode 100644 test cases/unit/100 rlib linkage/lib2.rs delete mode 100644 test cases/unit/100 rlib linkage/main.rs delete mode 100644 test cases/unit/100 rlib linkage/meson.build delete mode 100644 test cases/unit/101 python without pkgconfig/meson.build create mode 100755 test cases/unit/101 relative find program/foo.py create mode 100644 test cases/unit/101 relative find program/meson.build create mode 100644 test cases/unit/101 relative find program/subdir/meson.build create mode 100644 test cases/unit/102 rlib linkage/lib2.rs create mode 100644 test cases/unit/102 rlib linkage/main.rs create mode 100644 test cases/unit/102 rlib linkage/meson.build create mode 100644 test cases/unit/103 python without pkgconfig/meson.build delete mode 100644 test cases/unit/97 link full name/.gitignore delete mode 100644 test cases/unit/97 link full name/libtestprovider/meson.build delete mode 100644 test cases/unit/97 link full name/libtestprovider/provider.c delete mode 100644 test cases/unit/97 link full name/proguser/meson.build delete mode 100644 test cases/unit/97 link full name/proguser/receiver.c delete mode 100644 test cases/unit/98 install all targets/bar-custom.txt delete mode 100644 test cases/unit/98 install all targets/bar-devel.h delete mode 100644 test cases/unit/98 install all targets/bar-notag.txt delete mode 100644 test cases/unit/98 install all targets/custom_files/data.txt delete mode 100644 test cases/unit/98 install all targets/foo.in delete mode 100644 test cases/unit/98 install all targets/foo1-devel.h delete mode 100644 test cases/unit/98 install all targets/lib.c delete mode 100644 test cases/unit/98 install all targets/main.c delete mode 100644 test cases/unit/98 install all targets/meson.build delete mode 100644 test cases/unit/98 install all targets/script.py delete mode 100644 test cases/unit/98 install all targets/subdir/bar2-devel.h delete mode 100644 test cases/unit/98 install all targets/subdir/foo2.in delete mode 100644 test cases/unit/98 install all targets/subdir/foo3-devel.h delete mode 100644 test cases/unit/98 install all targets/subdir/lib.c delete mode 100644 test cases/unit/98 install all targets/subdir/main.c delete mode 100644 test cases/unit/98 install all targets/subdir/meson.build delete mode 100644 test cases/unit/98 install all targets/subdir/script.py create mode 100644 test cases/unit/98 link full name/.gitignore create mode 100644 test cases/unit/98 link full name/libtestprovider/meson.build create mode 100644 test cases/unit/98 link full name/libtestprovider/provider.c create mode 100644 test cases/unit/98 link full name/proguser/meson.build create mode 100644 test cases/unit/98 link full name/proguser/receiver.c delete mode 100644 test cases/unit/99 custom target name/file.txt.in delete mode 100644 test cases/unit/99 custom target name/meson.build delete mode 100644 test cases/unit/99 custom target name/subdir/meson.build create mode 100644 test cases/unit/99 install all targets/bar-custom.txt create mode 100644 test cases/unit/99 install all targets/bar-devel.h create mode 100644 test cases/unit/99 install all targets/bar-notag.txt create mode 100644 test cases/unit/99 install all targets/custom_files/data.txt create mode 100644 test cases/unit/99 install all targets/foo.in create mode 100644 test cases/unit/99 install all targets/foo1-devel.h create mode 100644 test cases/unit/99 install all targets/lib.c create mode 100644 test cases/unit/99 install all targets/main.c create mode 100644 test cases/unit/99 install all targets/meson.build create mode 100644 test cases/unit/99 install all targets/script.py create mode 100644 test cases/unit/99 install all targets/subdir/bar2-devel.h create mode 100644 test cases/unit/99 install all targets/subdir/foo2.in create mode 100644 test cases/unit/99 install all targets/subdir/foo3-devel.h create mode 100644 test cases/unit/99 install all targets/subdir/lib.c create mode 100644 test cases/unit/99 install all targets/subdir/main.c create mode 100644 test cases/unit/99 install all targets/subdir/meson.build create mode 100644 test cases/unit/99 install all targets/subdir/script.py delete mode 100755 test cases/unit/99 relative find program/foo.py delete mode 100644 test cases/unit/99 relative find program/meson.build delete mode 100644 test cases/unit/99 relative find program/subdir/meson.build diff --git a/test cases/common/245 dependency fallbacks/meson.build b/test cases/common/245 dependency fallbacks/meson.build deleted file mode 100644 index aaabaaa..0000000 --- a/test cases/common/245 dependency fallbacks/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('dependency fallbacks', 'c') - -# pkg-config has 'libpng' but cmake has 'png' and we have a 'png' subproject -# for platforms that have neither. -d = dependency('libpng', 'png', 'foo') -assert(d.found()) - -# Check that dependency 'foo' has been implicitly overridden. -d = dependency('foo') -assert(d.found()) diff --git a/test cases/common/245 dependency fallbacks/subprojects/png/meson.build b/test cases/common/245 dependency fallbacks/subprojects/png/meson.build deleted file mode 100644 index 5efc60a..0000000 --- a/test cases/common/245 dependency fallbacks/subprojects/png/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('png') - -meson.override_dependency('libpng', declare_dependency()) diff --git a/test cases/common/245 deprecated option/meson.build b/test cases/common/245 deprecated option/meson.build deleted file mode 100644 index 5102fd0..0000000 --- a/test cases/common/245 deprecated option/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project('deprecated options', - default_options: [ - 'o1=false', - 'o2=a,b', - 'o3=a,b', - 'o4=true', - 'o5=auto', - ] -) - -assert(get_option('o1') == false) -assert(get_option('o2') == ['a', 'b']) -assert(get_option('o3') == ['c', 'b']) -assert(get_option('o4').enabled()) -assert(get_option('o5') == false) diff --git a/test cases/common/245 deprecated option/meson_options.txt b/test cases/common/245 deprecated option/meson_options.txt deleted file mode 100644 index 5814531..0000000 --- a/test cases/common/245 deprecated option/meson_options.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Option fully deprecated, it warns when any value is set. -option('o1', type: 'boolean', deprecated: true) - -# One of the choices is deprecated, it warns only when 'a' is in the list of values. -option('o2', type: 'array', choices: ['a', 'b'], deprecated: ['a']) - -# One of the choices is deprecated, it warns only when 'a' is in the list of values -# and replace it by 'c'. -option('o3', type: 'array', choices: ['a', 'b', 'c'], deprecated: {'a': 'c'}) - -# A boolean option has been replaced by a feature, old true/false values are remapped. -option('o4', type: 'feature', deprecated: {'true': 'enabled', 'false': 'disabled'}) - -# A feature option has been replaced by a boolean, enabled/disabled/auto values are remapped. -option('o5', type: 'boolean', deprecated: {'enabled': 'true', 'disabled': 'false', 'auto': 'false'}) diff --git a/test cases/common/245 deprecated option/test.json b/test cases/common/245 deprecated option/test.json deleted file mode 100644 index c2f2ca3..0000000 --- a/test cases/common/245 deprecated option/test.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "stdout": [ - { - "line": ".*DEPRECATION: Option 'o1' is deprecated", - "match": "re", - "count": 1 - }, - { - "line": ".*DEPRECATION: Option 'o2' value 'a' is deprecated", - "match": "re", - "count": 1 - }, - { - "line": ".*DEPRECATION: Option 'o3' value 'a' is replaced by 'c'", - "match": "re", - "count": 1 - }, - { - "line": ".*DEPRECATION: Option 'o4' value 'true' is replaced by 'enabled'", - "match": "re", - "count": 1 - }, - { - "line": ".*DEPRECATION: Option 'o5' value 'auto' is replaced by 'false'", - "match": "re", - "count": 1 - } - ] -} diff --git a/test cases/common/246 dependency fallbacks/meson.build b/test cases/common/246 dependency fallbacks/meson.build new file mode 100644 index 0000000..aaabaaa --- /dev/null +++ b/test cases/common/246 dependency fallbacks/meson.build @@ -0,0 +1,10 @@ +project('dependency fallbacks', 'c') + +# pkg-config has 'libpng' but cmake has 'png' and we have a 'png' subproject +# for platforms that have neither. +d = dependency('libpng', 'png', 'foo') +assert(d.found()) + +# Check that dependency 'foo' has been implicitly overridden. +d = dependency('foo') +assert(d.found()) diff --git a/test cases/common/246 dependency fallbacks/subprojects/png/meson.build b/test cases/common/246 dependency fallbacks/subprojects/png/meson.build new file mode 100644 index 0000000..5efc60a --- /dev/null +++ b/test cases/common/246 dependency fallbacks/subprojects/png/meson.build @@ -0,0 +1,3 @@ +project('png') + +meson.override_dependency('libpng', declare_dependency()) diff --git a/test cases/common/246 install_emptydir/meson.build b/test cases/common/246 install_emptydir/meson.build deleted file mode 100644 index a5eb046..0000000 --- a/test cases/common/246 install_emptydir/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('install_emptydir') - -install_emptydir(get_option('datadir')/'new_directory', install_mode: 'rwx------') -install_emptydir(get_option('datadir')/'new_directory/subdir', install_mode: 'rwxr-----') diff --git a/test cases/common/246 install_emptydir/test.json b/test cases/common/246 install_emptydir/test.json deleted file mode 100644 index 17abe74..0000000 --- a/test cases/common/246 install_emptydir/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "installed": [ - { "type": "dir", "file": "usr/share/new_directory" }, - { "type": "dir", "file": "usr/share/new_directory/subdir" } - ] -} - diff --git a/test cases/common/247 deprecated option/meson.build b/test cases/common/247 deprecated option/meson.build new file mode 100644 index 0000000..5102fd0 --- /dev/null +++ b/test cases/common/247 deprecated option/meson.build @@ -0,0 +1,15 @@ +project('deprecated options', + default_options: [ + 'o1=false', + 'o2=a,b', + 'o3=a,b', + 'o4=true', + 'o5=auto', + ] +) + +assert(get_option('o1') == false) +assert(get_option('o2') == ['a', 'b']) +assert(get_option('o3') == ['c', 'b']) +assert(get_option('o4').enabled()) +assert(get_option('o5') == false) diff --git a/test cases/common/247 deprecated option/meson_options.txt b/test cases/common/247 deprecated option/meson_options.txt new file mode 100644 index 0000000..5814531 --- /dev/null +++ b/test cases/common/247 deprecated option/meson_options.txt @@ -0,0 +1,15 @@ +# Option fully deprecated, it warns when any value is set. +option('o1', type: 'boolean', deprecated: true) + +# One of the choices is deprecated, it warns only when 'a' is in the list of values. +option('o2', type: 'array', choices: ['a', 'b'], deprecated: ['a']) + +# One of the choices is deprecated, it warns only when 'a' is in the list of values +# and replace it by 'c'. +option('o3', type: 'array', choices: ['a', 'b', 'c'], deprecated: {'a': 'c'}) + +# A boolean option has been replaced by a feature, old true/false values are remapped. +option('o4', type: 'feature', deprecated: {'true': 'enabled', 'false': 'disabled'}) + +# A feature option has been replaced by a boolean, enabled/disabled/auto values are remapped. +option('o5', type: 'boolean', deprecated: {'enabled': 'true', 'disabled': 'false', 'auto': 'false'}) diff --git a/test cases/common/247 deprecated option/test.json b/test cases/common/247 deprecated option/test.json new file mode 100644 index 0000000..c2f2ca3 --- /dev/null +++ b/test cases/common/247 deprecated option/test.json @@ -0,0 +1,29 @@ +{ + "stdout": [ + { + "line": ".*DEPRECATION: Option 'o1' is deprecated", + "match": "re", + "count": 1 + }, + { + "line": ".*DEPRECATION: Option 'o2' value 'a' is deprecated", + "match": "re", + "count": 1 + }, + { + "line": ".*DEPRECATION: Option 'o3' value 'a' is replaced by 'c'", + "match": "re", + "count": 1 + }, + { + "line": ".*DEPRECATION: Option 'o4' value 'true' is replaced by 'enabled'", + "match": "re", + "count": 1 + }, + { + "line": ".*DEPRECATION: Option 'o5' value 'auto' is replaced by 'false'", + "match": "re", + "count": 1 + } + ] +} diff --git a/test cases/common/247 install_symlink/datafile.dat b/test cases/common/247 install_symlink/datafile.dat deleted file mode 100644 index ff3104b..0000000 --- a/test cases/common/247 install_symlink/datafile.dat +++ /dev/null @@ -1 +0,0 @@ -this is a data file diff --git a/test cases/common/247 install_symlink/meson.build b/test cases/common/247 install_symlink/meson.build deleted file mode 100644 index ae30382..0000000 --- a/test cases/common/247 install_symlink/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('install_emptydir') - -if build_machine.system() == 'windows' and meson.backend() == 'ninja' - error('MESON_SKIP_TEST windows does not support symlinks unless root or in development mode') -endif - -install_data('datafile.dat', install_dir: 'share/progname/C') -install_symlink('datafile.dat', pointing_to: '../C/datafile.dat', install_dir: 'share/progname/es') -install_symlink('rename_datafile.dat', pointing_to: '../C/datafile.dat', install_dir: 'share/progname/fr') diff --git a/test cases/common/247 install_symlink/test.json b/test cases/common/247 install_symlink/test.json deleted file mode 100644 index 33aa76e..0000000 --- a/test cases/common/247 install_symlink/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "installed": [ - {"type": "file", "file": "usr/share/progname/C/datafile.dat"}, - {"type": "file", "file": "usr/share/progname/es/datafile.dat"}, - {"type": "file", "file": "usr/share/progname/fr/rename_datafile.dat"} - ] -} diff --git a/test cases/common/248 install_emptydir/meson.build b/test cases/common/248 install_emptydir/meson.build new file mode 100644 index 0000000..a5eb046 --- /dev/null +++ b/test cases/common/248 install_emptydir/meson.build @@ -0,0 +1,4 @@ +project('install_emptydir') + +install_emptydir(get_option('datadir')/'new_directory', install_mode: 'rwx------') +install_emptydir(get_option('datadir')/'new_directory/subdir', install_mode: 'rwxr-----') diff --git a/test cases/common/248 install_emptydir/test.json b/test cases/common/248 install_emptydir/test.json new file mode 100644 index 0000000..17abe74 --- /dev/null +++ b/test cases/common/248 install_emptydir/test.json @@ -0,0 +1,7 @@ +{ + "installed": [ + { "type": "dir", "file": "usr/share/new_directory" }, + { "type": "dir", "file": "usr/share/new_directory/subdir" } + ] +} + diff --git a/test cases/common/249 install_symlink/datafile.dat b/test cases/common/249 install_symlink/datafile.dat new file mode 100644 index 0000000..ff3104b --- /dev/null +++ b/test cases/common/249 install_symlink/datafile.dat @@ -0,0 +1 @@ +this is a data file diff --git a/test cases/common/249 install_symlink/meson.build b/test cases/common/249 install_symlink/meson.build new file mode 100644 index 0000000..ae30382 --- /dev/null +++ b/test cases/common/249 install_symlink/meson.build @@ -0,0 +1,9 @@ +project('install_emptydir') + +if build_machine.system() == 'windows' and meson.backend() == 'ninja' + error('MESON_SKIP_TEST windows does not support symlinks unless root or in development mode') +endif + +install_data('datafile.dat', install_dir: 'share/progname/C') +install_symlink('datafile.dat', pointing_to: '../C/datafile.dat', install_dir: 'share/progname/es') +install_symlink('rename_datafile.dat', pointing_to: '../C/datafile.dat', install_dir: 'share/progname/fr') diff --git a/test cases/common/249 install_symlink/test.json b/test cases/common/249 install_symlink/test.json new file mode 100644 index 0000000..33aa76e --- /dev/null +++ b/test cases/common/249 install_symlink/test.json @@ -0,0 +1,7 @@ +{ + "installed": [ + {"type": "file", "file": "usr/share/progname/C/datafile.dat"}, + {"type": "file", "file": "usr/share/progname/es/datafile.dat"}, + {"type": "file", "file": "usr/share/progname/fr/rename_datafile.dat"} + ] +} diff --git a/test cases/failing/106 feature require.bis/meson.build b/test cases/failing/106 feature require.bis/meson.build deleted file mode 100644 index 08c099c..0000000 --- a/test cases/failing/106 feature require.bis/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback', 'c') -foo = get_option('reqfeature').require(false) diff --git a/test cases/failing/106 feature require.bis/meson_options.txt b/test cases/failing/106 feature require.bis/meson_options.txt deleted file mode 100644 index 5910a87..0000000 --- a/test cases/failing/106 feature require.bis/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/106 feature require.bis/test.json b/test cases/failing/106 feature require.bis/test.json deleted file mode 100644 index 2583990..0000000 --- a/test cases/failing/106 feature require.bis/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled" - } - ] -} diff --git a/test cases/failing/107 feature require.bis/meson.build b/test cases/failing/107 feature require.bis/meson.build new file mode 100644 index 0000000..08c099c --- /dev/null +++ b/test cases/failing/107 feature require.bis/meson.build @@ -0,0 +1,2 @@ +project('no fallback', 'c') +foo = get_option('reqfeature').require(false) diff --git a/test cases/failing/107 feature require.bis/meson_options.txt b/test cases/failing/107 feature require.bis/meson_options.txt new file mode 100644 index 0000000..5910a87 --- /dev/null +++ b/test cases/failing/107 feature require.bis/meson_options.txt @@ -0,0 +1 @@ +option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/107 feature require.bis/test.json b/test cases/failing/107 feature require.bis/test.json new file mode 100644 index 0000000..2583990 --- /dev/null +++ b/test cases/failing/107 feature require.bis/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled" + } + ] +} diff --git a/test cases/failing/107 no build get_external_property/meson.build b/test cases/failing/107 no build get_external_property/meson.build deleted file mode 100644 index 8a4215c..0000000 --- a/test cases/failing/107 no build get_external_property/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('missing property') - -message(meson.get_external_property('nonexisting', native : true)) diff --git a/test cases/failing/107 no build get_external_property/test.json b/test cases/failing/107 no build get_external_property/test.json deleted file mode 100644 index b95427e..0000000 --- a/test cases/failing/107 no build get_external_property/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/107 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting" - } - ] -} diff --git a/test cases/failing/108 enter subdir twice/meson.build b/test cases/failing/108 enter subdir twice/meson.build deleted file mode 100644 index 9343233..0000000 --- a/test cases/failing/108 enter subdir twice/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('subdir2', 'c') -subdir('sub') -subdir('sub') diff --git a/test cases/failing/108 enter subdir twice/sub/meson.build b/test cases/failing/108 enter subdir twice/sub/meson.build deleted file mode 100644 index d036a3f..0000000 --- a/test cases/failing/108 enter subdir twice/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -message('Now in subdir') diff --git a/test cases/failing/108 enter subdir twice/test.json b/test cases/failing/108 enter subdir twice/test.json deleted file mode 100644 index 0a8e127..0000000 --- a/test cases/failing/108 enter subdir twice/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/108 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." - } - ] -} diff --git a/test cases/failing/108 no build get_external_property/meson.build b/test cases/failing/108 no build get_external_property/meson.build new file mode 100644 index 0000000..8a4215c --- /dev/null +++ b/test cases/failing/108 no build get_external_property/meson.build @@ -0,0 +1,3 @@ +project('missing property') + +message(meson.get_external_property('nonexisting', native : true)) diff --git a/test cases/failing/108 no build get_external_property/test.json b/test cases/failing/108 no build get_external_property/test.json new file mode 100644 index 0000000..d2827f4 --- /dev/null +++ b/test cases/failing/108 no build get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/108 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting" + } + ] +} diff --git a/test cases/failing/109 enter subdir twice/meson.build b/test cases/failing/109 enter subdir twice/meson.build new file mode 100644 index 0000000..9343233 --- /dev/null +++ b/test cases/failing/109 enter subdir twice/meson.build @@ -0,0 +1,3 @@ +project('subdir2', 'c') +subdir('sub') +subdir('sub') diff --git a/test cases/failing/109 enter subdir twice/sub/meson.build b/test cases/failing/109 enter subdir twice/sub/meson.build new file mode 100644 index 0000000..d036a3f --- /dev/null +++ b/test cases/failing/109 enter subdir twice/sub/meson.build @@ -0,0 +1 @@ +message('Now in subdir') diff --git a/test cases/failing/109 enter subdir twice/test.json b/test cases/failing/109 enter subdir twice/test.json new file mode 100644 index 0000000..f7a526c --- /dev/null +++ b/test cases/failing/109 enter subdir twice/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/109 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." + } + ] +} diff --git a/test cases/failing/109 invalid fstring/meson.build b/test cases/failing/109 invalid fstring/meson.build deleted file mode 100644 index dd22f56..0000000 --- a/test cases/failing/109 invalid fstring/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('invalid-fstring', 'c') - -dict = {'key': true} -s = f'invalid fstring: @dict@' diff --git a/test cases/failing/109 invalid fstring/test.json b/test cases/failing/109 invalid fstring/test.json deleted file mode 100644 index 71d8f59..0000000 --- a/test cases/failing/109 invalid fstring/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/109 invalid fstring/meson.build:4:0: ERROR: Identifier \"dict\" does not name a formattable variable (has to be an integer, a string, a floating point number or a boolean)." - } - ] -} diff --git a/test cases/failing/110 invalid fstring/meson.build b/test cases/failing/110 invalid fstring/meson.build deleted file mode 100644 index 973df30..0000000 --- a/test cases/failing/110 invalid fstring/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('invalid-fstring', 'c') - -z = f'invalid fstring: @foo@' diff --git a/test cases/failing/110 invalid fstring/test.json b/test cases/failing/110 invalid fstring/test.json deleted file mode 100644 index bfd0e2d..0000000 --- a/test cases/failing/110 invalid fstring/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/110 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." - } - ] -} diff --git a/test cases/failing/111 compiler argument checking/meson.build b/test cases/failing/111 compiler argument checking/meson.build deleted file mode 100644 index bb1f447..0000000 --- a/test cases/failing/111 compiler argument checking/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('compiler argument checking test', 'c') - -cc = meson.get_compiler('c') -add_project_arguments(cc.get_supported_arguments('-meson-goober-arg-for-testing', checked : 'require'), language : 'c') diff --git a/test cases/failing/111 compiler argument checking/test.json b/test cases/failing/111 compiler argument checking/test.json deleted file mode 100644 index f41f2d2..0000000 --- a/test cases/failing/111 compiler argument checking/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/111 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" - } - ] -} diff --git a/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build b/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build new file mode 100644 index 0000000..dd22f56 --- /dev/null +++ b/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build @@ -0,0 +1,4 @@ +project('invalid-fstring', 'c') + +dict = {'key': true} +s = f'invalid fstring: @dict@' diff --git a/test cases/failing/111 invalid fstring/109 invalid fstring/test.json b/test cases/failing/111 invalid fstring/109 invalid fstring/test.json new file mode 100644 index 0000000..71d8f59 --- /dev/null +++ b/test cases/failing/111 invalid fstring/109 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/109 invalid fstring/meson.build:4:0: ERROR: Identifier \"dict\" does not name a formattable variable (has to be an integer, a string, a floating point number or a boolean)." + } + ] +} diff --git a/test cases/failing/111 invalid fstring/meson.build b/test cases/failing/111 invalid fstring/meson.build new file mode 100644 index 0000000..973df30 --- /dev/null +++ b/test cases/failing/111 invalid fstring/meson.build @@ -0,0 +1,3 @@ +project('invalid-fstring', 'c') + +z = f'invalid fstring: @foo@' diff --git a/test cases/failing/111 invalid fstring/test.json b/test cases/failing/111 invalid fstring/test.json new file mode 100644 index 0000000..89ec40c --- /dev/null +++ b/test cases/failing/111 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/111 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." + } + ] +} diff --git a/test cases/failing/112 compiler argument checking/meson.build b/test cases/failing/112 compiler argument checking/meson.build new file mode 100644 index 0000000..bb1f447 --- /dev/null +++ b/test cases/failing/112 compiler argument checking/meson.build @@ -0,0 +1,4 @@ +project('compiler argument checking test', 'c') + +cc = meson.get_compiler('c') +add_project_arguments(cc.get_supported_arguments('-meson-goober-arg-for-testing', checked : 'require'), language : 'c') diff --git a/test cases/failing/112 compiler argument checking/test.json b/test cases/failing/112 compiler argument checking/test.json new file mode 100644 index 0000000..f4728db --- /dev/null +++ b/test cases/failing/112 compiler argument checking/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/112 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" + } + ] +} diff --git a/test cases/failing/112 empty fallback/meson.build b/test cases/failing/112 empty fallback/meson.build deleted file mode 100644 index f4eb5fe..0000000 --- a/test cases/failing/112 empty fallback/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('empty fallback') - -# There is a subproject named 'foo' that overrides that dependency, -# but `fallback: []` should not allow to use it. Same behaviour than with -# `allow_fallback: false` -dependency('foo', fallback: []) diff --git a/test cases/failing/112 empty fallback/subprojects/foo/meson.build b/test cases/failing/112 empty fallback/subprojects/foo/meson.build deleted file mode 100644 index c9e134b..0000000 --- a/test cases/failing/112 empty fallback/subprojects/foo/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('foo') - -meson.override_dependency('foo', declare_dependency()) diff --git a/test cases/failing/112 empty fallback/test.json b/test cases/failing/112 empty fallback/test.json deleted file mode 100644 index 89520ef..0000000 --- a/test cases/failing/112 empty fallback/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/112 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake" - } - ] -} diff --git a/test cases/failing/113 cmake executable dependency/meson.build b/test cases/failing/113 cmake executable dependency/meson.build deleted file mode 100644 index bfb03ef..0000000 --- a/test cases/failing/113 cmake executable dependency/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('cmake-executable-dependency', ['c', 'cpp']) - -if not find_program('cmake', required: false).found() - error('MESON_SKIP_TEST CMake is not installed') -endif - -cmake = import('cmake') -cmlib = cmake.subproject('cmlib') -maind = cmlib.dependency('main') diff --git a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt deleted file mode 100644 index 0067879..0000000 --- a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(cmlib) - -add_executable(main main.c) diff --git a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c deleted file mode 100644 index 9b6bdc2..0000000 --- a/test cases/failing/113 cmake executable dependency/subprojects/cmlib/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/failing/113 cmake executable dependency/test.json b/test cases/failing/113 cmake executable dependency/test.json deleted file mode 100644 index 1cb4a0f..0000000 --- a/test cases/failing/113 cmake executable dependency/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/113 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead." - } - ] -} diff --git a/test cases/failing/113 empty fallback/meson.build b/test cases/failing/113 empty fallback/meson.build new file mode 100644 index 0000000..f4eb5fe --- /dev/null +++ b/test cases/failing/113 empty fallback/meson.build @@ -0,0 +1,6 @@ +project('empty fallback') + +# There is a subproject named 'foo' that overrides that dependency, +# but `fallback: []` should not allow to use it. Same behaviour than with +# `allow_fallback: false` +dependency('foo', fallback: []) diff --git a/test cases/failing/113 empty fallback/subprojects/foo/meson.build b/test cases/failing/113 empty fallback/subprojects/foo/meson.build new file mode 100644 index 0000000..c9e134b --- /dev/null +++ b/test cases/failing/113 empty fallback/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo') + +meson.override_dependency('foo', declare_dependency()) diff --git a/test cases/failing/113 empty fallback/test.json b/test cases/failing/113 empty fallback/test.json new file mode 100644 index 0000000..c8ed212 --- /dev/null +++ b/test cases/failing/113 empty fallback/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/113 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake" + } + ] +} diff --git a/test cases/failing/114 allow_fallback with fallback/meson.build b/test cases/failing/114 allow_fallback with fallback/meson.build deleted file mode 100644 index 2874e42..0000000 --- a/test cases/failing/114 allow_fallback with fallback/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('fallback and allow_fallback') - -dependency('foo', fallback: 'foo', allow_fallback: false) diff --git a/test cases/failing/114 allow_fallback with fallback/test.json b/test cases/failing/114 allow_fallback with fallback/test.json deleted file mode 100644 index 1e5712e..0000000 --- a/test cases/failing/114 allow_fallback with fallback/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/114 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive" - } - ] -} - diff --git a/test cases/failing/114 cmake executable dependency/meson.build b/test cases/failing/114 cmake executable dependency/meson.build new file mode 100644 index 0000000..bfb03ef --- /dev/null +++ b/test cases/failing/114 cmake executable dependency/meson.build @@ -0,0 +1,9 @@ +project('cmake-executable-dependency', ['c', 'cpp']) + +if not find_program('cmake', required: false).found() + error('MESON_SKIP_TEST CMake is not installed') +endif + +cmake = import('cmake') +cmlib = cmake.subproject('cmlib') +maind = cmlib.dependency('main') diff --git a/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt new file mode 100644 index 0000000..0067879 --- /dev/null +++ b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.5) + +project(cmlib) + +add_executable(main main.c) diff --git a/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/114 cmake executable dependency/test.json b/test cases/failing/114 cmake executable dependency/test.json new file mode 100644 index 0000000..82306dd --- /dev/null +++ b/test cases/failing/114 cmake executable dependency/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/114 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead." + } + ] +} diff --git a/test cases/failing/115 allow_fallback with fallback/meson.build b/test cases/failing/115 allow_fallback with fallback/meson.build new file mode 100644 index 0000000..2874e42 --- /dev/null +++ b/test cases/failing/115 allow_fallback with fallback/meson.build @@ -0,0 +1,3 @@ +project('fallback and allow_fallback') + +dependency('foo', fallback: 'foo', allow_fallback: false) diff --git a/test cases/failing/115 allow_fallback with fallback/test.json b/test cases/failing/115 allow_fallback with fallback/test.json new file mode 100644 index 0000000..6bdcc51 --- /dev/null +++ b/test cases/failing/115 allow_fallback with fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/115 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive" + } + ] +} + diff --git a/test cases/failing/115 nonsensical bindgen/meson.build b/test cases/failing/115 nonsensical bindgen/meson.build deleted file mode 100644 index 6995f67..0000000 --- a/test cases/failing/115 nonsensical bindgen/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-license-identifer: Apache-2.0 -# Copyright © 2021 Intel Corporation - -project('rustmod bindgen', 'c') - -if not add_languages('rust', required: false) - error('MESON_SKIP_TEST test requires rust compiler') -endif - -prog_bindgen = find_program('bindgen', required : false) -if not prog_bindgen.found() - error('MESON_SKIP_TEST bindgen not found') -endif - -c_lib = static_library('clib', 'src/source.c') - -import('unstable-rust').bindgen( - input : c_lib, - output : 'header.rs', -) diff --git a/test cases/failing/115 nonsensical bindgen/src/header.h b/test cases/failing/115 nonsensical bindgen/src/header.h deleted file mode 100644 index 750621f..0000000 --- a/test cases/failing/115 nonsensical bindgen/src/header.h +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-license-identifer: Apache-2.0 -// Copyright © 2021 Intel Corporation - -#pragma once - -#include - -int32_t add(const int32_t, const int32_t); diff --git a/test cases/failing/115 nonsensical bindgen/src/source.c b/test cases/failing/115 nonsensical bindgen/src/source.c deleted file mode 100644 index d652d28..0000000 --- a/test cases/failing/115 nonsensical bindgen/src/source.c +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-license-identifer: Apache-2.0 -// Copyright © 2021 Intel Corporation - -#include "header.h" - -int32_t add(const int32_t first, const int32_t second) { - return first + second; -} diff --git a/test cases/failing/115 nonsensical bindgen/test.json b/test cases/failing/115 nonsensical bindgen/test.json deleted file mode 100644 index d9249b2..0000000 --- a/test cases/failing/115 nonsensical bindgen/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/115 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target" - } - ] -} - diff --git a/test cases/failing/116 nonsensical bindgen/meson.build b/test cases/failing/116 nonsensical bindgen/meson.build new file mode 100644 index 0000000..6995f67 --- /dev/null +++ b/test cases/failing/116 nonsensical bindgen/meson.build @@ -0,0 +1,20 @@ +# SPDX-license-identifer: Apache-2.0 +# Copyright © 2021 Intel Corporation + +project('rustmod bindgen', 'c') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif + +prog_bindgen = find_program('bindgen', required : false) +if not prog_bindgen.found() + error('MESON_SKIP_TEST bindgen not found') +endif + +c_lib = static_library('clib', 'src/source.c') + +import('unstable-rust').bindgen( + input : c_lib, + output : 'header.rs', +) diff --git a/test cases/failing/116 nonsensical bindgen/src/header.h b/test cases/failing/116 nonsensical bindgen/src/header.h new file mode 100644 index 0000000..750621f --- /dev/null +++ b/test cases/failing/116 nonsensical bindgen/src/header.h @@ -0,0 +1,8 @@ +// SPDX-license-identifer: Apache-2.0 +// Copyright © 2021 Intel Corporation + +#pragma once + +#include + +int32_t add(const int32_t, const int32_t); diff --git a/test cases/failing/116 nonsensical bindgen/src/source.c b/test cases/failing/116 nonsensical bindgen/src/source.c new file mode 100644 index 0000000..d652d28 --- /dev/null +++ b/test cases/failing/116 nonsensical bindgen/src/source.c @@ -0,0 +1,8 @@ +// SPDX-license-identifer: Apache-2.0 +// Copyright © 2021 Intel Corporation + +#include "header.h" + +int32_t add(const int32_t first, const int32_t second) { + return first + second; +} diff --git a/test cases/failing/116 nonsensical bindgen/test.json b/test cases/failing/116 nonsensical bindgen/test.json new file mode 100644 index 0000000..b0a38e8 --- /dev/null +++ b/test cases/failing/116 nonsensical bindgen/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/116 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target" + } + ] +} + diff --git a/test cases/failing/116 run_target in test/meson.build b/test cases/failing/116 run_target in test/meson.build deleted file mode 100644 index db7cb30..0000000 --- a/test cases/failing/116 run_target in test/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('trivial test', 'c') -exe = executable('trivialprog', 'trivial.c') -runt = run_target('invalid', command: ['echo', 'run_target']) -test('runtest', exe, args: runt) diff --git a/test cases/failing/116 run_target in test/test.json b/test cases/failing/116 run_target in test/test.json deleted file mode 100644 index 961c1e4..0000000 --- a/test cases/failing/116 run_target in test/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/116 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]" - } - ] -} - diff --git a/test cases/failing/116 run_target in test/trivial.c b/test cases/failing/116 run_target in test/trivial.c deleted file mode 100644 index 96612d4..0000000 --- a/test cases/failing/116 run_target in test/trivial.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("Trivial test is working.\n"); - return 0; -} diff --git a/test cases/failing/117 run_target in add_install_script/meson.build b/test cases/failing/117 run_target in add_install_script/meson.build deleted file mode 100644 index 9d37a39..0000000 --- a/test cases/failing/117 run_target in add_install_script/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('trivial test', 'c') -exe = executable('trivialprog', 'trivial.c') -runt = run_target('invalid', command: ['echo', 'run_target']) -meson.add_install_script(exe, runt) diff --git a/test cases/failing/117 run_target in add_install_script/test.json b/test cases/failing/117 run_target in add_install_script/test.json deleted file mode 100644 index fec1941..0000000 --- a/test cases/failing/117 run_target in add_install_script/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/117 run_target in add_install_script/meson.build:4:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\"" - } - ] -} - diff --git a/test cases/failing/117 run_target in add_install_script/trivial.c b/test cases/failing/117 run_target in add_install_script/trivial.c deleted file mode 100644 index 1b14571..0000000 --- a/test cases/failing/117 run_target in add_install_script/trivial.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -int main(int argc, char **argv) { - FILE *fp = fopen(argv[1], "r"); - if (fp == NULL) { - perror("fopen"); - return 1; - } else { - return 0; - } -} diff --git a/test cases/failing/117 run_target in test/meson.build b/test cases/failing/117 run_target in test/meson.build new file mode 100644 index 0000000..db7cb30 --- /dev/null +++ b/test cases/failing/117 run_target in test/meson.build @@ -0,0 +1,4 @@ +project('trivial test', 'c') +exe = executable('trivialprog', 'trivial.c') +runt = run_target('invalid', command: ['echo', 'run_target']) +test('runtest', exe, args: runt) diff --git a/test cases/failing/117 run_target in test/test.json b/test cases/failing/117 run_target in test/test.json new file mode 100644 index 0000000..ad24367 --- /dev/null +++ b/test cases/failing/117 run_target in test/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/117 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]" + } + ] +} + diff --git a/test cases/failing/117 run_target in test/trivial.c b/test cases/failing/117 run_target in test/trivial.c new file mode 100644 index 0000000..96612d4 --- /dev/null +++ b/test cases/failing/117 run_target in test/trivial.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("Trivial test is working.\n"); + return 0; +} diff --git a/test cases/failing/118 pathsep in install_symlink/meson.build b/test cases/failing/118 pathsep in install_symlink/meson.build deleted file mode 100644 index cce82c2..0000000 --- a/test cases/failing/118 pathsep in install_symlink/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('symlink_pathsep') - -install_symlink('foo/bar', pointing_to: '/usr/baz/bar', install_dir: '/usr') diff --git a/test cases/failing/118 pathsep in install_symlink/test.json b/test cases/failing/118 pathsep in install_symlink/test.json deleted file mode 100644 index e3f3a4a..0000000 --- a/test cases/failing/118 pathsep in install_symlink/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/118 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir." - } - ] -} diff --git a/test cases/failing/118 run_target in add_install_script/meson.build b/test cases/failing/118 run_target in add_install_script/meson.build new file mode 100644 index 0000000..9d37a39 --- /dev/null +++ b/test cases/failing/118 run_target in add_install_script/meson.build @@ -0,0 +1,4 @@ +project('trivial test', 'c') +exe = executable('trivialprog', 'trivial.c') +runt = run_target('invalid', command: ['echo', 'run_target']) +meson.add_install_script(exe, runt) diff --git a/test cases/failing/118 run_target in add_install_script/test.json b/test cases/failing/118 run_target in add_install_script/test.json new file mode 100644 index 0000000..a09b1a3 --- /dev/null +++ b/test cases/failing/118 run_target in add_install_script/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/118 run_target in add_install_script/meson.build:4:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\"" + } + ] +} + diff --git a/test cases/failing/118 run_target in add_install_script/trivial.c b/test cases/failing/118 run_target in add_install_script/trivial.c new file mode 100644 index 0000000..1b14571 --- /dev/null +++ b/test cases/failing/118 run_target in add_install_script/trivial.c @@ -0,0 +1,11 @@ +#include + +int main(int argc, char **argv) { + FILE *fp = fopen(argv[1], "r"); + if (fp == NULL) { + perror("fopen"); + return 1; + } else { + return 0; + } +} diff --git a/test cases/failing/119 pathsep in install_symlink/meson.build b/test cases/failing/119 pathsep in install_symlink/meson.build new file mode 100644 index 0000000..cce82c2 --- /dev/null +++ b/test cases/failing/119 pathsep in install_symlink/meson.build @@ -0,0 +1,3 @@ +project('symlink_pathsep') + +install_symlink('foo/bar', pointing_to: '/usr/baz/bar', install_dir: '/usr') diff --git a/test cases/failing/119 pathsep in install_symlink/test.json b/test cases/failing/119 pathsep in install_symlink/test.json new file mode 100644 index 0000000..9df546a --- /dev/null +++ b/test cases/failing/119 pathsep in install_symlink/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/119 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir." + } + ] +} diff --git a/test cases/unit/100 custom target name/file.txt.in b/test cases/unit/100 custom target name/file.txt.in new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/100 custom target name/meson.build b/test cases/unit/100 custom target name/meson.build new file mode 100644 index 0000000..8d148a8 --- /dev/null +++ b/test cases/unit/100 custom target name/meson.build @@ -0,0 +1,14 @@ +project('custom target name', 'c') + +python = import('python').find_installation() + +# Name argument is optional and should default to 'file.txt' +custom_target( + input: 'file.txt.in', + output: '@BASENAME@', + command: [python, '--version'], + build_by_default: true, + capture: true, +) + +subdir('subdir') diff --git a/test cases/unit/100 custom target name/subdir/meson.build b/test cases/unit/100 custom target name/subdir/meson.build new file mode 100644 index 0000000..785a7b3 --- /dev/null +++ b/test cases/unit/100 custom target name/subdir/meson.build @@ -0,0 +1,9 @@ +# Name argument is optional and should default to 'file.txt', but should be +# displayed as 'subdir/file.txt' by ninja. +custom_target( + input: '../file.txt.in', + output: ['@BASENAME@'], + command: [python, '--version'], + build_by_default: true, + capture: true, +) diff --git a/test cases/unit/100 rlib linkage/lib2.rs b/test cases/unit/100 rlib linkage/lib2.rs deleted file mode 100644 index 3487bc5..0000000 --- a/test cases/unit/100 rlib linkage/lib2.rs +++ /dev/null @@ -1,5 +0,0 @@ -use lib; - -pub fn fun() { - lib::fun(); -} diff --git a/test cases/unit/100 rlib linkage/main.rs b/test cases/unit/100 rlib linkage/main.rs deleted file mode 100644 index d0f82e4..0000000 --- a/test cases/unit/100 rlib linkage/main.rs +++ /dev/null @@ -1,5 +0,0 @@ -use lib2::fun; - -fn main() { - fun(); -} diff --git a/test cases/unit/100 rlib linkage/meson.build b/test cases/unit/100 rlib linkage/meson.build deleted file mode 100644 index 2d15b2a..0000000 --- a/test cases/unit/100 rlib linkage/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project('rlib linkage', 'rust', default_options : ['rust_std=2018']) - -lib = static_library( - 'lib', - 'lib.rs', - rust_crate_type : 'rlib', -) - -lib2 = static_library( - 'lib2', - 'lib2.rs', - rust_crate_type : 'rlib', - link_with : lib, -) - -exe = executable( - 'exe', - 'main.rs', - link_with : lib2, -) - -test('main', exe) diff --git a/test cases/unit/101 python without pkgconfig/meson.build b/test cases/unit/101 python without pkgconfig/meson.build deleted file mode 100644 index b3a0c42..0000000 --- a/test cases/unit/101 python without pkgconfig/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('python wihtout pkgconfig', 'c') - -# This unit test is ran with PKG_CONFIG=notfound -import('python').find_installation().dependency() diff --git a/test cases/unit/101 relative find program/foo.py b/test cases/unit/101 relative find program/foo.py new file mode 100755 index 0000000..21239b7 --- /dev/null +++ b/test cases/unit/101 relative find program/foo.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +exit(0) \ No newline at end of file diff --git a/test cases/unit/101 relative find program/meson.build b/test cases/unit/101 relative find program/meson.build new file mode 100644 index 0000000..5745d8a --- /dev/null +++ b/test cases/unit/101 relative find program/meson.build @@ -0,0 +1,3 @@ +project('relative find program') + +subdir('subdir') \ No newline at end of file diff --git a/test cases/unit/101 relative find program/subdir/meson.build b/test cases/unit/101 relative find program/subdir/meson.build new file mode 100644 index 0000000..475f5f5 --- /dev/null +++ b/test cases/unit/101 relative find program/subdir/meson.build @@ -0,0 +1,2 @@ +prog = find_program('./foo.py', required: false) +assert(not prog.found()) \ No newline at end of file diff --git a/test cases/unit/102 rlib linkage/lib2.rs b/test cases/unit/102 rlib linkage/lib2.rs new file mode 100644 index 0000000..3487bc5 --- /dev/null +++ b/test cases/unit/102 rlib linkage/lib2.rs @@ -0,0 +1,5 @@ +use lib; + +pub fn fun() { + lib::fun(); +} diff --git a/test cases/unit/102 rlib linkage/main.rs b/test cases/unit/102 rlib linkage/main.rs new file mode 100644 index 0000000..d0f82e4 --- /dev/null +++ b/test cases/unit/102 rlib linkage/main.rs @@ -0,0 +1,5 @@ +use lib2::fun; + +fn main() { + fun(); +} diff --git a/test cases/unit/102 rlib linkage/meson.build b/test cases/unit/102 rlib linkage/meson.build new file mode 100644 index 0000000..2d15b2a --- /dev/null +++ b/test cases/unit/102 rlib linkage/meson.build @@ -0,0 +1,22 @@ +project('rlib linkage', 'rust', default_options : ['rust_std=2018']) + +lib = static_library( + 'lib', + 'lib.rs', + rust_crate_type : 'rlib', +) + +lib2 = static_library( + 'lib2', + 'lib2.rs', + rust_crate_type : 'rlib', + link_with : lib, +) + +exe = executable( + 'exe', + 'main.rs', + link_with : lib2, +) + +test('main', exe) diff --git a/test cases/unit/103 python without pkgconfig/meson.build b/test cases/unit/103 python without pkgconfig/meson.build new file mode 100644 index 0000000..b3a0c42 --- /dev/null +++ b/test cases/unit/103 python without pkgconfig/meson.build @@ -0,0 +1,4 @@ +project('python wihtout pkgconfig', 'c') + +# This unit test is ran with PKG_CONFIG=notfound +import('python').find_installation().dependency() diff --git a/test cases/unit/97 link full name/.gitignore b/test cases/unit/97 link full name/.gitignore deleted file mode 100644 index 8129601..0000000 --- a/test cases/unit/97 link full name/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.a -*.o -a.out -libtestprovider.a -build diff --git a/test cases/unit/97 link full name/libtestprovider/meson.build b/test cases/unit/97 link full name/libtestprovider/meson.build deleted file mode 100644 index 128c213..0000000 --- a/test cases/unit/97 link full name/libtestprovider/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -project('libtestprovider','c') - -libtestprovider=static_library('testprovider', - files('./provider.c'), - install:true, - c_args:['-Wall','-Werror'], -) - -pkg = import('pkgconfig') - - -pkg.generate( - name:'testprovider', - filebase:'libtestprovider', - description: 'fortest', - requires: [], - libraries_private: ['-Wl,--whole-archive'] + - ['-L${libdir}','-l:libtestprovider.a']+ - ['-Wl,--no-whole-archive'] -) diff --git a/test cases/unit/97 link full name/libtestprovider/provider.c b/test cases/unit/97 link full name/libtestprovider/provider.c deleted file mode 100644 index 5e79966..0000000 --- a/test cases/unit/97 link full name/libtestprovider/provider.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -static int g_checked = 0; - -static void __attribute__((constructor(101), used)) init_checked(void) { - g_checked=100; - fprintf(stdout, "inited\n"); -} - - -int get_checked(void) { - return g_checked; -} diff --git a/test cases/unit/97 link full name/proguser/meson.build b/test cases/unit/97 link full name/proguser/meson.build deleted file mode 100644 index 5be5bc9..0000000 --- a/test cases/unit/97 link full name/proguser/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('testprovider','c') - -deplib = dependency('libtestprovider', static:true) - -dprovidertest = executable('dprovidertest', - files('./receiver.c'), - dependencies:[deplib], - c_args:['-Wall','-Werror'], -) - -test('testprovider',dprovidertest) diff --git a/test cases/unit/97 link full name/proguser/receiver.c b/test cases/unit/97 link full name/proguser/receiver.c deleted file mode 100644 index 65e9d8e..0000000 --- a/test cases/unit/97 link full name/proguser/receiver.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -int __attribute__((weak)) get_checked(void) { - return -1; -} - - -#define CHECK_VALUE (100) -#define TEST_SUCCESS (0) -#define TEST_FAILTURE (-1) - -int main(void) { - if (get_checked() == CHECK_VALUE) { - fprintf(stdout,"good\n"); - return TEST_SUCCESS; - } - fprintf(stdout,"bad\n"); - return TEST_FAILTURE; -} diff --git a/test cases/unit/98 install all targets/bar-custom.txt b/test cases/unit/98 install all targets/bar-custom.txt deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/bar-devel.h b/test cases/unit/98 install all targets/bar-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/bar-notag.txt b/test cases/unit/98 install all targets/bar-notag.txt deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/custom_files/data.txt b/test cases/unit/98 install all targets/custom_files/data.txt deleted file mode 100644 index 557db03..0000000 --- a/test cases/unit/98 install all targets/custom_files/data.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/test cases/unit/98 install all targets/foo.in b/test cases/unit/98 install all targets/foo.in deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/foo1-devel.h b/test cases/unit/98 install all targets/foo1-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/lib.c b/test cases/unit/98 install all targets/lib.c deleted file mode 100644 index 2ea9c7d..0000000 --- a/test cases/unit/98 install all targets/lib.c +++ /dev/null @@ -1,9 +0,0 @@ -#if defined _WIN32 || defined __CYGWIN__ -#define DLL_PUBLIC __declspec(dllexport) -#else -#define DLL_PUBLIC -#endif - -int DLL_PUBLIC foo(void) { - return 0; -} diff --git a/test cases/unit/98 install all targets/main.c b/test cases/unit/98 install all targets/main.c deleted file mode 100644 index 0fb4389..0000000 --- a/test cases/unit/98 install all targets/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char *argv[]) { - return 0; -} diff --git a/test cases/unit/98 install all targets/meson.build b/test cases/unit/98 install all targets/meson.build deleted file mode 100644 index 94bd1fe..0000000 --- a/test cases/unit/98 install all targets/meson.build +++ /dev/null @@ -1,82 +0,0 @@ -project('install tag', 'c') - -subdir('subdir') - -# Those files should not be tagged -configure_file(input: 'foo.in', output: 'foo-notag.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -install_data('bar-notag.txt', - install_dir: get_option('datadir') -) -custom_target('ct1', - output: ['out1-notag.txt', 'out2-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) - -# Those files should be tagged as devel -install_headers('foo1-devel.h') -install_data('bar-devel.h', - install_dir: get_option('includedir'), -) -configure_file(input: 'foo.in', output: 'foo2-devel.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('includedir'), - install: true, -) -static_library('static', 'lib.c', - install: true, -) - -# Those files should have 'runtime' tag -executable('app', 'main.c', - install: true, -) -shared_library('shared', 'lib.c', - install: true, -) -both_libraries('both', 'lib.c', - install: true, -) - -# Those files should have custom tag -install_data('bar-custom.txt', - install_dir: get_option('datadir'), - install_tag: 'custom') -configure_file(input: 'foo.in', output: 'foo-custom.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install_tag: 'custom', - install: true, -) -both_libraries('bothcustom', 'lib.c', - install_tag: 'custom', - install: true, -) -custom_target('ct2', - output: ['out1-custom.txt', 'out2-custom.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install_tag: 'custom', - install: true, -) -install_subdir('custom_files', - install_dir: get_option('datadir'), - install_tag: 'custom', -) - -# First is custom, 2nd is devel, 3rd has no tag -custom_target('ct3', - output: ['out3-custom.txt', 'out-devel.h', 'out3-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: [get_option('datadir'), get_option('includedir'), get_option('datadir')], - install_tag: ['custom', 'devel', false], - install: true, -) - -meson.add_install_script('script.py', install_tag: 'custom') -meson.add_install_script('script.py') diff --git a/test cases/unit/98 install all targets/script.py b/test cases/unit/98 install all targets/script.py deleted file mode 100644 index c5f3be9..0000000 --- a/test cases/unit/98 install all targets/script.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -for f in sys.argv[1:]: - with open(f, 'w') as f: - pass diff --git a/test cases/unit/98 install all targets/subdir/bar2-devel.h b/test cases/unit/98 install all targets/subdir/bar2-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/subdir/foo2.in b/test cases/unit/98 install all targets/subdir/foo2.in deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/subdir/foo3-devel.h b/test cases/unit/98 install all targets/subdir/foo3-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/98 install all targets/subdir/lib.c b/test cases/unit/98 install all targets/subdir/lib.c deleted file mode 100644 index 2ea9c7d..0000000 --- a/test cases/unit/98 install all targets/subdir/lib.c +++ /dev/null @@ -1,9 +0,0 @@ -#if defined _WIN32 || defined __CYGWIN__ -#define DLL_PUBLIC __declspec(dllexport) -#else -#define DLL_PUBLIC -#endif - -int DLL_PUBLIC foo(void) { - return 0; -} diff --git a/test cases/unit/98 install all targets/subdir/main.c b/test cases/unit/98 install all targets/subdir/main.c deleted file mode 100644 index 0fb4389..0000000 --- a/test cases/unit/98 install all targets/subdir/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char *argv[]) { - return 0; -} diff --git a/test cases/unit/98 install all targets/subdir/meson.build b/test cases/unit/98 install all targets/subdir/meson.build deleted file mode 100644 index 53c796a..0000000 --- a/test cases/unit/98 install all targets/subdir/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -configure_file(input: 'foo2.in', output: 'foo2.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -custom_target('ct4', - output: ['out1.txt', 'out2.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) -install_headers('foo3-devel.h') -install_data('bar2-devel.h', - install_dir: get_option('includedir'), -) -executable('app2', 'main.c', - install: true, -) -both_libraries('both2', 'lib.c', - install: true, -) diff --git a/test cases/unit/98 install all targets/subdir/script.py b/test cases/unit/98 install all targets/subdir/script.py deleted file mode 100644 index c5f3be9..0000000 --- a/test cases/unit/98 install all targets/subdir/script.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -for f in sys.argv[1:]: - with open(f, 'w') as f: - pass diff --git a/test cases/unit/98 link full name/.gitignore b/test cases/unit/98 link full name/.gitignore new file mode 100644 index 0000000..8129601 --- /dev/null +++ b/test cases/unit/98 link full name/.gitignore @@ -0,0 +1,5 @@ +*.a +*.o +a.out +libtestprovider.a +build diff --git a/test cases/unit/98 link full name/libtestprovider/meson.build b/test cases/unit/98 link full name/libtestprovider/meson.build new file mode 100644 index 0000000..128c213 --- /dev/null +++ b/test cases/unit/98 link full name/libtestprovider/meson.build @@ -0,0 +1,20 @@ +project('libtestprovider','c') + +libtestprovider=static_library('testprovider', + files('./provider.c'), + install:true, + c_args:['-Wall','-Werror'], +) + +pkg = import('pkgconfig') + + +pkg.generate( + name:'testprovider', + filebase:'libtestprovider', + description: 'fortest', + requires: [], + libraries_private: ['-Wl,--whole-archive'] + + ['-L${libdir}','-l:libtestprovider.a']+ + ['-Wl,--no-whole-archive'] +) diff --git a/test cases/unit/98 link full name/libtestprovider/provider.c b/test cases/unit/98 link full name/libtestprovider/provider.c new file mode 100644 index 0000000..5e79966 --- /dev/null +++ b/test cases/unit/98 link full name/libtestprovider/provider.c @@ -0,0 +1,12 @@ +#include +static int g_checked = 0; + +static void __attribute__((constructor(101), used)) init_checked(void) { + g_checked=100; + fprintf(stdout, "inited\n"); +} + + +int get_checked(void) { + return g_checked; +} diff --git a/test cases/unit/98 link full name/proguser/meson.build b/test cases/unit/98 link full name/proguser/meson.build new file mode 100644 index 0000000..5be5bc9 --- /dev/null +++ b/test cases/unit/98 link full name/proguser/meson.build @@ -0,0 +1,11 @@ +project('testprovider','c') + +deplib = dependency('libtestprovider', static:true) + +dprovidertest = executable('dprovidertest', + files('./receiver.c'), + dependencies:[deplib], + c_args:['-Wall','-Werror'], +) + +test('testprovider',dprovidertest) diff --git a/test cases/unit/98 link full name/proguser/receiver.c b/test cases/unit/98 link full name/proguser/receiver.c new file mode 100644 index 0000000..65e9d8e --- /dev/null +++ b/test cases/unit/98 link full name/proguser/receiver.c @@ -0,0 +1,18 @@ +#include +int __attribute__((weak)) get_checked(void) { + return -1; +} + + +#define CHECK_VALUE (100) +#define TEST_SUCCESS (0) +#define TEST_FAILTURE (-1) + +int main(void) { + if (get_checked() == CHECK_VALUE) { + fprintf(stdout,"good\n"); + return TEST_SUCCESS; + } + fprintf(stdout,"bad\n"); + return TEST_FAILTURE; +} diff --git a/test cases/unit/99 custom target name/file.txt.in b/test cases/unit/99 custom target name/file.txt.in deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 custom target name/meson.build b/test cases/unit/99 custom target name/meson.build deleted file mode 100644 index 8d148a8..0000000 --- a/test cases/unit/99 custom target name/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('custom target name', 'c') - -python = import('python').find_installation() - -# Name argument is optional and should default to 'file.txt' -custom_target( - input: 'file.txt.in', - output: '@BASENAME@', - command: [python, '--version'], - build_by_default: true, - capture: true, -) - -subdir('subdir') diff --git a/test cases/unit/99 custom target name/subdir/meson.build b/test cases/unit/99 custom target name/subdir/meson.build deleted file mode 100644 index 785a7b3..0000000 --- a/test cases/unit/99 custom target name/subdir/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -# Name argument is optional and should default to 'file.txt', but should be -# displayed as 'subdir/file.txt' by ninja. -custom_target( - input: '../file.txt.in', - output: ['@BASENAME@'], - command: [python, '--version'], - build_by_default: true, - capture: true, -) diff --git a/test cases/unit/99 install all targets/bar-custom.txt b/test cases/unit/99 install all targets/bar-custom.txt new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/bar-devel.h b/test cases/unit/99 install all targets/bar-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/bar-notag.txt b/test cases/unit/99 install all targets/bar-notag.txt new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/custom_files/data.txt b/test cases/unit/99 install all targets/custom_files/data.txt new file mode 100644 index 0000000..557db03 --- /dev/null +++ b/test cases/unit/99 install all targets/custom_files/data.txt @@ -0,0 +1 @@ +Hello World diff --git a/test cases/unit/99 install all targets/foo.in b/test cases/unit/99 install all targets/foo.in new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/foo1-devel.h b/test cases/unit/99 install all targets/foo1-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/lib.c b/test cases/unit/99 install all targets/lib.c new file mode 100644 index 0000000..2ea9c7d --- /dev/null +++ b/test cases/unit/99 install all targets/lib.c @@ -0,0 +1,9 @@ +#if defined _WIN32 || defined __CYGWIN__ +#define DLL_PUBLIC __declspec(dllexport) +#else +#define DLL_PUBLIC +#endif + +int DLL_PUBLIC foo(void) { + return 0; +} diff --git a/test cases/unit/99 install all targets/main.c b/test cases/unit/99 install all targets/main.c new file mode 100644 index 0000000..0fb4389 --- /dev/null +++ b/test cases/unit/99 install all targets/main.c @@ -0,0 +1,3 @@ +int main(int argc, char *argv[]) { + return 0; +} diff --git a/test cases/unit/99 install all targets/meson.build b/test cases/unit/99 install all targets/meson.build new file mode 100644 index 0000000..94bd1fe --- /dev/null +++ b/test cases/unit/99 install all targets/meson.build @@ -0,0 +1,82 @@ +project('install tag', 'c') + +subdir('subdir') + +# Those files should not be tagged +configure_file(input: 'foo.in', output: 'foo-notag.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +install_data('bar-notag.txt', + install_dir: get_option('datadir') +) +custom_target('ct1', + output: ['out1-notag.txt', 'out2-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) + +# Those files should be tagged as devel +install_headers('foo1-devel.h') +install_data('bar-devel.h', + install_dir: get_option('includedir'), +) +configure_file(input: 'foo.in', output: 'foo2-devel.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('includedir'), + install: true, +) +static_library('static', 'lib.c', + install: true, +) + +# Those files should have 'runtime' tag +executable('app', 'main.c', + install: true, +) +shared_library('shared', 'lib.c', + install: true, +) +both_libraries('both', 'lib.c', + install: true, +) + +# Those files should have custom tag +install_data('bar-custom.txt', + install_dir: get_option('datadir'), + install_tag: 'custom') +configure_file(input: 'foo.in', output: 'foo-custom.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install_tag: 'custom', + install: true, +) +both_libraries('bothcustom', 'lib.c', + install_tag: 'custom', + install: true, +) +custom_target('ct2', + output: ['out1-custom.txt', 'out2-custom.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install_tag: 'custom', + install: true, +) +install_subdir('custom_files', + install_dir: get_option('datadir'), + install_tag: 'custom', +) + +# First is custom, 2nd is devel, 3rd has no tag +custom_target('ct3', + output: ['out3-custom.txt', 'out-devel.h', 'out3-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: [get_option('datadir'), get_option('includedir'), get_option('datadir')], + install_tag: ['custom', 'devel', false], + install: true, +) + +meson.add_install_script('script.py', install_tag: 'custom') +meson.add_install_script('script.py') diff --git a/test cases/unit/99 install all targets/script.py b/test cases/unit/99 install all targets/script.py new file mode 100644 index 0000000..c5f3be9 --- /dev/null +++ b/test cases/unit/99 install all targets/script.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +for f in sys.argv[1:]: + with open(f, 'w') as f: + pass diff --git a/test cases/unit/99 install all targets/subdir/bar2-devel.h b/test cases/unit/99 install all targets/subdir/bar2-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/subdir/foo2.in b/test cases/unit/99 install all targets/subdir/foo2.in new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/subdir/foo3-devel.h b/test cases/unit/99 install all targets/subdir/foo3-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 install all targets/subdir/lib.c b/test cases/unit/99 install all targets/subdir/lib.c new file mode 100644 index 0000000..2ea9c7d --- /dev/null +++ b/test cases/unit/99 install all targets/subdir/lib.c @@ -0,0 +1,9 @@ +#if defined _WIN32 || defined __CYGWIN__ +#define DLL_PUBLIC __declspec(dllexport) +#else +#define DLL_PUBLIC +#endif + +int DLL_PUBLIC foo(void) { + return 0; +} diff --git a/test cases/unit/99 install all targets/subdir/main.c b/test cases/unit/99 install all targets/subdir/main.c new file mode 100644 index 0000000..0fb4389 --- /dev/null +++ b/test cases/unit/99 install all targets/subdir/main.c @@ -0,0 +1,3 @@ +int main(int argc, char *argv[]) { + return 0; +} diff --git a/test cases/unit/99 install all targets/subdir/meson.build b/test cases/unit/99 install all targets/subdir/meson.build new file mode 100644 index 0000000..53c796a --- /dev/null +++ b/test cases/unit/99 install all targets/subdir/meson.build @@ -0,0 +1,21 @@ +configure_file(input: 'foo2.in', output: 'foo2.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +custom_target('ct4', + output: ['out1.txt', 'out2.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) +install_headers('foo3-devel.h') +install_data('bar2-devel.h', + install_dir: get_option('includedir'), +) +executable('app2', 'main.c', + install: true, +) +both_libraries('both2', 'lib.c', + install: true, +) diff --git a/test cases/unit/99 install all targets/subdir/script.py b/test cases/unit/99 install all targets/subdir/script.py new file mode 100644 index 0000000..c5f3be9 --- /dev/null +++ b/test cases/unit/99 install all targets/subdir/script.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +for f in sys.argv[1:]: + with open(f, 'w') as f: + pass diff --git a/test cases/unit/99 relative find program/foo.py b/test cases/unit/99 relative find program/foo.py deleted file mode 100755 index 21239b7..0000000 --- a/test cases/unit/99 relative find program/foo.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 - -exit(0) \ No newline at end of file diff --git a/test cases/unit/99 relative find program/meson.build b/test cases/unit/99 relative find program/meson.build deleted file mode 100644 index 5745d8a..0000000 --- a/test cases/unit/99 relative find program/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('relative find program') - -subdir('subdir') \ No newline at end of file diff --git a/test cases/unit/99 relative find program/subdir/meson.build b/test cases/unit/99 relative find program/subdir/meson.build deleted file mode 100644 index 475f5f5..0000000 --- a/test cases/unit/99 relative find program/subdir/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -prog = find_program('./foo.py', required: false) -assert(not prog.found()) \ No newline at end of file -- cgit v1.1