From bf9ff6e5eee7a5b7bfb2b50b0dc5bf948e87eaae Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Fri, 1 Aug 2025 15:33:41 +0300 Subject: Condense test directory names for 1.9. --- 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 relative find program/foo.py | 3 - .../unit/100 relative find program/meson.build | 3 - .../100 relative find program/subdir/meson.build | 2 - 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/101 rlib linkage/lib2.rs | 5 - test cases/unit/101 rlib linkage/main.rs | 5 - test cases/unit/101 rlib linkage/meson.build | 22 -- .../unit/102 python without pkgconfig/meson.build | 4 - 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/103 strip/lib.c | 3 - test cases/unit/103 strip/meson.build | 3 - test cases/unit/104 debug function/meson.build | 4 - test cases/unit/104 strip/lib.c | 3 + test cases/unit/104 strip/meson.build | 3 + test cases/unit/105 debug function/meson.build | 4 + .../meson.build | 15 -- .../meson.build | 15 ++ test cases/unit/106 underspecified mtest/main.c | 1 - .../unit/106 underspecified mtest/meson.build | 8 - test cases/unit/106 underspecified mtest/runner.py | 5 - test cases/unit/107 subproject symlink/cp.py | 6 - test cases/unit/107 subproject symlink/main.c | 6 - test cases/unit/107 subproject symlink/meson.build | 15 -- .../symlinked_subproject/datadir/datafile | 1 - .../symlinked_subproject/datadir/meson.build | 1 - .../symlinked_subproject/meson.build | 10 - .../symlinked_subproject/src.c | 4 - test cases/unit/107 underspecified mtest/main.c | 1 + .../unit/107 underspecified mtest/meson.build | 8 + test cases/unit/107 underspecified mtest/runner.py | 5 + .../108 new subproject on reconfigure/meson.build | 3 - .../meson_options.txt | 1 - .../subprojects/foo/foo.c | 2 - .../subprojects/foo/meson.build | 8 - test cases/unit/108 subproject symlink/cp.py | 6 + test cases/unit/108 subproject symlink/main.c | 6 + test cases/unit/108 subproject symlink/meson.build | 15 ++ .../symlinked_subproject/datadir/datafile | 1 + .../symlinked_subproject/datadir/meson.build | 1 + .../symlinked_subproject/meson.build | 10 + .../symlinked_subproject/src.c | 4 + .../unit/109 configure same noop/meson.build | 1 - .../unit/109 configure same noop/meson_options.txt | 6 - .../109 new subproject on reconfigure/meson.build | 3 + .../meson_options.txt | 1 + .../subprojects/foo/foo.c | 2 + .../subprojects/foo/meson.build | 8 + .../unit/110 configure same noop/meson.build | 1 + .../unit/110 configure same noop/meson_options.txt | 6 + test cases/unit/110 freeze/freeze.c | 21 -- test cases/unit/110 freeze/meson.build | 4 - test cases/unit/111 freeze/freeze.c | 21 ++ test cases/unit/111 freeze/meson.build | 4 + .../111 replace unencodable xml chars/meson.build | 4 - .../111 replace unencodable xml chars/script.py | 37 ---- .../unit/112 classpath/com/mesonbuild/Simple.java | 7 - test cases/unit/112 classpath/meson.build | 14 -- .../112 replace unencodable xml chars/meson.build | 4 + .../112 replace unencodable xml chars/script.py | 37 ++++ .../unit/113 classpath/com/mesonbuild/Simple.java | 7 + test cases/unit/113 classpath/meson.build | 14 ++ test cases/unit/113 list build options/meson.build | 6 - .../unit/113 list build options/meson_options.txt | 1 - test cases/unit/114 complex link cases/main.c | 6 - test cases/unit/114 complex link cases/meson.build | 111 ---------- test cases/unit/114 complex link cases/s1.c | 3 - test cases/unit/114 complex link cases/s2.c | 5 - test cases/unit/114 complex link cases/s3.c | 5 - test cases/unit/114 list build options/meson.build | 6 + .../unit/114 list build options/meson_options.txt | 1 + test cases/unit/115 c cpp stds/meson.build | 17 -- test cases/unit/115 c cpp stds/meson.options | 5 - test cases/unit/115 complex link cases/main.c | 6 + test cases/unit/115 complex link cases/meson.build | 111 ++++++++++ test cases/unit/115 complex link cases/s1.c | 3 + test cases/unit/115 complex link cases/s2.c | 5 + test cases/unit/115 complex link cases/s3.c | 5 + test cases/unit/116 c cpp stds/meson.build | 17 ++ test cases/unit/116 c cpp stds/meson.options | 5 + .../unit/116 empty project/expected_mods.json | 244 --------------------- test cases/unit/116 empty project/meson.build | 1 - .../unit/117 empty project/expected_mods.json | 244 +++++++++++++++++++++ test cases/unit/117 empty project/meson.build | 1 + test cases/unit/117 genvslite/main.cpp | 10 - test cases/unit/117 genvslite/meson.build | 5 - test cases/unit/118 genvslite/main.cpp | 10 + test cases/unit/118 genvslite/meson.build | 5 + .../cache_dir/bar/meson.build | 1 - .../118 meson package cache dir/cache_dir/foo.zip | Bin 373 -> 0 bytes .../unit/118 meson package cache dir/meson.build | 4 - .../subprojects/bar.wrap | 3 - .../subprojects/foo.wrap | 5 - .../cache_dir/bar/meson.build | 1 + .../119 meson package cache dir/cache_dir/foo.zip | Bin 0 -> 373 bytes .../unit/119 meson package cache dir/meson.build | 4 + .../subprojects/bar.wrap | 3 + .../subprojects/foo.wrap | 5 + test cases/unit/119 openssl cmake bug/meson.build | 5 - .../unit/119 openssl cmake bug/nativefile.ini | 7 - test cases/unit/120 openssl cmake bug/meson.build | 5 + .../unit/120 openssl cmake bug/nativefile.ini | 7 + test cases/unit/120 rewrite/meson.build | 200 ----------------- test cases/unit/121 executable suffix/main.c | 1 - test cases/unit/121 executable suffix/meson.build | 3 - test cases/unit/121 rewrite/meson.build | 200 +++++++++++++++++ test cases/unit/122 executable suffix/main.c | 1 + test cases/unit/122 executable suffix/meson.build | 3 + test cases/unit/122 persp options/meson.build | 24 -- test cases/unit/122 persp options/meson.options | 1 - .../122 persp options/subprojects/sub1/meson.build | 22 -- .../subprojects/sub1/meson.options | 1 - .../unit/122 persp options/subprojects/sub1/sub1.c | 6 - .../122 persp options/subprojects/sub2/meson.build | 21 -- .../subprojects/sub2/meson.options | 1 - .../unit/122 persp options/subprojects/sub2/sub2.c | 6 - test cases/unit/122 persp options/toplevel.c | 6 - test cases/unit/123 persp options/meson.build | 24 ++ test cases/unit/123 persp options/meson.options | 1 + .../123 persp options/subprojects/sub1/meson.build | 22 ++ .../subprojects/sub1/meson.options | 1 + .../unit/123 persp options/subprojects/sub1/sub1.c | 6 + .../123 persp options/subprojects/sub2/meson.build | 21 ++ .../subprojects/sub2/meson.options | 1 + .../unit/123 persp options/subprojects/sub2/sub2.c | 6 + test cases/unit/123 persp options/toplevel.c | 6 + .../unit/123 reconfigure base options/meson.build | 7 - .../subprojects/sub/meson.build | 5 - test cases/unit/124 interactive tap/meson.build | 4 - test cases/unit/124 interactive tap/script.py | 5 - .../unit/124 reconfigure base options/meson.build | 7 + .../subprojects/sub/meson.build | 5 + test cases/unit/125 declare_dep var/meson.build | 7 - .../unit/125 declare_dep var/meson_options.txt | 1 - test cases/unit/125 interactive tap/meson.build | 4 + test cases/unit/125 interactive tap/script.py | 5 + test cases/unit/125 pkgsubproj/meson.build | 3 - .../125 pkgsubproj/subprojects/sub/meson.build | 1 - test cases/unit/126 declare_dep var/meson.build | 7 + .../unit/126 declare_dep var/meson_options.txt | 1 + test cases/unit/126 test slice/meson.build | 12 - test cases/unit/126 test slice/test.py | 0 test cases/unit/127 pkgsubproj/meson.build | 3 + .../127 pkgsubproj/subprojects/sub/meson.build | 1 + test cases/unit/127 sanitizers/meson.build | 8 - test cases/unit/128 long opt vs D/meson.build | 1 - .../unit/128 long opt vs D/meson_options.txt | 1 - test cases/unit/128 test slice/meson.build | 12 + test cases/unit/128 test slice/test.py | 0 test cases/unit/129 sanitizers/meson.build | 8 + test cases/unit/129 vala internal glib/lib.vala | 3 - test cases/unit/129 vala internal glib/meson.build | 21 -- .../unit/129 vala internal glib/meson.options | 1 - test cases/unit/130 long opt vs D/meson.build | 1 + .../unit/130 long opt vs D/meson_options.txt | 1 + test cases/unit/131 vala internal glib/lib.vala | 3 + test cases/unit/131 vala internal glib/meson.build | 21 ++ .../unit/131 vala internal glib/meson.options | 1 + test cases/unit/91 install skip subprojects/foo.c | 4 - .../unit/91 install skip subprojects/foo.dat | 1 - test cases/unit/91 install skip subprojects/foo.h | 1 - .../unit/91 install skip subprojects/foo/foofile | 0 .../unit/91 install skip subprojects/meson.build | 8 - .../subprojects/bar/bar.c | 4 - .../subprojects/bar/bar.dat | 1 - .../subprojects/bar/bar.h | 1 - .../subprojects/bar/bar/barfile | 1 - .../subprojects/bar/meson.build | 6 - test cases/unit/92 install skip subprojects/foo.c | 4 + .../unit/92 install skip subprojects/foo.dat | 1 + test cases/unit/92 install skip subprojects/foo.h | 1 + .../unit/92 install skip subprojects/foo/foofile | 0 .../unit/92 install skip subprojects/meson.build | 8 + .../subprojects/bar/bar.c | 4 + .../subprojects/bar/bar.dat | 1 + .../subprojects/bar/bar.h | 1 + .../subprojects/bar/bar/barfile | 1 + .../subprojects/bar/meson.build | 6 + .../meson.build | 7 - .../meson_options.txt | 3 - .../subprojects/sub/foo.c | 6 - .../subprojects/sub/meson.build | 7 - test cases/unit/93 clangformat/.clang-format | 4 - .../unit/93 clangformat/.clang-format-ignore | 3 - .../unit/93 clangformat/.clang-format-include | 3 - test cases/unit/93 clangformat/meson.build | 1 - .../unit/93 clangformat/not-included/badformat.cpp | 2 - test cases/unit/93 clangformat/src/badformat.c | 2 - test cases/unit/93 clangformat/src/badformat.cpp | 2 - .../meson.build | 7 + .../meson_options.txt | 3 + .../subprojects/sub/foo.c | 6 + .../subprojects/sub/meson.build | 7 + test cases/unit/94 clangformat/.clang-format | 4 + .../unit/94 clangformat/.clang-format-ignore | 3 + .../unit/94 clangformat/.clang-format-include | 3 + test cases/unit/94 clangformat/meson.build | 1 + .../unit/94 clangformat/not-included/badformat.cpp | 2 + test cases/unit/94 clangformat/src/badformat.c | 2 + test cases/unit/94 clangformat/src/badformat.cpp | 2 + test cases/unit/94 custominc/easytogrepfor/genh.py | 7 - .../unit/94 custominc/easytogrepfor/meson.build | 3 - test cases/unit/94 custominc/helper.c | 5 - test cases/unit/94 custominc/meson.build | 9 - test cases/unit/94 custominc/prog.c | 9 - test cases/unit/94 custominc/prog2.c | 10 - test cases/unit/95 custominc/easytogrepfor/genh.py | 7 + .../unit/95 custominc/easytogrepfor/meson.build | 3 + test cases/unit/95 custominc/helper.c | 5 + test cases/unit/95 custominc/meson.build | 9 + test cases/unit/95 custominc/prog.c | 9 + test cases/unit/95 custominc/prog2.c | 10 + .../unit/95 implicit force fallback/meson.build | 8 - .../subprojects/something/meson.build | 3 - .../unit/96 compiler.links file arg/meson.build | 11 - test cases/unit/96 compiler.links file arg/test.c | 1 - .../unit/96 implicit force fallback/meson.build | 8 + .../subprojects/something/meson.build | 3 + .../unit/97 compiler.links file arg/meson.build | 11 + test cases/unit/97 compiler.links file arg/test.c | 1 + 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 - .../98 install all targets/excludes/excluded.txt | 1 - .../excludes/excluded/placeholder.txt | 1 - .../98 install all targets/excludes/installed.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 | 116 ---------- 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 - .../subprojects/subproject/aaa.txt | 1 - .../subprojects/subproject/bbb.txt | 1 - .../subprojects/subproject/meson.build | 5 - 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 + .../99 install all targets/excludes/excluded.txt | 1 + .../excludes/excluded/placeholder.txt | 1 + .../99 install all targets/excludes/installed.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 | 116 ++++++++++ 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 + .../subprojects/subproject/aaa.txt | 1 + .../subprojects/subproject/bbb.txt | 1 + .../subprojects/subproject/meson.build | 5 + 286 files changed, 1458 insertions(+), 1458 deletions(-) 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 100755 test cases/unit/100 relative find program/foo.py delete mode 100644 test cases/unit/100 relative find program/meson.build delete mode 100644 test cases/unit/100 relative find program/subdir/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 delete mode 100644 test cases/unit/101 rlib linkage/lib2.rs delete mode 100644 test cases/unit/101 rlib linkage/main.rs delete mode 100644 test cases/unit/101 rlib linkage/meson.build delete mode 100644 test cases/unit/102 python without pkgconfig/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/103 strip/lib.c delete mode 100644 test cases/unit/103 strip/meson.build delete mode 100644 test cases/unit/104 debug function/meson.build create mode 100644 test cases/unit/104 strip/lib.c create mode 100644 test cases/unit/104 strip/meson.build create mode 100644 test cases/unit/105 debug function/meson.build delete mode 100644 test cases/unit/105 pkgconfig relocatable with absolute path/meson.build create mode 100644 test cases/unit/106 pkgconfig relocatable with absolute path/meson.build delete mode 100644 test cases/unit/106 underspecified mtest/main.c delete mode 100644 test cases/unit/106 underspecified mtest/meson.build delete mode 100755 test cases/unit/106 underspecified mtest/runner.py delete mode 100644 test cases/unit/107 subproject symlink/cp.py delete mode 100644 test cases/unit/107 subproject symlink/main.c delete mode 100644 test cases/unit/107 subproject symlink/meson.build delete mode 100644 test cases/unit/107 subproject symlink/symlinked_subproject/datadir/datafile delete mode 100644 test cases/unit/107 subproject symlink/symlinked_subproject/datadir/meson.build delete mode 100644 test cases/unit/107 subproject symlink/symlinked_subproject/meson.build delete mode 100644 test cases/unit/107 subproject symlink/symlinked_subproject/src.c create mode 100644 test cases/unit/107 underspecified mtest/main.c create mode 100644 test cases/unit/107 underspecified mtest/meson.build create mode 100755 test cases/unit/107 underspecified mtest/runner.py delete mode 100644 test cases/unit/108 new subproject on reconfigure/meson.build delete mode 100644 test cases/unit/108 new subproject on reconfigure/meson_options.txt delete mode 100644 test cases/unit/108 new subproject on reconfigure/subprojects/foo/foo.c delete mode 100644 test cases/unit/108 new subproject on reconfigure/subprojects/foo/meson.build create mode 100644 test cases/unit/108 subproject symlink/cp.py create mode 100644 test cases/unit/108 subproject symlink/main.c create mode 100644 test cases/unit/108 subproject symlink/meson.build create mode 100644 test cases/unit/108 subproject symlink/symlinked_subproject/datadir/datafile create mode 100644 test cases/unit/108 subproject symlink/symlinked_subproject/datadir/meson.build create mode 100644 test cases/unit/108 subproject symlink/symlinked_subproject/meson.build create mode 100644 test cases/unit/108 subproject symlink/symlinked_subproject/src.c delete mode 100644 test cases/unit/109 configure same noop/meson.build delete mode 100644 test cases/unit/109 configure same noop/meson_options.txt create mode 100644 test cases/unit/109 new subproject on reconfigure/meson.build create mode 100644 test cases/unit/109 new subproject on reconfigure/meson_options.txt create mode 100644 test cases/unit/109 new subproject on reconfigure/subprojects/foo/foo.c create mode 100644 test cases/unit/109 new subproject on reconfigure/subprojects/foo/meson.build create mode 100644 test cases/unit/110 configure same noop/meson.build create mode 100644 test cases/unit/110 configure same noop/meson_options.txt delete mode 100644 test cases/unit/110 freeze/freeze.c delete mode 100644 test cases/unit/110 freeze/meson.build create mode 100644 test cases/unit/111 freeze/freeze.c create mode 100644 test cases/unit/111 freeze/meson.build delete mode 100644 test cases/unit/111 replace unencodable xml chars/meson.build delete mode 100644 test cases/unit/111 replace unencodable xml chars/script.py delete mode 100644 test cases/unit/112 classpath/com/mesonbuild/Simple.java delete mode 100644 test cases/unit/112 classpath/meson.build create mode 100644 test cases/unit/112 replace unencodable xml chars/meson.build create mode 100644 test cases/unit/112 replace unencodable xml chars/script.py create mode 100644 test cases/unit/113 classpath/com/mesonbuild/Simple.java create mode 100644 test cases/unit/113 classpath/meson.build delete mode 100644 test cases/unit/113 list build options/meson.build delete mode 100644 test cases/unit/113 list build options/meson_options.txt delete mode 100644 test cases/unit/114 complex link cases/main.c delete mode 100644 test cases/unit/114 complex link cases/meson.build delete mode 100644 test cases/unit/114 complex link cases/s1.c delete mode 100644 test cases/unit/114 complex link cases/s2.c delete mode 100644 test cases/unit/114 complex link cases/s3.c create mode 100644 test cases/unit/114 list build options/meson.build create mode 100644 test cases/unit/114 list build options/meson_options.txt delete mode 100644 test cases/unit/115 c cpp stds/meson.build delete mode 100644 test cases/unit/115 c cpp stds/meson.options create mode 100644 test cases/unit/115 complex link cases/main.c create mode 100644 test cases/unit/115 complex link cases/meson.build create mode 100644 test cases/unit/115 complex link cases/s1.c create mode 100644 test cases/unit/115 complex link cases/s2.c create mode 100644 test cases/unit/115 complex link cases/s3.c create mode 100644 test cases/unit/116 c cpp stds/meson.build create mode 100644 test cases/unit/116 c cpp stds/meson.options delete mode 100644 test cases/unit/116 empty project/expected_mods.json delete mode 100644 test cases/unit/116 empty project/meson.build create mode 100644 test cases/unit/117 empty project/expected_mods.json create mode 100644 test cases/unit/117 empty project/meson.build delete mode 100644 test cases/unit/117 genvslite/main.cpp delete mode 100644 test cases/unit/117 genvslite/meson.build create mode 100644 test cases/unit/118 genvslite/main.cpp create mode 100644 test cases/unit/118 genvslite/meson.build delete mode 100644 test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build delete mode 100644 test cases/unit/118 meson package cache dir/cache_dir/foo.zip delete mode 100644 test cases/unit/118 meson package cache dir/meson.build delete mode 100644 test cases/unit/118 meson package cache dir/subprojects/bar.wrap delete mode 100644 test cases/unit/118 meson package cache dir/subprojects/foo.wrap create mode 100644 test cases/unit/119 meson package cache dir/cache_dir/bar/meson.build create mode 100644 test cases/unit/119 meson package cache dir/cache_dir/foo.zip create mode 100644 test cases/unit/119 meson package cache dir/meson.build create mode 100644 test cases/unit/119 meson package cache dir/subprojects/bar.wrap create mode 100644 test cases/unit/119 meson package cache dir/subprojects/foo.wrap delete mode 100644 test cases/unit/119 openssl cmake bug/meson.build delete mode 100644 test cases/unit/119 openssl cmake bug/nativefile.ini create mode 100644 test cases/unit/120 openssl cmake bug/meson.build create mode 100644 test cases/unit/120 openssl cmake bug/nativefile.ini delete mode 100644 test cases/unit/120 rewrite/meson.build delete mode 100644 test cases/unit/121 executable suffix/main.c delete mode 100644 test cases/unit/121 executable suffix/meson.build create mode 100644 test cases/unit/121 rewrite/meson.build create mode 100644 test cases/unit/122 executable suffix/main.c create mode 100644 test cases/unit/122 executable suffix/meson.build delete mode 100644 test cases/unit/122 persp options/meson.build delete mode 100644 test cases/unit/122 persp options/meson.options delete mode 100644 test cases/unit/122 persp options/subprojects/sub1/meson.build delete mode 100644 test cases/unit/122 persp options/subprojects/sub1/meson.options delete mode 100644 test cases/unit/122 persp options/subprojects/sub1/sub1.c delete mode 100644 test cases/unit/122 persp options/subprojects/sub2/meson.build delete mode 100644 test cases/unit/122 persp options/subprojects/sub2/meson.options delete mode 100644 test cases/unit/122 persp options/subprojects/sub2/sub2.c delete mode 100644 test cases/unit/122 persp options/toplevel.c create mode 100644 test cases/unit/123 persp options/meson.build create mode 100644 test cases/unit/123 persp options/meson.options create mode 100644 test cases/unit/123 persp options/subprojects/sub1/meson.build create mode 100644 test cases/unit/123 persp options/subprojects/sub1/meson.options create mode 100644 test cases/unit/123 persp options/subprojects/sub1/sub1.c create mode 100644 test cases/unit/123 persp options/subprojects/sub2/meson.build create mode 100644 test cases/unit/123 persp options/subprojects/sub2/meson.options create mode 100644 test cases/unit/123 persp options/subprojects/sub2/sub2.c create mode 100644 test cases/unit/123 persp options/toplevel.c delete mode 100644 test cases/unit/123 reconfigure base options/meson.build delete mode 100644 test cases/unit/123 reconfigure base options/subprojects/sub/meson.build delete mode 100644 test cases/unit/124 interactive tap/meson.build delete mode 100755 test cases/unit/124 interactive tap/script.py create mode 100644 test cases/unit/124 reconfigure base options/meson.build create mode 100644 test cases/unit/124 reconfigure base options/subprojects/sub/meson.build delete mode 100644 test cases/unit/125 declare_dep var/meson.build delete mode 100644 test cases/unit/125 declare_dep var/meson_options.txt create mode 100644 test cases/unit/125 interactive tap/meson.build create mode 100755 test cases/unit/125 interactive tap/script.py delete mode 100644 test cases/unit/125 pkgsubproj/meson.build delete mode 100644 test cases/unit/125 pkgsubproj/subprojects/sub/meson.build create mode 100644 test cases/unit/126 declare_dep var/meson.build create mode 100644 test cases/unit/126 declare_dep var/meson_options.txt delete mode 100644 test cases/unit/126 test slice/meson.build delete mode 100644 test cases/unit/126 test slice/test.py create mode 100644 test cases/unit/127 pkgsubproj/meson.build create mode 100644 test cases/unit/127 pkgsubproj/subprojects/sub/meson.build delete mode 100644 test cases/unit/127 sanitizers/meson.build delete mode 100644 test cases/unit/128 long opt vs D/meson.build delete mode 100644 test cases/unit/128 long opt vs D/meson_options.txt create mode 100644 test cases/unit/128 test slice/meson.build create mode 100644 test cases/unit/128 test slice/test.py create mode 100644 test cases/unit/129 sanitizers/meson.build delete mode 100644 test cases/unit/129 vala internal glib/lib.vala delete mode 100644 test cases/unit/129 vala internal glib/meson.build delete mode 100644 test cases/unit/129 vala internal glib/meson.options create mode 100644 test cases/unit/130 long opt vs D/meson.build create mode 100644 test cases/unit/130 long opt vs D/meson_options.txt create mode 100644 test cases/unit/131 vala internal glib/lib.vala create mode 100644 test cases/unit/131 vala internal glib/meson.build create mode 100644 test cases/unit/131 vala internal glib/meson.options delete mode 100644 test cases/unit/91 install skip subprojects/foo.c delete mode 100644 test cases/unit/91 install skip subprojects/foo.dat delete mode 100644 test cases/unit/91 install skip subprojects/foo.h delete mode 100644 test cases/unit/91 install skip subprojects/foo/foofile delete mode 100644 test cases/unit/91 install skip subprojects/meson.build delete mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.c delete mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat delete mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.h delete mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile delete mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/meson.build create mode 100644 test cases/unit/92 install skip subprojects/foo.c create mode 100644 test cases/unit/92 install skip subprojects/foo.dat create mode 100644 test cases/unit/92 install skip subprojects/foo.h create mode 100644 test cases/unit/92 install skip subprojects/foo/foofile create mode 100644 test cases/unit/92 install skip subprojects/meson.build create mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.c create mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat create mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.h create mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile create mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/meson.build delete mode 100644 test cases/unit/92 new subproject in configured project/meson.build delete mode 100644 test cases/unit/92 new subproject in configured project/meson_options.txt delete mode 100644 test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c delete mode 100644 test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build delete mode 100644 test cases/unit/93 clangformat/.clang-format delete mode 100644 test cases/unit/93 clangformat/.clang-format-ignore delete mode 100644 test cases/unit/93 clangformat/.clang-format-include delete mode 100644 test cases/unit/93 clangformat/meson.build delete mode 100644 test cases/unit/93 clangformat/not-included/badformat.cpp delete mode 100644 test cases/unit/93 clangformat/src/badformat.c delete mode 100644 test cases/unit/93 clangformat/src/badformat.cpp create mode 100644 test cases/unit/93 new subproject in configured project/meson.build create mode 100644 test cases/unit/93 new subproject in configured project/meson_options.txt create mode 100644 test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c create mode 100644 test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build create mode 100644 test cases/unit/94 clangformat/.clang-format create mode 100644 test cases/unit/94 clangformat/.clang-format-ignore create mode 100644 test cases/unit/94 clangformat/.clang-format-include create mode 100644 test cases/unit/94 clangformat/meson.build create mode 100644 test cases/unit/94 clangformat/not-included/badformat.cpp create mode 100644 test cases/unit/94 clangformat/src/badformat.c create mode 100644 test cases/unit/94 clangformat/src/badformat.cpp delete mode 100644 test cases/unit/94 custominc/easytogrepfor/genh.py delete mode 100644 test cases/unit/94 custominc/easytogrepfor/meson.build delete mode 100644 test cases/unit/94 custominc/helper.c delete mode 100644 test cases/unit/94 custominc/meson.build delete mode 100644 test cases/unit/94 custominc/prog.c delete mode 100644 test cases/unit/94 custominc/prog2.c create mode 100644 test cases/unit/95 custominc/easytogrepfor/genh.py create mode 100644 test cases/unit/95 custominc/easytogrepfor/meson.build create mode 100644 test cases/unit/95 custominc/helper.c create mode 100644 test cases/unit/95 custominc/meson.build create mode 100644 test cases/unit/95 custominc/prog.c create mode 100644 test cases/unit/95 custominc/prog2.c delete mode 100644 test cases/unit/95 implicit force fallback/meson.build delete mode 100644 test cases/unit/95 implicit force fallback/subprojects/something/meson.build delete mode 100644 test cases/unit/96 compiler.links file arg/meson.build delete mode 100644 test cases/unit/96 compiler.links file arg/test.c create mode 100644 test cases/unit/96 implicit force fallback/meson.build create mode 100644 test cases/unit/96 implicit force fallback/subprojects/something/meson.build create mode 100644 test cases/unit/97 compiler.links file arg/meson.build create mode 100644 test cases/unit/97 compiler.links file arg/test.c 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/excludes/excluded.txt delete mode 100644 test cases/unit/98 install all targets/excludes/excluded/placeholder.txt delete mode 100644 test cases/unit/98 install all targets/excludes/installed.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 delete mode 100644 test cases/unit/98 install all targets/subprojects/subproject/aaa.txt delete mode 100644 test cases/unit/98 install all targets/subprojects/subproject/bbb.txt delete mode 100644 test cases/unit/98 install all targets/subprojects/subproject/meson.build 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/excludes/excluded.txt create mode 100644 test cases/unit/99 install all targets/excludes/excluded/placeholder.txt create mode 100644 test cases/unit/99 install all targets/excludes/installed.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 create mode 100644 test cases/unit/99 install all targets/subprojects/subproject/aaa.txt create mode 100644 test cases/unit/99 install all targets/subprojects/subproject/bbb.txt create mode 100644 test cases/unit/99 install all targets/subprojects/subproject/meson.build (limited to 'test cases/unit') 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 000000000..e69de29bb 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 000000000..82876149f --- /dev/null +++ b/test cases/unit/100 custom target name/meson.build @@ -0,0 +1,14 @@ +project('custom target name', 'c') + +python = find_program('python3') + +# 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 000000000..785a7b366 --- /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 relative find program/foo.py b/test cases/unit/100 relative find program/foo.py deleted file mode 100755 index 21239b74b..000000000 --- a/test cases/unit/100 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/100 relative find program/meson.build b/test cases/unit/100 relative find program/meson.build deleted file mode 100644 index 5745d8acb..000000000 --- a/test cases/unit/100 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/100 relative find program/subdir/meson.build b/test cases/unit/100 relative find program/subdir/meson.build deleted file mode 100644 index 475f5f51c..000000000 --- a/test cases/unit/100 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 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 000000000..21239b74b --- /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 000000000..5745d8acb --- /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 000000000..475f5f51c --- /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/101 rlib linkage/lib2.rs b/test cases/unit/101 rlib linkage/lib2.rs deleted file mode 100644 index 3487bc5a9..000000000 --- a/test cases/unit/101 rlib linkage/lib2.rs +++ /dev/null @@ -1,5 +0,0 @@ -use lib; - -pub fn fun() { - lib::fun(); -} diff --git a/test cases/unit/101 rlib linkage/main.rs b/test cases/unit/101 rlib linkage/main.rs deleted file mode 100644 index d0f82e4e1..000000000 --- a/test cases/unit/101 rlib linkage/main.rs +++ /dev/null @@ -1,5 +0,0 @@ -use lib2::fun; - -fn main() { - fun(); -} diff --git a/test cases/unit/101 rlib linkage/meson.build b/test cases/unit/101 rlib linkage/meson.build deleted file mode 100644 index 2d15b2a14..000000000 --- a/test cases/unit/101 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/102 python without pkgconfig/meson.build b/test cases/unit/102 python without pkgconfig/meson.build deleted file mode 100644 index 014a61751..000000000 --- a/test cases/unit/102 python without pkgconfig/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('python without pkgconfig', 'c') - -# This unit test is ran with PKG_CONFIG=notfound -import('python').find_installation().dependency() 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 000000000..3487bc5a9 --- /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 000000000..d0f82e4e1 --- /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 000000000..2d15b2a14 --- /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 000000000..014a61751 --- /dev/null +++ b/test cases/unit/103 python without pkgconfig/meson.build @@ -0,0 +1,4 @@ +project('python without pkgconfig', 'c') + +# This unit test is ran with PKG_CONFIG=notfound +import('python').find_installation().dependency() diff --git a/test cases/unit/103 strip/lib.c b/test cases/unit/103 strip/lib.c deleted file mode 100644 index 7d8163c3b..000000000 --- a/test cases/unit/103 strip/lib.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -void func(void){ fprintf(stderr, "Test 1 2 3\n"); } diff --git a/test cases/unit/103 strip/meson.build b/test cases/unit/103 strip/meson.build deleted file mode 100644 index dff61ab43..000000000 --- a/test cases/unit/103 strip/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('strip', 'c') - -shared_library('a', 'lib.c', install: true) diff --git a/test cases/unit/104 debug function/meson.build b/test cases/unit/104 debug function/meson.build deleted file mode 100644 index c3f4c769f..000000000 --- a/test cases/unit/104 debug function/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('debug function', 'c') - -debug('This is an example debug output, should only end up in debug log') -debug('Test logging other things', true, 1, ['Array'], {'Key' : 'Value'}) diff --git a/test cases/unit/104 strip/lib.c b/test cases/unit/104 strip/lib.c new file mode 100644 index 000000000..7d8163c3b --- /dev/null +++ b/test cases/unit/104 strip/lib.c @@ -0,0 +1,3 @@ +#include + +void func(void){ fprintf(stderr, "Test 1 2 3\n"); } diff --git a/test cases/unit/104 strip/meson.build b/test cases/unit/104 strip/meson.build new file mode 100644 index 000000000..dff61ab43 --- /dev/null +++ b/test cases/unit/104 strip/meson.build @@ -0,0 +1,3 @@ +project('strip', 'c') + +shared_library('a', 'lib.c', install: true) diff --git a/test cases/unit/105 debug function/meson.build b/test cases/unit/105 debug function/meson.build new file mode 100644 index 000000000..c3f4c769f --- /dev/null +++ b/test cases/unit/105 debug function/meson.build @@ -0,0 +1,4 @@ +project('debug function', 'c') + +debug('This is an example debug output, should only end up in debug log') +debug('Test logging other things', true, 1, ['Array'], {'Key' : 'Value'}) diff --git a/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build b/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build deleted file mode 100644 index ff2128624..000000000 --- a/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project( - 'pkgconfig-relocatable-with-absolute-path', - version : '1.0', - default_options: [ - 'pkgconfig.relocatable=true', - ]) - -pkgg = import('pkgconfig') - -pkgg.generate( - name : 'libsimple', - version : '1.0', - description : 'A simple pkgconfig.', - install_dir: get_option('prefix')/'share/misc/pkgconfig', -) diff --git a/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build b/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build new file mode 100644 index 000000000..ff2128624 --- /dev/null +++ b/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build @@ -0,0 +1,15 @@ +project( + 'pkgconfig-relocatable-with-absolute-path', + version : '1.0', + default_options: [ + 'pkgconfig.relocatable=true', + ]) + +pkgg = import('pkgconfig') + +pkgg.generate( + name : 'libsimple', + version : '1.0', + description : 'A simple pkgconfig.', + install_dir: get_option('prefix')/'share/misc/pkgconfig', +) diff --git a/test cases/unit/106 underspecified mtest/main.c b/test cases/unit/106 underspecified mtest/main.c deleted file mode 100644 index 8842fc122..000000000 --- a/test cases/unit/106 underspecified mtest/main.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0 ; } diff --git a/test cases/unit/106 underspecified mtest/meson.build b/test cases/unit/106 underspecified mtest/meson.build deleted file mode 100644 index c0a88d677..000000000 --- a/test cases/unit/106 underspecified mtest/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('underspecified deps', 'c') - -runner = find_program('runner.py') -exe1 = executable('main1', 'main.c') -exe2 = executable('main2', 'main.c') - -test('runner-with-exedep', runner, args: exe1) -test('runner-without-dep', runner, args: exe2.full_path()) diff --git a/test cases/unit/106 underspecified mtest/runner.py b/test cases/unit/106 underspecified mtest/runner.py deleted file mode 100755 index 9fb9ac40b..000000000 --- a/test cases/unit/106 underspecified mtest/runner.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -import sys, subprocess - -subprocess.run(sys.argv[1:], check=True) diff --git a/test cases/unit/107 subproject symlink/cp.py b/test cases/unit/107 subproject symlink/cp.py deleted file mode 100644 index adb0547b8..000000000 --- a/test cases/unit/107 subproject symlink/cp.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -from sys import argv -from shutil import copy - -copy(argv[1], argv[2]) diff --git a/test cases/unit/107 subproject symlink/main.c b/test cases/unit/107 subproject symlink/main.c deleted file mode 100644 index 62bd4b4b2..000000000 --- a/test cases/unit/107 subproject symlink/main.c +++ /dev/null @@ -1,6 +0,0 @@ -extern int foo(void); - -int main(void) -{ - return foo(); -} diff --git a/test cases/unit/107 subproject symlink/meson.build b/test cases/unit/107 subproject symlink/meson.build deleted file mode 100644 index 6766c8e4a..000000000 --- a/test cases/unit/107 subproject symlink/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project('foo', 'c') - -symlinked_subproject = subproject('symlinked_subproject').get_variable('dep') - -executable('foo', - sources : 'main.c', - dependencies : symlinked_subproject -) - -custom_target( - input : symlinked_subproject.get_variable('datadir') / 'datafile', - output : 'datafile_copy', - command : [find_program('cp.py'), '@INPUT@', '@OUTPUT@'], - build_always : true -) diff --git a/test cases/unit/107 subproject symlink/symlinked_subproject/datadir/datafile b/test cases/unit/107 subproject symlink/symlinked_subproject/datadir/datafile deleted file mode 100644 index 6a682940b..000000000 --- a/test cases/unit/107 subproject symlink/symlinked_subproject/datadir/datafile +++ /dev/null @@ -1 +0,0 @@ -hello meson diff --git a/test cases/unit/107 subproject symlink/symlinked_subproject/datadir/meson.build b/test cases/unit/107 subproject symlink/symlinked_subproject/datadir/meson.build deleted file mode 100644 index cbeb0a969..000000000 --- a/test cases/unit/107 subproject symlink/symlinked_subproject/datadir/meson.build +++ /dev/null @@ -1 +0,0 @@ -install_data('datafile') diff --git a/test cases/unit/107 subproject symlink/symlinked_subproject/meson.build b/test cases/unit/107 subproject symlink/symlinked_subproject/meson.build deleted file mode 100644 index 39304655f..000000000 --- a/test cases/unit/107 subproject symlink/symlinked_subproject/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('symlinked_subproject', 'c', version : '1.0.0') - -dep = declare_dependency( - sources : 'src.c', - variables : { - 'datadir': meson.current_source_dir() / 'datadir' - } -) - -subdir('datadir') diff --git a/test cases/unit/107 subproject symlink/symlinked_subproject/src.c b/test cases/unit/107 subproject symlink/symlinked_subproject/src.c deleted file mode 100644 index 97d7ad1d6..000000000 --- a/test cases/unit/107 subproject symlink/symlinked_subproject/src.c +++ /dev/null @@ -1,4 +0,0 @@ -int foo(void) -{ - return 0; -} diff --git a/test cases/unit/107 underspecified mtest/main.c b/test cases/unit/107 underspecified mtest/main.c new file mode 100644 index 000000000..8842fc122 --- /dev/null +++ b/test cases/unit/107 underspecified mtest/main.c @@ -0,0 +1 @@ +int main(void) { return 0 ; } diff --git a/test cases/unit/107 underspecified mtest/meson.build b/test cases/unit/107 underspecified mtest/meson.build new file mode 100644 index 000000000..c0a88d677 --- /dev/null +++ b/test cases/unit/107 underspecified mtest/meson.build @@ -0,0 +1,8 @@ +project('underspecified deps', 'c') + +runner = find_program('runner.py') +exe1 = executable('main1', 'main.c') +exe2 = executable('main2', 'main.c') + +test('runner-with-exedep', runner, args: exe1) +test('runner-without-dep', runner, args: exe2.full_path()) diff --git a/test cases/unit/107 underspecified mtest/runner.py b/test cases/unit/107 underspecified mtest/runner.py new file mode 100755 index 000000000..9fb9ac40b --- /dev/null +++ b/test cases/unit/107 underspecified mtest/runner.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +import sys, subprocess + +subprocess.run(sys.argv[1:], check=True) diff --git a/test cases/unit/108 new subproject on reconfigure/meson.build b/test cases/unit/108 new subproject on reconfigure/meson.build deleted file mode 100644 index 7342c9a30..000000000 --- a/test cases/unit/108 new subproject on reconfigure/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('New subproject on reconfigure') - -subproject('foo', required: get_option('foo')) diff --git a/test cases/unit/108 new subproject on reconfigure/meson_options.txt b/test cases/unit/108 new subproject on reconfigure/meson_options.txt deleted file mode 100644 index b3dd68392..000000000 --- a/test cases/unit/108 new subproject on reconfigure/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('foo', type: 'feature', value: 'disabled') diff --git a/test cases/unit/108 new subproject on reconfigure/subprojects/foo/foo.c b/test cases/unit/108 new subproject on reconfigure/subprojects/foo/foo.c deleted file mode 100644 index 1edf9959c..000000000 --- a/test cases/unit/108 new subproject on reconfigure/subprojects/foo/foo.c +++ /dev/null @@ -1,2 +0,0 @@ -void foo(void); -void foo(void) {} diff --git a/test cases/unit/108 new subproject on reconfigure/subprojects/foo/meson.build b/test cases/unit/108 new subproject on reconfigure/subprojects/foo/meson.build deleted file mode 100644 index 2a6e30ad7..000000000 --- a/test cases/unit/108 new subproject on reconfigure/subprojects/foo/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('foo', 'c') - -# Ensure that builtin options have been initialised. -assert(get_option('default_library') == 'shared') - -# This uses default_library option internally and used to cause a crash: -# https://github.com/mesonbuild/meson/issues/10225. -library('foo', 'foo.c') diff --git a/test cases/unit/108 subproject symlink/cp.py b/test cases/unit/108 subproject symlink/cp.py new file mode 100644 index 000000000..adb0547b8 --- /dev/null +++ b/test cases/unit/108 subproject symlink/cp.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from sys import argv +from shutil import copy + +copy(argv[1], argv[2]) diff --git a/test cases/unit/108 subproject symlink/main.c b/test cases/unit/108 subproject symlink/main.c new file mode 100644 index 000000000..62bd4b4b2 --- /dev/null +++ b/test cases/unit/108 subproject symlink/main.c @@ -0,0 +1,6 @@ +extern int foo(void); + +int main(void) +{ + return foo(); +} diff --git a/test cases/unit/108 subproject symlink/meson.build b/test cases/unit/108 subproject symlink/meson.build new file mode 100644 index 000000000..6766c8e4a --- /dev/null +++ b/test cases/unit/108 subproject symlink/meson.build @@ -0,0 +1,15 @@ +project('foo', 'c') + +symlinked_subproject = subproject('symlinked_subproject').get_variable('dep') + +executable('foo', + sources : 'main.c', + dependencies : symlinked_subproject +) + +custom_target( + input : symlinked_subproject.get_variable('datadir') / 'datafile', + output : 'datafile_copy', + command : [find_program('cp.py'), '@INPUT@', '@OUTPUT@'], + build_always : true +) diff --git a/test cases/unit/108 subproject symlink/symlinked_subproject/datadir/datafile b/test cases/unit/108 subproject symlink/symlinked_subproject/datadir/datafile new file mode 100644 index 000000000..6a682940b --- /dev/null +++ b/test cases/unit/108 subproject symlink/symlinked_subproject/datadir/datafile @@ -0,0 +1 @@ +hello meson diff --git a/test cases/unit/108 subproject symlink/symlinked_subproject/datadir/meson.build b/test cases/unit/108 subproject symlink/symlinked_subproject/datadir/meson.build new file mode 100644 index 000000000..cbeb0a969 --- /dev/null +++ b/test cases/unit/108 subproject symlink/symlinked_subproject/datadir/meson.build @@ -0,0 +1 @@ +install_data('datafile') diff --git a/test cases/unit/108 subproject symlink/symlinked_subproject/meson.build b/test cases/unit/108 subproject symlink/symlinked_subproject/meson.build new file mode 100644 index 000000000..39304655f --- /dev/null +++ b/test cases/unit/108 subproject symlink/symlinked_subproject/meson.build @@ -0,0 +1,10 @@ +project('symlinked_subproject', 'c', version : '1.0.0') + +dep = declare_dependency( + sources : 'src.c', + variables : { + 'datadir': meson.current_source_dir() / 'datadir' + } +) + +subdir('datadir') diff --git a/test cases/unit/108 subproject symlink/symlinked_subproject/src.c b/test cases/unit/108 subproject symlink/symlinked_subproject/src.c new file mode 100644 index 000000000..97d7ad1d6 --- /dev/null +++ b/test cases/unit/108 subproject symlink/symlinked_subproject/src.c @@ -0,0 +1,4 @@ +int foo(void) +{ + return 0; +} diff --git a/test cases/unit/109 configure same noop/meson.build b/test cases/unit/109 configure same noop/meson.build deleted file mode 100644 index d3f13262e..000000000 --- a/test cases/unit/109 configure same noop/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('configure same noop test') diff --git a/test cases/unit/109 configure same noop/meson_options.txt b/test cases/unit/109 configure same noop/meson_options.txt deleted file mode 100644 index 57b40844c..000000000 --- a/test cases/unit/109 configure same noop/meson_options.txt +++ /dev/null @@ -1,6 +0,0 @@ -option('string', type : 'string', value: '') -option('boolean', type : 'boolean', value: false) -option('combo', type : 'combo', choices : ['one', 'two', 'three'], value: 'one') -option('integer', type : 'integer', value: 5) -option('array', type : 'array', value: ['one', 'two']) -option('feature', type : 'feature', value : 'enabled') diff --git a/test cases/unit/109 new subproject on reconfigure/meson.build b/test cases/unit/109 new subproject on reconfigure/meson.build new file mode 100644 index 000000000..7342c9a30 --- /dev/null +++ b/test cases/unit/109 new subproject on reconfigure/meson.build @@ -0,0 +1,3 @@ +project('New subproject on reconfigure') + +subproject('foo', required: get_option('foo')) diff --git a/test cases/unit/109 new subproject on reconfigure/meson_options.txt b/test cases/unit/109 new subproject on reconfigure/meson_options.txt new file mode 100644 index 000000000..b3dd68392 --- /dev/null +++ b/test cases/unit/109 new subproject on reconfigure/meson_options.txt @@ -0,0 +1 @@ +option('foo', type: 'feature', value: 'disabled') diff --git a/test cases/unit/109 new subproject on reconfigure/subprojects/foo/foo.c b/test cases/unit/109 new subproject on reconfigure/subprojects/foo/foo.c new file mode 100644 index 000000000..1edf9959c --- /dev/null +++ b/test cases/unit/109 new subproject on reconfigure/subprojects/foo/foo.c @@ -0,0 +1,2 @@ +void foo(void); +void foo(void) {} diff --git a/test cases/unit/109 new subproject on reconfigure/subprojects/foo/meson.build b/test cases/unit/109 new subproject on reconfigure/subprojects/foo/meson.build new file mode 100644 index 000000000..2a6e30ad7 --- /dev/null +++ b/test cases/unit/109 new subproject on reconfigure/subprojects/foo/meson.build @@ -0,0 +1,8 @@ +project('foo', 'c') + +# Ensure that builtin options have been initialised. +assert(get_option('default_library') == 'shared') + +# This uses default_library option internally and used to cause a crash: +# https://github.com/mesonbuild/meson/issues/10225. +library('foo', 'foo.c') diff --git a/test cases/unit/110 configure same noop/meson.build b/test cases/unit/110 configure same noop/meson.build new file mode 100644 index 000000000..d3f13262e --- /dev/null +++ b/test cases/unit/110 configure same noop/meson.build @@ -0,0 +1 @@ +project('configure same noop test') diff --git a/test cases/unit/110 configure same noop/meson_options.txt b/test cases/unit/110 configure same noop/meson_options.txt new file mode 100644 index 000000000..57b40844c --- /dev/null +++ b/test cases/unit/110 configure same noop/meson_options.txt @@ -0,0 +1,6 @@ +option('string', type : 'string', value: '') +option('boolean', type : 'boolean', value: false) +option('combo', type : 'combo', choices : ['one', 'two', 'three'], value: 'one') +option('integer', type : 'integer', value: 5) +option('array', type : 'array', value: ['one', 'two']) +option('feature', type : 'feature', value : 'enabled') diff --git a/test cases/unit/110 freeze/freeze.c b/test cases/unit/110 freeze/freeze.c deleted file mode 100644 index 0a45c1a70..000000000 --- a/test cases/unit/110 freeze/freeze.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include -#include -#include - -static void do_nothing(int signo, siginfo_t *info, void *context) { -} - -int main(int argc, char **argv) { - struct sigaction sa; - memset(&sa, 0, sizeof(struct sigaction)); - sa.sa_sigaction = do_nothing; - if (sigaction(SIGTERM, &sa, NULL) == -1) { - printf("Could not set up signal handler.\n"); - return 1; - } - printf("Freezing forever.\n"); - while(1) { - } - return 0; -} diff --git a/test cases/unit/110 freeze/meson.build b/test cases/unit/110 freeze/meson.build deleted file mode 100644 index 1a84f3786..000000000 --- a/test cases/unit/110 freeze/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('freeze', 'c') - -e = executable('freeze', 'freeze.c') -test('freeze', e, timeout: 1) diff --git a/test cases/unit/111 freeze/freeze.c b/test cases/unit/111 freeze/freeze.c new file mode 100644 index 000000000..0a45c1a70 --- /dev/null +++ b/test cases/unit/111 freeze/freeze.c @@ -0,0 +1,21 @@ +#include +#include +#include +#include + +static void do_nothing(int signo, siginfo_t *info, void *context) { +} + +int main(int argc, char **argv) { + struct sigaction sa; + memset(&sa, 0, sizeof(struct sigaction)); + sa.sa_sigaction = do_nothing; + if (sigaction(SIGTERM, &sa, NULL) == -1) { + printf("Could not set up signal handler.\n"); + return 1; + } + printf("Freezing forever.\n"); + while(1) { + } + return 0; +} diff --git a/test cases/unit/111 freeze/meson.build b/test cases/unit/111 freeze/meson.build new file mode 100644 index 000000000..1a84f3786 --- /dev/null +++ b/test cases/unit/111 freeze/meson.build @@ -0,0 +1,4 @@ +project('freeze', 'c') + +e = executable('freeze', 'freeze.c') +test('freeze', e, timeout: 1) diff --git a/test cases/unit/111 replace unencodable xml chars/meson.build b/test cases/unit/111 replace unencodable xml chars/meson.build deleted file mode 100644 index 73485b073..000000000 --- a/test cases/unit/111 replace unencodable xml chars/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('replace unencodable xml chars') - -test_script = find_program('script.py') -test('main', test_script, verbose: true) diff --git a/test cases/unit/111 replace unencodable xml chars/script.py b/test cases/unit/111 replace unencodable xml chars/script.py deleted file mode 100644 index 2f2d4d67b..000000000 --- a/test cases/unit/111 replace unencodable xml chars/script.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -# Print base string(\nHello Meson\n) to see valid chars are not replaced -print('\n\x48\x65\x6c\x6c\x6f\x20\x4d\x65\x73\x6f\x6e\n') -# Print invalid input from all known unencodable chars -print( - '\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11' - '\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f') - -# Cover for potential encoding issues -try: - print( - '\x80\x81\x82\x83\x84\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f' - '\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e' - '\x9f\ufdd0\ufdd1\ufdd2\ufdd3\ufdd4\ufdd5\ufdd6\ufdd7\ufdd8' - '\ufdd9\ufdda\ufddb\ufddc\ufddd\ufdde\ufddf\ufde0\ufde1' - '\ufde2\ufde3\ufde4\ufde5\ufde6\ufde7\ufde8\ufde9\ufdea' - '\ufdeb\ufdec\ufded\ufdee\ufdef\ufffe\uffff') -except: - pass - -# Cover for potential encoding issues -try: - if sys.maxunicode >= 0x10000: - print( - '\U0001fffe\U0001ffff\U0002fffe\U0002ffff' - '\U0003fffe\U0003ffff\U0004fffe\U0004ffff' - '\U0005fffe\U0005ffff\U0006fffe\U0006ffff' - '\U0007fffe\U0007ffff\U0008fffe\U0008ffff' - '\U0009fffe\U0009ffff\U000afffe\U000affff' - '\U000bfffe\U000bffff\U000cfffe\U000cffff' - '\U000dfffe\U000dffff\U000efffe\U000effff' - '\U000ffffe\U000fffff\U0010fffe\U0010ffff') -except: - pass diff --git a/test cases/unit/112 classpath/com/mesonbuild/Simple.java b/test cases/unit/112 classpath/com/mesonbuild/Simple.java deleted file mode 100644 index 325a49a21..000000000 --- a/test cases/unit/112 classpath/com/mesonbuild/Simple.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.mesonbuild; - -class Simple { - public static void main(String [] args) { - System.out.println("Java is working.\n"); - } -} diff --git a/test cases/unit/112 classpath/meson.build b/test cases/unit/112 classpath/meson.build deleted file mode 100644 index e6b9b840a..000000000 --- a/test cases/unit/112 classpath/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('simplejava', 'java') - -one = jar('one', 'com/mesonbuild/Simple.java', - main_class : 'com.mesonbuild.Simple', - install : true, - install_dir : get_option('bindir'), -) - -two = jar('two', 'com/mesonbuild/Simple.java', - main_class : 'com.mesonbuild.Simple', - install : true, - install_dir : get_option('bindir'), - link_with : one, -) diff --git a/test cases/unit/112 replace unencodable xml chars/meson.build b/test cases/unit/112 replace unencodable xml chars/meson.build new file mode 100644 index 000000000..73485b073 --- /dev/null +++ b/test cases/unit/112 replace unencodable xml chars/meson.build @@ -0,0 +1,4 @@ +project('replace unencodable xml chars') + +test_script = find_program('script.py') +test('main', test_script, verbose: true) diff --git a/test cases/unit/112 replace unencodable xml chars/script.py b/test cases/unit/112 replace unencodable xml chars/script.py new file mode 100644 index 000000000..2f2d4d67b --- /dev/null +++ b/test cases/unit/112 replace unencodable xml chars/script.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +import sys + +# Print base string(\nHello Meson\n) to see valid chars are not replaced +print('\n\x48\x65\x6c\x6c\x6f\x20\x4d\x65\x73\x6f\x6e\n') +# Print invalid input from all known unencodable chars +print( + '\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11' + '\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f') + +# Cover for potential encoding issues +try: + print( + '\x80\x81\x82\x83\x84\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f' + '\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e' + '\x9f\ufdd0\ufdd1\ufdd2\ufdd3\ufdd4\ufdd5\ufdd6\ufdd7\ufdd8' + '\ufdd9\ufdda\ufddb\ufddc\ufddd\ufdde\ufddf\ufde0\ufde1' + '\ufde2\ufde3\ufde4\ufde5\ufde6\ufde7\ufde8\ufde9\ufdea' + '\ufdeb\ufdec\ufded\ufdee\ufdef\ufffe\uffff') +except: + pass + +# Cover for potential encoding issues +try: + if sys.maxunicode >= 0x10000: + print( + '\U0001fffe\U0001ffff\U0002fffe\U0002ffff' + '\U0003fffe\U0003ffff\U0004fffe\U0004ffff' + '\U0005fffe\U0005ffff\U0006fffe\U0006ffff' + '\U0007fffe\U0007ffff\U0008fffe\U0008ffff' + '\U0009fffe\U0009ffff\U000afffe\U000affff' + '\U000bfffe\U000bffff\U000cfffe\U000cffff' + '\U000dfffe\U000dffff\U000efffe\U000effff' + '\U000ffffe\U000fffff\U0010fffe\U0010ffff') +except: + pass diff --git a/test cases/unit/113 classpath/com/mesonbuild/Simple.java b/test cases/unit/113 classpath/com/mesonbuild/Simple.java new file mode 100644 index 000000000..325a49a21 --- /dev/null +++ b/test cases/unit/113 classpath/com/mesonbuild/Simple.java @@ -0,0 +1,7 @@ +package com.mesonbuild; + +class Simple { + public static void main(String [] args) { + System.out.println("Java is working.\n"); + } +} diff --git a/test cases/unit/113 classpath/meson.build b/test cases/unit/113 classpath/meson.build new file mode 100644 index 000000000..e6b9b840a --- /dev/null +++ b/test cases/unit/113 classpath/meson.build @@ -0,0 +1,14 @@ +project('simplejava', 'java') + +one = jar('one', 'com/mesonbuild/Simple.java', + main_class : 'com.mesonbuild.Simple', + install : true, + install_dir : get_option('bindir'), +) + +two = jar('two', 'com/mesonbuild/Simple.java', + main_class : 'com.mesonbuild.Simple', + install : true, + install_dir : get_option('bindir'), + link_with : one, +) diff --git a/test cases/unit/113 list build options/meson.build b/test cases/unit/113 list build options/meson.build deleted file mode 100644 index 2d634d38f..000000000 --- a/test cases/unit/113 list build options/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('feature user option', 'c') - -feature_opts = get_option('auto_features') -optional_opt = get_option('optional') - -message('Build options:', meson.build_options()) diff --git a/test cases/unit/113 list build options/meson_options.txt b/test cases/unit/113 list build options/meson_options.txt deleted file mode 100644 index d84f22a34..000000000 --- a/test cases/unit/113 list build options/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('optional', type : 'feature', value : 'auto', description : 'An optional feature') diff --git a/test cases/unit/114 complex link cases/main.c b/test cases/unit/114 complex link cases/main.c deleted file mode 100644 index 739b413af..000000000 --- a/test cases/unit/114 complex link cases/main.c +++ /dev/null @@ -1,6 +0,0 @@ -int s3(void); - -int main(int argc, char *argv[]) -{ - return s3(); -} diff --git a/test cases/unit/114 complex link cases/meson.build b/test cases/unit/114 complex link cases/meson.build deleted file mode 100644 index 3b4b898df..000000000 --- a/test cases/unit/114 complex link cases/meson.build +++ /dev/null @@ -1,111 +0,0 @@ -project('complex link cases', 'c') - -cc = meson.get_compiler('c') - -# In all tests, e1 uses s3 which uses s2 which uses s1. - -# Executable links with s3 and s1 but not s2 because it is included in s3. -s1 = static_library('t1-s1', 's1.c') -s2 = static_library('t1-s2', 's2.c', link_with: s1) -s3 = static_library('t1-s3', 's3.c', link_whole: s2) -e = executable('t1-e1', 'main.c', link_with: s3) - -# s3 is installed but not s1 so it has to include s1 too. -# Executable links only s3 because it contains s1 and s2. -s1 = static_library('t2-s1', 's1.c') -s2 = static_library('t2-s2', 's2.c', link_with: s1) -s3 = static_library('t2-s3', 's3.c', link_whole: s2, install: true) -e = executable('t2-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 only -s1 = static_library('t3-s1', 's1.c') -s2 = static_library('t3-s2', 's2.c', link_with: s1) -s3 = shared_library('t3-s3', 's3.c', link_with: s2) -e = executable('t3-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 and s2 -s1 = static_library('t4-s1', 's1.c') -s2 = shared_library('t4-s2', 's2.c', link_with: s1) -s3 = static_library('t4-s3', 's3.c', link_with: s2) -e = executable('t4-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 and s1 -s1 = shared_library('t5-s1', 's1.c') -s2 = static_library('t5-s2', 's2.c', link_with: s1) -s3 = static_library('t5-s3', 's3.c', link_with: s2, install: true) -e = executable('t5-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 and s2 -s1 = static_library('t6-s1', 's1.c') -s2 = static_library('t6-s2', 's2.c', link_with: s1, install: true) -s3 = static_library('t6-s3', 's3.c', link_with: s2, install: true) -e = executable('t6-e1', 'main.c', link_with: s3) - -# Regression test: s1 gets promoted to link_whole and that used to make all other -# libraries in the list (s2) to be ignored. -# Executable only needs to link with s3. -# See https://github.com/mesonbuild/meson/issues/11956. -s1 = static_library('t7-s1', 's1.c') -s2 = static_library('t7-s2', 's2.c') -s3 = static_library('t7-s3', 's3.c', link_with: [s1, s2], install: true) -e = executable('t7-e1', 'main.c', link_with: s3) - -# Regression test: s3 should come last in the linker command. This seems to be -# required for at least backward compatibility reasons: -# https://github.com/mesonbuild/meson/pull/11957#issuecomment-1629243208 -s1 = static_library('t8-s1', 's1.c') -s2 = static_library('t8-s2', 's2.c') -s3 = static_library('t8-s3', 's3.c') -e = executable('t8-e1', 'main.c', - link_with: [s1, s2], - dependencies: declare_dependency(link_with: s3), -) - -if cc.get_argument_syntax() == 'gcc' - # s1 is an internal static library, using custom target. - s1_o = custom_target( - input: 's1.c', - output: 's1.c.o', - command: [cc.cmd_array(), '-c', '-o', '@OUTPUT@', '@INPUT@'] - ) - s1 = custom_target( - output: 'libt9-s1.a', - command: ['ar', 'rcs', '@OUTPUT@', s1_o], - ) - - # Executable needs to link with s1, s2 and s3. - s2 = static_library('t9-s2', 's2.c', link_with: s1) - s3 = static_library('t9-s3', 's3.c', link_with: s2) - e = executable('t9-e1', 'main.c', link_with: s3) - - # s2 cannot be installed because s1 is not being installed and Meson cannot - # extract object files from the custom target. - testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t10-s2\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t10-s2\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') - s2 = static_library('t10-s2', 's2.c', link_with: s1, install: true) - endtestcase - - # s3 cannot be installed because s1 is not being installed and Meson cannot - # extract object files from the custom target. - testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t11-s3\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t11-s3\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') - s2 = static_library('t11-s2', 's2.c', link_with: s1) - s3 = static_library('t11-s3', 's3.c', link_with: s2, install: true) - endtestcase - - # s1 is an installed static library, using custom target. - s1 = custom_target( - output: 'libt12-s1.a', - command: ['ar', 'rcs', '@OUTPUT@', s1_o], - install: true, - install_dir: get_option('libdir'), - ) - - # Executable needs to link with s1, s2 and s3. - s2 = static_library('t12-s2', 's2.c', link_with: s1, install: true) - s3 = static_library('t12-s3', 's3.c', link_with: s2) - e = executable('t12-e1', 'main.c', link_with: s3) - - # Executable links with s3 and s1 but not s2 because it is included in s3. - s2 = static_library('t13-s2', 's2.c', link_with: s1) - s3 = static_library('t13-s3', 's3.c', link_with: s2, install: true) - e = executable('t13-e1', 'main.c', link_with: s3) -endif diff --git a/test cases/unit/114 complex link cases/s1.c b/test cases/unit/114 complex link cases/s1.c deleted file mode 100644 index 68bba4949..000000000 --- a/test cases/unit/114 complex link cases/s1.c +++ /dev/null @@ -1,3 +0,0 @@ -int s1(void) { - return 1; -} diff --git a/test cases/unit/114 complex link cases/s2.c b/test cases/unit/114 complex link cases/s2.c deleted file mode 100644 index 835870c04..000000000 --- a/test cases/unit/114 complex link cases/s2.c +++ /dev/null @@ -1,5 +0,0 @@ -int s1(void); - -int s2(void) { - return s1() + 1; -} diff --git a/test cases/unit/114 complex link cases/s3.c b/test cases/unit/114 complex link cases/s3.c deleted file mode 100644 index 08e062010..000000000 --- a/test cases/unit/114 complex link cases/s3.c +++ /dev/null @@ -1,5 +0,0 @@ -int s2(void); - -int s3(void) { - return s2() + 1; -} diff --git a/test cases/unit/114 list build options/meson.build b/test cases/unit/114 list build options/meson.build new file mode 100644 index 000000000..2d634d38f --- /dev/null +++ b/test cases/unit/114 list build options/meson.build @@ -0,0 +1,6 @@ +project('feature user option', 'c') + +feature_opts = get_option('auto_features') +optional_opt = get_option('optional') + +message('Build options:', meson.build_options()) diff --git a/test cases/unit/114 list build options/meson_options.txt b/test cases/unit/114 list build options/meson_options.txt new file mode 100644 index 000000000..d84f22a34 --- /dev/null +++ b/test cases/unit/114 list build options/meson_options.txt @@ -0,0 +1 @@ +option('optional', type : 'feature', value : 'auto', description : 'An optional feature') diff --git a/test cases/unit/115 c cpp stds/meson.build b/test cases/unit/115 c cpp stds/meson.build deleted file mode 100644 index fb68af610..000000000 --- a/test cases/unit/115 c cpp stds/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright © 2024 Intel Corporation - -project( - 'c cpp stds', - default_options: [ - 'c_std=gnu89,c89', - 'cpp_std=gnu++98,vc++11', - ], -) - -if get_option('with-c') - add_languages('c', 'cpp', native : false) -endif -if get_option('with-objc') - add_languages('objc', 'objcpp', native : false) -endif diff --git a/test cases/unit/115 c cpp stds/meson.options b/test cases/unit/115 c cpp stds/meson.options deleted file mode 100644 index 704075881..000000000 --- a/test cases/unit/115 c cpp stds/meson.options +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright © 2024 Intel Corporation - -option('with-c', type : 'boolean', value : false) -option('with-objc', type : 'boolean', value : false) diff --git a/test cases/unit/115 complex link cases/main.c b/test cases/unit/115 complex link cases/main.c new file mode 100644 index 000000000..739b413af --- /dev/null +++ b/test cases/unit/115 complex link cases/main.c @@ -0,0 +1,6 @@ +int s3(void); + +int main(int argc, char *argv[]) +{ + return s3(); +} diff --git a/test cases/unit/115 complex link cases/meson.build b/test cases/unit/115 complex link cases/meson.build new file mode 100644 index 000000000..3b4b898df --- /dev/null +++ b/test cases/unit/115 complex link cases/meson.build @@ -0,0 +1,111 @@ +project('complex link cases', 'c') + +cc = meson.get_compiler('c') + +# In all tests, e1 uses s3 which uses s2 which uses s1. + +# Executable links with s3 and s1 but not s2 because it is included in s3. +s1 = static_library('t1-s1', 's1.c') +s2 = static_library('t1-s2', 's2.c', link_with: s1) +s3 = static_library('t1-s3', 's3.c', link_whole: s2) +e = executable('t1-e1', 'main.c', link_with: s3) + +# s3 is installed but not s1 so it has to include s1 too. +# Executable links only s3 because it contains s1 and s2. +s1 = static_library('t2-s1', 's1.c') +s2 = static_library('t2-s2', 's2.c', link_with: s1) +s3 = static_library('t2-s3', 's3.c', link_whole: s2, install: true) +e = executable('t2-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 only +s1 = static_library('t3-s1', 's1.c') +s2 = static_library('t3-s2', 's2.c', link_with: s1) +s3 = shared_library('t3-s3', 's3.c', link_with: s2) +e = executable('t3-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 and s2 +s1 = static_library('t4-s1', 's1.c') +s2 = shared_library('t4-s2', 's2.c', link_with: s1) +s3 = static_library('t4-s3', 's3.c', link_with: s2) +e = executable('t4-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 and s1 +s1 = shared_library('t5-s1', 's1.c') +s2 = static_library('t5-s2', 's2.c', link_with: s1) +s3 = static_library('t5-s3', 's3.c', link_with: s2, install: true) +e = executable('t5-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 and s2 +s1 = static_library('t6-s1', 's1.c') +s2 = static_library('t6-s2', 's2.c', link_with: s1, install: true) +s3 = static_library('t6-s3', 's3.c', link_with: s2, install: true) +e = executable('t6-e1', 'main.c', link_with: s3) + +# Regression test: s1 gets promoted to link_whole and that used to make all other +# libraries in the list (s2) to be ignored. +# Executable only needs to link with s3. +# See https://github.com/mesonbuild/meson/issues/11956. +s1 = static_library('t7-s1', 's1.c') +s2 = static_library('t7-s2', 's2.c') +s3 = static_library('t7-s3', 's3.c', link_with: [s1, s2], install: true) +e = executable('t7-e1', 'main.c', link_with: s3) + +# Regression test: s3 should come last in the linker command. This seems to be +# required for at least backward compatibility reasons: +# https://github.com/mesonbuild/meson/pull/11957#issuecomment-1629243208 +s1 = static_library('t8-s1', 's1.c') +s2 = static_library('t8-s2', 's2.c') +s3 = static_library('t8-s3', 's3.c') +e = executable('t8-e1', 'main.c', + link_with: [s1, s2], + dependencies: declare_dependency(link_with: s3), +) + +if cc.get_argument_syntax() == 'gcc' + # s1 is an internal static library, using custom target. + s1_o = custom_target( + input: 's1.c', + output: 's1.c.o', + command: [cc.cmd_array(), '-c', '-o', '@OUTPUT@', '@INPUT@'] + ) + s1 = custom_target( + output: 'libt9-s1.a', + command: ['ar', 'rcs', '@OUTPUT@', s1_o], + ) + + # Executable needs to link with s1, s2 and s3. + s2 = static_library('t9-s2', 's2.c', link_with: s1) + s3 = static_library('t9-s3', 's3.c', link_with: s2) + e = executable('t9-e1', 'main.c', link_with: s3) + + # s2 cannot be installed because s1 is not being installed and Meson cannot + # extract object files from the custom target. + testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t10-s2\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t10-s2\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') + s2 = static_library('t10-s2', 's2.c', link_with: s1, install: true) + endtestcase + + # s3 cannot be installed because s1 is not being installed and Meson cannot + # extract object files from the custom target. + testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t11-s3\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t11-s3\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') + s2 = static_library('t11-s2', 's2.c', link_with: s1) + s3 = static_library('t11-s3', 's3.c', link_with: s2, install: true) + endtestcase + + # s1 is an installed static library, using custom target. + s1 = custom_target( + output: 'libt12-s1.a', + command: ['ar', 'rcs', '@OUTPUT@', s1_o], + install: true, + install_dir: get_option('libdir'), + ) + + # Executable needs to link with s1, s2 and s3. + s2 = static_library('t12-s2', 's2.c', link_with: s1, install: true) + s3 = static_library('t12-s3', 's3.c', link_with: s2) + e = executable('t12-e1', 'main.c', link_with: s3) + + # Executable links with s3 and s1 but not s2 because it is included in s3. + s2 = static_library('t13-s2', 's2.c', link_with: s1) + s3 = static_library('t13-s3', 's3.c', link_with: s2, install: true) + e = executable('t13-e1', 'main.c', link_with: s3) +endif diff --git a/test cases/unit/115 complex link cases/s1.c b/test cases/unit/115 complex link cases/s1.c new file mode 100644 index 000000000..68bba4949 --- /dev/null +++ b/test cases/unit/115 complex link cases/s1.c @@ -0,0 +1,3 @@ +int s1(void) { + return 1; +} diff --git a/test cases/unit/115 complex link cases/s2.c b/test cases/unit/115 complex link cases/s2.c new file mode 100644 index 000000000..835870c04 --- /dev/null +++ b/test cases/unit/115 complex link cases/s2.c @@ -0,0 +1,5 @@ +int s1(void); + +int s2(void) { + return s1() + 1; +} diff --git a/test cases/unit/115 complex link cases/s3.c b/test cases/unit/115 complex link cases/s3.c new file mode 100644 index 000000000..08e062010 --- /dev/null +++ b/test cases/unit/115 complex link cases/s3.c @@ -0,0 +1,5 @@ +int s2(void); + +int s3(void) { + return s2() + 1; +} diff --git a/test cases/unit/116 c cpp stds/meson.build b/test cases/unit/116 c cpp stds/meson.build new file mode 100644 index 000000000..fb68af610 --- /dev/null +++ b/test cases/unit/116 c cpp stds/meson.build @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright © 2024 Intel Corporation + +project( + 'c cpp stds', + default_options: [ + 'c_std=gnu89,c89', + 'cpp_std=gnu++98,vc++11', + ], +) + +if get_option('with-c') + add_languages('c', 'cpp', native : false) +endif +if get_option('with-objc') + add_languages('objc', 'objcpp', native : false) +endif diff --git a/test cases/unit/116 c cpp stds/meson.options b/test cases/unit/116 c cpp stds/meson.options new file mode 100644 index 000000000..704075881 --- /dev/null +++ b/test cases/unit/116 c cpp stds/meson.options @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright © 2024 Intel Corporation + +option('with-c', type : 'boolean', value : false) +option('with-objc', type : 'boolean', value : false) diff --git a/test cases/unit/116 empty project/expected_mods.json b/test cases/unit/116 empty project/expected_mods.json deleted file mode 100644 index fa5e0ec6c..000000000 --- a/test cases/unit/116 empty project/expected_mods.json +++ /dev/null @@ -1,244 +0,0 @@ -{ - "stdlib": { - "modules": [ - "__future__", - "__main__", - "_abc", - "_ast", - "_bisect", - "_blake2", - "_bz2", - "_codecs", - "_collections", - "_collections_abc", - "_compat_pickle", - "_compression", - "_datetime", - "_frozen_importlib", - "_frozen_importlib_external", - "_functools", - "_hashlib", - "_imp", - "_io", - "_json", - "_locale", - "_lsprof", - "_lzma", - "_opcode", - "_operator", - "_pickle", - "_posixsubprocess", - "_random", - "_sha512", - "_signal", - "_sitebuiltins", - "_socket", - "_sre", - "_ssl", - "_stat", - "_string", - "_struct", - "_thread", - "_uuid", - "_warnings", - "_weakref", - "_weakrefset", - "abc", - "argparse", - "array", - "ast", - "base64", - "binascii", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "codecs", - "collections", - "collections.abc", - "configparser", - "contextlib", - "copy", - "copyreg", - "dataclasses", - "datetime", - "dis", - "email", - "email._encoded_words", - "email._parseaddr", - "email._policybase", - "email.base64mime", - "email.charset", - "email.encoders", - "email.errors", - "email.feedparser", - "email.header", - "email.iterators", - "email.message", - "email.parser", - "email.quoprimime", - "email.utils", - "encodings", - "encodings.aliases", - "encodings.utf_8", - "enum", - "errno", - "fcntl", - "fnmatch", - "functools", - "genericpath", - "gettext", - "glob", - "hashlib", - "http", - "http.client", - "importlib", - "importlib._bootstrap", - "importlib._bootstrap_external", - "importlib.machinery", - "inspect", - "io", - "itertools", - "json", - "json.decoder", - "json.encoder", - "json.scanner", - "keyword", - "linecache", - "locale", - "lzma", - "marshal", - "math", - "netrc", - "ntpath", - "opcode", - "operator", - "os", - "os.path", - "pathlib", - "pickle", - "platform", - "posix", - "posixpath", - "profile", - "quopri", - "random", - "re", - "reprlib", - "select", - "selectors", - "shlex", - "shutil", - "signal", - "site", - "socket", - "sre_compile", - "sre_constants", - "sre_parse", - "ssl", - "stat", - "string", - "struct", - "subprocess", - "sys", - "tempfile", - "textwrap", - "threading", - "time", - "token", - "tokenize", - "types", - "typing", - "typing.io", - "typing.re", - "urllib", - "urllib.error", - "urllib.parse", - "urllib.request", - "urllib.response", - "uu", - "uuid", - "warnings", - "weakref", - "zipimport", - "zlib" - ], - "count": 162 - }, - "meson": { - "modules": [ - "mesonbuild", - "mesonbuild._pathlib", - "mesonbuild.arglist", - "mesonbuild.ast", - "mesonbuild.ast.interpreter", - "mesonbuild.ast.introspection", - "mesonbuild.ast.postprocess", - "mesonbuild.ast.printer", - "mesonbuild.ast.visitor", - "mesonbuild.backend", - "mesonbuild.backend.backends", - "mesonbuild.backend.ninjabackend", - "mesonbuild.build", - "mesonbuild.compilers", - "mesonbuild.compilers.compilers", - "mesonbuild.compilers.detect", - "mesonbuild.coredata", - "mesonbuild.dependencies", - "mesonbuild.dependencies.base", - "mesonbuild.dependencies.detect", - "mesonbuild.depfile", - "mesonbuild.envconfig", - "mesonbuild.environment", - "mesonbuild.interpreter", - "mesonbuild.interpreter.compiler", - "mesonbuild.interpreter.dependencyfallbacks", - "mesonbuild.interpreter.interpreter", - "mesonbuild.interpreter.interpreterobjects", - "mesonbuild.interpreter.mesonmain", - "mesonbuild.interpreter.primitives", - "mesonbuild.interpreter.primitives.array", - "mesonbuild.interpreter.primitives.boolean", - "mesonbuild.interpreter.primitives.dict", - "mesonbuild.interpreter.primitives.integer", - "mesonbuild.interpreter.primitives.range", - "mesonbuild.interpreter.primitives.string", - "mesonbuild.interpreter.type_checking", - "mesonbuild.interpreterbase", - "mesonbuild.interpreterbase._unholder", - "mesonbuild.interpreterbase.baseobjects", - "mesonbuild.interpreterbase.decorators", - "mesonbuild.interpreterbase.disabler", - "mesonbuild.interpreterbase.exceptions", - "mesonbuild.interpreterbase.helpers", - "mesonbuild.interpreterbase.interpreterbase", - "mesonbuild.interpreterbase.operator", - "mesonbuild.linkers", - "mesonbuild.linkers.base", - "mesonbuild.linkers.detect", - "mesonbuild.machinefile", - "mesonbuild.mesonlib", - "mesonbuild.mesonmain", - "mesonbuild.mintro", - "mesonbuild.mlog", - "mesonbuild.modules", - "mesonbuild.mparser", - "mesonbuild.msetup", - "mesonbuild.optinterpreter", - "mesonbuild.options", - "mesonbuild.programs", - "mesonbuild.scripts", - "mesonbuild.scripts.meson_exe", - "mesonbuild.utils", - "mesonbuild.utils.core", - "mesonbuild.utils.platform", - "mesonbuild.utils.posix", - "mesonbuild.utils.universal", - "mesonbuild.utils.vsenv", - "mesonbuild.wrap", - "mesonbuild.wrap.wrap" - ], - "count": 69 - } -} diff --git a/test cases/unit/116 empty project/meson.build b/test cases/unit/116 empty project/meson.build deleted file mode 100644 index b92b9b411..000000000 --- a/test cases/unit/116 empty project/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('empty project') diff --git a/test cases/unit/117 empty project/expected_mods.json b/test cases/unit/117 empty project/expected_mods.json new file mode 100644 index 000000000..fa5e0ec6c --- /dev/null +++ b/test cases/unit/117 empty project/expected_mods.json @@ -0,0 +1,244 @@ +{ + "stdlib": { + "modules": [ + "__future__", + "__main__", + "_abc", + "_ast", + "_bisect", + "_blake2", + "_bz2", + "_codecs", + "_collections", + "_collections_abc", + "_compat_pickle", + "_compression", + "_datetime", + "_frozen_importlib", + "_frozen_importlib_external", + "_functools", + "_hashlib", + "_imp", + "_io", + "_json", + "_locale", + "_lsprof", + "_lzma", + "_opcode", + "_operator", + "_pickle", + "_posixsubprocess", + "_random", + "_sha512", + "_signal", + "_sitebuiltins", + "_socket", + "_sre", + "_ssl", + "_stat", + "_string", + "_struct", + "_thread", + "_uuid", + "_warnings", + "_weakref", + "_weakrefset", + "abc", + "argparse", + "array", + "ast", + "base64", + "binascii", + "bisect", + "builtins", + "bz2", + "cProfile", + "calendar", + "codecs", + "collections", + "collections.abc", + "configparser", + "contextlib", + "copy", + "copyreg", + "dataclasses", + "datetime", + "dis", + "email", + "email._encoded_words", + "email._parseaddr", + "email._policybase", + "email.base64mime", + "email.charset", + "email.encoders", + "email.errors", + "email.feedparser", + "email.header", + "email.iterators", + "email.message", + "email.parser", + "email.quoprimime", + "email.utils", + "encodings", + "encodings.aliases", + "encodings.utf_8", + "enum", + "errno", + "fcntl", + "fnmatch", + "functools", + "genericpath", + "gettext", + "glob", + "hashlib", + "http", + "http.client", + "importlib", + "importlib._bootstrap", + "importlib._bootstrap_external", + "importlib.machinery", + "inspect", + "io", + "itertools", + "json", + "json.decoder", + "json.encoder", + "json.scanner", + "keyword", + "linecache", + "locale", + "lzma", + "marshal", + "math", + "netrc", + "ntpath", + "opcode", + "operator", + "os", + "os.path", + "pathlib", + "pickle", + "platform", + "posix", + "posixpath", + "profile", + "quopri", + "random", + "re", + "reprlib", + "select", + "selectors", + "shlex", + "shutil", + "signal", + "site", + "socket", + "sre_compile", + "sre_constants", + "sre_parse", + "ssl", + "stat", + "string", + "struct", + "subprocess", + "sys", + "tempfile", + "textwrap", + "threading", + "time", + "token", + "tokenize", + "types", + "typing", + "typing.io", + "typing.re", + "urllib", + "urllib.error", + "urllib.parse", + "urllib.request", + "urllib.response", + "uu", + "uuid", + "warnings", + "weakref", + "zipimport", + "zlib" + ], + "count": 162 + }, + "meson": { + "modules": [ + "mesonbuild", + "mesonbuild._pathlib", + "mesonbuild.arglist", + "mesonbuild.ast", + "mesonbuild.ast.interpreter", + "mesonbuild.ast.introspection", + "mesonbuild.ast.postprocess", + "mesonbuild.ast.printer", + "mesonbuild.ast.visitor", + "mesonbuild.backend", + "mesonbuild.backend.backends", + "mesonbuild.backend.ninjabackend", + "mesonbuild.build", + "mesonbuild.compilers", + "mesonbuild.compilers.compilers", + "mesonbuild.compilers.detect", + "mesonbuild.coredata", + "mesonbuild.dependencies", + "mesonbuild.dependencies.base", + "mesonbuild.dependencies.detect", + "mesonbuild.depfile", + "mesonbuild.envconfig", + "mesonbuild.environment", + "mesonbuild.interpreter", + "mesonbuild.interpreter.compiler", + "mesonbuild.interpreter.dependencyfallbacks", + "mesonbuild.interpreter.interpreter", + "mesonbuild.interpreter.interpreterobjects", + "mesonbuild.interpreter.mesonmain", + "mesonbuild.interpreter.primitives", + "mesonbuild.interpreter.primitives.array", + "mesonbuild.interpreter.primitives.boolean", + "mesonbuild.interpreter.primitives.dict", + "mesonbuild.interpreter.primitives.integer", + "mesonbuild.interpreter.primitives.range", + "mesonbuild.interpreter.primitives.string", + "mesonbuild.interpreter.type_checking", + "mesonbuild.interpreterbase", + "mesonbuild.interpreterbase._unholder", + "mesonbuild.interpreterbase.baseobjects", + "mesonbuild.interpreterbase.decorators", + "mesonbuild.interpreterbase.disabler", + "mesonbuild.interpreterbase.exceptions", + "mesonbuild.interpreterbase.helpers", + "mesonbuild.interpreterbase.interpreterbase", + "mesonbuild.interpreterbase.operator", + "mesonbuild.linkers", + "mesonbuild.linkers.base", + "mesonbuild.linkers.detect", + "mesonbuild.machinefile", + "mesonbuild.mesonlib", + "mesonbuild.mesonmain", + "mesonbuild.mintro", + "mesonbuild.mlog", + "mesonbuild.modules", + "mesonbuild.mparser", + "mesonbuild.msetup", + "mesonbuild.optinterpreter", + "mesonbuild.options", + "mesonbuild.programs", + "mesonbuild.scripts", + "mesonbuild.scripts.meson_exe", + "mesonbuild.utils", + "mesonbuild.utils.core", + "mesonbuild.utils.platform", + "mesonbuild.utils.posix", + "mesonbuild.utils.universal", + "mesonbuild.utils.vsenv", + "mesonbuild.wrap", + "mesonbuild.wrap.wrap" + ], + "count": 69 + } +} diff --git a/test cases/unit/117 empty project/meson.build b/test cases/unit/117 empty project/meson.build new file mode 100644 index 000000000..b92b9b411 --- /dev/null +++ b/test cases/unit/117 empty project/meson.build @@ -0,0 +1 @@ +project('empty project') diff --git a/test cases/unit/117 genvslite/main.cpp b/test cases/unit/117 genvslite/main.cpp deleted file mode 100644 index ca250bdd6..000000000 --- a/test cases/unit/117 genvslite/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -int main() { -#ifdef NDEBUG - printf("Non-debug\n"); -#else - printf("Debug\n"); -#endif - return 0; -} diff --git a/test cases/unit/117 genvslite/meson.build b/test cases/unit/117 genvslite/meson.build deleted file mode 100644 index 3445d7f33..000000000 --- a/test cases/unit/117 genvslite/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('genvslite', 'cpp', - default_options : ['b_ndebug=if-release'] - ) - -exe = executable('genvslite', 'main.cpp') diff --git a/test cases/unit/118 genvslite/main.cpp b/test cases/unit/118 genvslite/main.cpp new file mode 100644 index 000000000..ca250bdd6 --- /dev/null +++ b/test cases/unit/118 genvslite/main.cpp @@ -0,0 +1,10 @@ +#include + +int main() { +#ifdef NDEBUG + printf("Non-debug\n"); +#else + printf("Debug\n"); +#endif + return 0; +} diff --git a/test cases/unit/118 genvslite/meson.build b/test cases/unit/118 genvslite/meson.build new file mode 100644 index 000000000..3445d7f33 --- /dev/null +++ b/test cases/unit/118 genvslite/meson.build @@ -0,0 +1,5 @@ +project('genvslite', 'cpp', + default_options : ['b_ndebug=if-release'] + ) + +exe = executable('genvslite', 'main.cpp') diff --git a/test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build b/test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build deleted file mode 100644 index dca36f656..000000000 --- a/test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('bar') diff --git a/test cases/unit/118 meson package cache dir/cache_dir/foo.zip b/test cases/unit/118 meson package cache dir/cache_dir/foo.zip deleted file mode 100644 index 91bc36aca..000000000 Binary files a/test cases/unit/118 meson package cache dir/cache_dir/foo.zip and /dev/null differ diff --git a/test cases/unit/118 meson package cache dir/meson.build b/test cases/unit/118 meson package cache dir/meson.build deleted file mode 100644 index 2057bba89..000000000 --- a/test cases/unit/118 meson package cache dir/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('meson package cache dir') - -subproject('foo') -subproject('bar') diff --git a/test cases/unit/118 meson package cache dir/subprojects/bar.wrap b/test cases/unit/118 meson package cache dir/subprojects/bar.wrap deleted file mode 100644 index 3ec58343b..000000000 --- a/test cases/unit/118 meson package cache dir/subprojects/bar.wrap +++ /dev/null @@ -1,3 +0,0 @@ -[wrap-file] -directory = bar - diff --git a/test cases/unit/118 meson package cache dir/subprojects/foo.wrap b/test cases/unit/118 meson package cache dir/subprojects/foo.wrap deleted file mode 100644 index b7dd41de5..000000000 --- a/test cases/unit/118 meson package cache dir/subprojects/foo.wrap +++ /dev/null @@ -1,5 +0,0 @@ -[wrap-file] -directory = foo -source_url = http://server.invalid/foo.zip -source_filename = foo.zip -source_hash = c5dd7e8fca93045f736c83700686722b0fbc20b7dc4597b295060684c5b05b72 diff --git a/test cases/unit/119 meson package cache dir/cache_dir/bar/meson.build b/test cases/unit/119 meson package cache dir/cache_dir/bar/meson.build new file mode 100644 index 000000000..dca36f656 --- /dev/null +++ b/test cases/unit/119 meson package cache dir/cache_dir/bar/meson.build @@ -0,0 +1 @@ +project('bar') diff --git a/test cases/unit/119 meson package cache dir/cache_dir/foo.zip b/test cases/unit/119 meson package cache dir/cache_dir/foo.zip new file mode 100644 index 000000000..91bc36aca Binary files /dev/null and b/test cases/unit/119 meson package cache dir/cache_dir/foo.zip differ diff --git a/test cases/unit/119 meson package cache dir/meson.build b/test cases/unit/119 meson package cache dir/meson.build new file mode 100644 index 000000000..2057bba89 --- /dev/null +++ b/test cases/unit/119 meson package cache dir/meson.build @@ -0,0 +1,4 @@ +project('meson package cache dir') + +subproject('foo') +subproject('bar') diff --git a/test cases/unit/119 meson package cache dir/subprojects/bar.wrap b/test cases/unit/119 meson package cache dir/subprojects/bar.wrap new file mode 100644 index 000000000..3ec58343b --- /dev/null +++ b/test cases/unit/119 meson package cache dir/subprojects/bar.wrap @@ -0,0 +1,3 @@ +[wrap-file] +directory = bar + diff --git a/test cases/unit/119 meson package cache dir/subprojects/foo.wrap b/test cases/unit/119 meson package cache dir/subprojects/foo.wrap new file mode 100644 index 000000000..b7dd41de5 --- /dev/null +++ b/test cases/unit/119 meson package cache dir/subprojects/foo.wrap @@ -0,0 +1,5 @@ +[wrap-file] +directory = foo +source_url = http://server.invalid/foo.zip +source_filename = foo.zip +source_hash = c5dd7e8fca93045f736c83700686722b0fbc20b7dc4597b295060684c5b05b72 diff --git a/test cases/unit/119 openssl cmake bug/meson.build b/test cases/unit/119 openssl cmake bug/meson.build deleted file mode 100644 index d08a8ef42..000000000 --- a/test cases/unit/119 openssl cmake bug/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('bug', 'cpp') - -# When cmake is not available, -# this triggers the bug described in #12098 -openssl_dep = dependency('openssl') diff --git a/test cases/unit/119 openssl cmake bug/nativefile.ini b/test cases/unit/119 openssl cmake bug/nativefile.ini deleted file mode 100644 index dd6b0ff29..000000000 --- a/test cases/unit/119 openssl cmake bug/nativefile.ini +++ /dev/null @@ -1,7 +0,0 @@ -[binaries] - -cmake = '/path/to/nothing' - -[built-in options] - -pkg_config_path = '' \ No newline at end of file diff --git a/test cases/unit/120 openssl cmake bug/meson.build b/test cases/unit/120 openssl cmake bug/meson.build new file mode 100644 index 000000000..d08a8ef42 --- /dev/null +++ b/test cases/unit/120 openssl cmake bug/meson.build @@ -0,0 +1,5 @@ +project('bug', 'cpp') + +# When cmake is not available, +# this triggers the bug described in #12098 +openssl_dep = dependency('openssl') diff --git a/test cases/unit/120 openssl cmake bug/nativefile.ini b/test cases/unit/120 openssl cmake bug/nativefile.ini new file mode 100644 index 000000000..dd6b0ff29 --- /dev/null +++ b/test cases/unit/120 openssl cmake bug/nativefile.ini @@ -0,0 +1,7 @@ +[binaries] + +cmake = '/path/to/nothing' + +[built-in options] + +pkg_config_path = '' \ No newline at end of file diff --git a/test cases/unit/120 rewrite/meson.build b/test cases/unit/120 rewrite/meson.build deleted file mode 100644 index 654b09d16..000000000 --- a/test cases/unit/120 rewrite/meson.build +++ /dev/null @@ -1,200 +0,0 @@ -# This file should expose all possible meson syntaxes - # and ensure the AstInterpreter and RawPrinter are able - - # to parse and write a file identical to the original. - - project ( # project comment 1 - # project comment 2 - 'rewrite' , # argument comment - # project comment 3 - 'cpp', - 'c', - default_options: [ - 'unity=on', - 'unity_size=50', # number of cpp / unity. default is 4... - 'warning_level=2', # eqv to /W3 - 'werror=true', # treat warnings as errors - 'b_ndebug=if-release', # disable assert in Release - 'cpp_eh=a', # /EHa exception handling - 'cpp_std=c++17', - 'cpp_winlibs=' + ','.join([ # array comment - # in array - # comment - 'kernel32.lib', - 'user32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib' - # before comma comment - , - # after comma comment - 'ole32.lib', - 'oleaut32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - 'Delayimp.lib', # For delay loaded dll - 'OLDNAMES.lib', - 'dbghelp.lib', - 'psapi.lib', - ]), - ], - meson_version: '>=1.2', - version: '1.0.0', - ) # project comment 4 - -cppcoro_dep = dependency('andreasbuhr-cppcoro-cppcoro') -cppcoro = declare_dependency( - dependencies: [cppcoro_dep.partial_dependency( - includes: true, - link_args: true, - links: true, - sources: true, - )], - # '/await:strict' allows to use rather than with C++17. - # We can remove '/await:strict' once we update to C++20. - compile_args: ['/await:strict'], - # includes:true doesn't work for now in partial_dependency() - # This line could be removed once https://github.com/mesonbuild/meson/pull/10122 is released. - include_directories: cppcoro_dep.get_variable('includedir1'), -) - - -cpp_compiler = meson.get_compiler('cpp') -if get_option('unicode') #if comment -#if comment 2 - mfc=cpp_compiler.find_library(get_option('debug')?'mfc140ud':'mfc140u') - # if comment 3 -else#elsecommentnowhitespaces - # else comment 1 - mfc = cpp_compiler.find_library( get_option( 'debug' ) ? 'mfc140d' : 'mfc140') -# else comment 2 -endif #endif comment - - -assert(1 in [1, 2], '''1 should be in [1, 2]''') -assert(3 not in [1, 2], '''3 shouldn't be in [1, 2]''') -assert(not (3 in [1, 2]), '''3 shouldn't be in [1, 2]''') - -assert('b' in ['a', 'b'], ''''b' should be in ['a', 'b']''') -assert('c' not in ['a', 'b'], ''''c' shouldn't be in ['a', 'b']''') - -exe1 = 'exe1' -exe2 = 'exe2' -exe3 = 'exe3' - -assert(exe1 in [exe1, exe2], ''''exe1 should be in [exe1, exe2]''') -assert(exe3 not in [exe1, exe2], ''''exe3 shouldn't be in [exe1, exe2]''') - -assert('a' in {'a': 'b'}, '''1 should be in {'a': 'b'}''') -assert('b'not in{'a':'b'}, '''1 should be in {'a': 'b'}''') - -assert('a'in'abc') -assert('b' not in 'def') - - -w = 'world' -d = {'a': 1, 'b': 0b10101010, 'c': 'pi', 'd': '''a -b -c''', 'e': f'hello @w@', 'f': f'''triple - formatted - string # this is not a comment - hello @w@ -''', 'g': [1, 2, 3], - - 'h' # comment a - : # comment b -0xDEADBEEF # comment c -, # comment d -'hh': 0xfeedc0de, # lowercase hexa -'hhh': 0XaBcD0123, # mixed case hexa -'oo': 0O123456, # upper O octa -'bb': 0B1111, # upper B binary -'i': {'aa': 11, # this is a comment - 'bb': 22}, # a comment inside a dict -'o': 0o754, -'m': -12, # minus number -'eq': 1 + 3 - 3 % 4 + -( 7 * 8 ), -} # end of dict comment - -hw = d['e'] -one = d['g'][0] - w += '!' - - -components = { - 'foo': ['foo.c'], - 'bar': ['bar.c'], - 'baz': ['baz.c'], # this line is indented with a tab! -} - -# compute a configuration based on system dependencies, custom logic -conf = configuration_data() -conf.set('USE_FOO', 1) - -# Determine the sources to compile -sources_to_compile = [] -foreach name, sources : components - if conf.get('USE_@0@'.format(name.to_upper()), 0) == 1 - sources_to_compile += sources - endif -endforeach - - -items = ['a', 'continue', 'b', 'break', 'c'] -result = [] -foreach i : items - if i == 'continue' - continue - elif i == 'break' - break - endif - result += i -endforeach -# result is ['a', 'b'] - - - -if a and b - # do something -endif -if c or d - # do something -endif -if not e - # do something -endif -if not (f or g) - # do something -endif - -single_quote = 'contains a \' character' -string_escapes = '\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}' -no_string_escapes = '''\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}''' - -# FIXME: is it supposed to work? (cont_eol inside string) -# cont_string = 'blablabla\ -# blablabla' - -# cont_eol with whitespace and comments after -if a \ # comment in cont 1 - and b \ # comment in cont 2 - or c # comment in cont 3 - message('ok') -endif - -if a \ - or b - debug('help!') -endif - -if false - # Should produce a warning, but should not crash - foo = not_defined - message(not_defined) -endif - - -# End of file comment with no linebreak \ No newline at end of file diff --git a/test cases/unit/121 executable suffix/main.c b/test cases/unit/121 executable suffix/main.c deleted file mode 100644 index 78f2de106..000000000 --- a/test cases/unit/121 executable suffix/main.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/unit/121 executable suffix/meson.build b/test cases/unit/121 executable suffix/meson.build deleted file mode 100644 index 7dff9d69e..000000000 --- a/test cases/unit/121 executable suffix/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('executable suffix', 'c') -foo = executable('foo', 'main.c') -foo_bin = executable('foo', 'main.c', name_suffix: 'bin') diff --git a/test cases/unit/121 rewrite/meson.build b/test cases/unit/121 rewrite/meson.build new file mode 100644 index 000000000..654b09d16 --- /dev/null +++ b/test cases/unit/121 rewrite/meson.build @@ -0,0 +1,200 @@ +# This file should expose all possible meson syntaxes + # and ensure the AstInterpreter and RawPrinter are able + + # to parse and write a file identical to the original. + + project ( # project comment 1 + # project comment 2 + 'rewrite' , # argument comment + # project comment 3 + 'cpp', + 'c', + default_options: [ + 'unity=on', + 'unity_size=50', # number of cpp / unity. default is 4... + 'warning_level=2', # eqv to /W3 + 'werror=true', # treat warnings as errors + 'b_ndebug=if-release', # disable assert in Release + 'cpp_eh=a', # /EHa exception handling + 'cpp_std=c++17', + 'cpp_winlibs=' + ','.join([ # array comment + # in array + # comment + 'kernel32.lib', + 'user32.lib', + 'gdi32.lib', + 'winspool.lib', + 'comdlg32.lib', + 'advapi32.lib', + 'shell32.lib' + # before comma comment + , + # after comma comment + 'ole32.lib', + 'oleaut32.lib', + 'uuid.lib', + 'odbc32.lib', + 'odbccp32.lib', + 'Delayimp.lib', # For delay loaded dll + 'OLDNAMES.lib', + 'dbghelp.lib', + 'psapi.lib', + ]), + ], + meson_version: '>=1.2', + version: '1.0.0', + ) # project comment 4 + +cppcoro_dep = dependency('andreasbuhr-cppcoro-cppcoro') +cppcoro = declare_dependency( + dependencies: [cppcoro_dep.partial_dependency( + includes: true, + link_args: true, + links: true, + sources: true, + )], + # '/await:strict' allows to use rather than with C++17. + # We can remove '/await:strict' once we update to C++20. + compile_args: ['/await:strict'], + # includes:true doesn't work for now in partial_dependency() + # This line could be removed once https://github.com/mesonbuild/meson/pull/10122 is released. + include_directories: cppcoro_dep.get_variable('includedir1'), +) + + +cpp_compiler = meson.get_compiler('cpp') +if get_option('unicode') #if comment +#if comment 2 + mfc=cpp_compiler.find_library(get_option('debug')?'mfc140ud':'mfc140u') + # if comment 3 +else#elsecommentnowhitespaces + # else comment 1 + mfc = cpp_compiler.find_library( get_option( 'debug' ) ? 'mfc140d' : 'mfc140') +# else comment 2 +endif #endif comment + + +assert(1 in [1, 2], '''1 should be in [1, 2]''') +assert(3 not in [1, 2], '''3 shouldn't be in [1, 2]''') +assert(not (3 in [1, 2]), '''3 shouldn't be in [1, 2]''') + +assert('b' in ['a', 'b'], ''''b' should be in ['a', 'b']''') +assert('c' not in ['a', 'b'], ''''c' shouldn't be in ['a', 'b']''') + +exe1 = 'exe1' +exe2 = 'exe2' +exe3 = 'exe3' + +assert(exe1 in [exe1, exe2], ''''exe1 should be in [exe1, exe2]''') +assert(exe3 not in [exe1, exe2], ''''exe3 shouldn't be in [exe1, exe2]''') + +assert('a' in {'a': 'b'}, '''1 should be in {'a': 'b'}''') +assert('b'not in{'a':'b'}, '''1 should be in {'a': 'b'}''') + +assert('a'in'abc') +assert('b' not in 'def') + + +w = 'world' +d = {'a': 1, 'b': 0b10101010, 'c': 'pi', 'd': '''a +b +c''', 'e': f'hello @w@', 'f': f'''triple + formatted + string # this is not a comment + hello @w@ +''', 'g': [1, 2, 3], + + 'h' # comment a + : # comment b +0xDEADBEEF # comment c +, # comment d +'hh': 0xfeedc0de, # lowercase hexa +'hhh': 0XaBcD0123, # mixed case hexa +'oo': 0O123456, # upper O octa +'bb': 0B1111, # upper B binary +'i': {'aa': 11, # this is a comment + 'bb': 22}, # a comment inside a dict +'o': 0o754, +'m': -12, # minus number +'eq': 1 + 3 - 3 % 4 + -( 7 * 8 ), +} # end of dict comment + +hw = d['e'] +one = d['g'][0] + w += '!' + + +components = { + 'foo': ['foo.c'], + 'bar': ['bar.c'], + 'baz': ['baz.c'], # this line is indented with a tab! +} + +# compute a configuration based on system dependencies, custom logic +conf = configuration_data() +conf.set('USE_FOO', 1) + +# Determine the sources to compile +sources_to_compile = [] +foreach name, sources : components + if conf.get('USE_@0@'.format(name.to_upper()), 0) == 1 + sources_to_compile += sources + endif +endforeach + + +items = ['a', 'continue', 'b', 'break', 'c'] +result = [] +foreach i : items + if i == 'continue' + continue + elif i == 'break' + break + endif + result += i +endforeach +# result is ['a', 'b'] + + + +if a and b + # do something +endif +if c or d + # do something +endif +if not e + # do something +endif +if not (f or g) + # do something +endif + +single_quote = 'contains a \' character' +string_escapes = '\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}' +no_string_escapes = '''\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}''' + +# FIXME: is it supposed to work? (cont_eol inside string) +# cont_string = 'blablabla\ +# blablabla' + +# cont_eol with whitespace and comments after +if a \ # comment in cont 1 + and b \ # comment in cont 2 + or c # comment in cont 3 + message('ok') +endif + +if a \ + or b + debug('help!') +endif + +if false + # Should produce a warning, but should not crash + foo = not_defined + message(not_defined) +endif + + +# End of file comment with no linebreak \ No newline at end of file diff --git a/test cases/unit/122 executable suffix/main.c b/test cases/unit/122 executable suffix/main.c new file mode 100644 index 000000000..78f2de106 --- /dev/null +++ b/test cases/unit/122 executable suffix/main.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/unit/122 executable suffix/meson.build b/test cases/unit/122 executable suffix/meson.build new file mode 100644 index 000000000..7dff9d69e --- /dev/null +++ b/test cases/unit/122 executable suffix/meson.build @@ -0,0 +1,3 @@ +project('executable suffix', 'c') +foo = executable('foo', 'main.c') +foo_bin = executable('foo', 'main.c', name_suffix: 'bin') diff --git a/test cases/unit/122 persp options/meson.build b/test cases/unit/122 persp options/meson.build deleted file mode 100644 index 2df4205e4..000000000 --- a/test cases/unit/122 persp options/meson.build +++ /dev/null @@ -1,24 +0,0 @@ -project('toplevel', 'c') - -round = get_option('round') -opt = get_option('optimization') -if round == 1 - assert(opt == '1') -elif round == 2 - assert(opt == '1') -elif round == 3 - assert(opt == '1') -elif round == 4 - assert(opt == '3') -elif round == 5 - assert(opt == '3') -elif round == 6 - assert(opt == '3', opt) -else - assert(false, 'Invalid round number') -endif - -executable('toplevel', 'toplevel.c') - -subproject('sub1') -subproject('sub2') diff --git a/test cases/unit/122 persp options/meson.options b/test cases/unit/122 persp options/meson.options deleted file mode 100644 index 2bfd08d36..000000000 --- a/test cases/unit/122 persp options/meson.options +++ /dev/null @@ -1 +0,0 @@ -option('round', type: 'integer', value: 1, description: 'The test round.') diff --git a/test cases/unit/122 persp options/subprojects/sub1/meson.build b/test cases/unit/122 persp options/subprojects/sub1/meson.build deleted file mode 100644 index 5b176189c..000000000 --- a/test cases/unit/122 persp options/subprojects/sub1/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project('sub1', 'c') - -round = get_option('round') -opt = get_option('optimization') -if round == 1 - assert(opt == '1') -elif round == 2 - assert(opt == '1') -elif round == 3 - assert(opt == '1') -elif round == 4 - assert(opt == '1') -elif round == 5 - assert(opt == '1') -elif round == 6 - assert(opt == '2') -else - assert(false, 'Invalid round number') -endif - - -executable('sub1', 'sub1.c') diff --git a/test cases/unit/122 persp options/subprojects/sub1/meson.options b/test cases/unit/122 persp options/subprojects/sub1/meson.options deleted file mode 100644 index ba5661a27..000000000 --- a/test cases/unit/122 persp options/subprojects/sub1/meson.options +++ /dev/null @@ -1 +0,0 @@ -option('round', type: 'integer', value: 1, description: 'The test round.', yield: true) diff --git a/test cases/unit/122 persp options/subprojects/sub1/sub1.c b/test cases/unit/122 persp options/subprojects/sub1/sub1.c deleted file mode 100644 index 4e4b87372..000000000 --- a/test cases/unit/122 persp options/subprojects/sub1/sub1.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("This is subproject 1.\n"); - return 0; -} diff --git a/test cases/unit/122 persp options/subprojects/sub2/meson.build b/test cases/unit/122 persp options/subprojects/sub2/meson.build deleted file mode 100644 index e8935bc52..000000000 --- a/test cases/unit/122 persp options/subprojects/sub2/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -project('sub2', 'c') - -round = get_option('round') -opt = get_option('optimization') -if round == 1 - assert(opt == '1') -elif round == 2 - assert(opt == '3') -elif round == 3 - assert(opt == '2') -elif round == 4 - assert(opt == '2') -elif round == 5 - assert(opt == '1') -elif round == 6 - assert(opt == '2') -else - assert(false, 'Invalid round number') -endif - -executable('sub2', 'sub2.c') diff --git a/test cases/unit/122 persp options/subprojects/sub2/meson.options b/test cases/unit/122 persp options/subprojects/sub2/meson.options deleted file mode 100644 index ba5661a27..000000000 --- a/test cases/unit/122 persp options/subprojects/sub2/meson.options +++ /dev/null @@ -1 +0,0 @@ -option('round', type: 'integer', value: 1, description: 'The test round.', yield: true) diff --git a/test cases/unit/122 persp options/subprojects/sub2/sub2.c b/test cases/unit/122 persp options/subprojects/sub2/sub2.c deleted file mode 100644 index 4e4b87372..000000000 --- a/test cases/unit/122 persp options/subprojects/sub2/sub2.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("This is subproject 1.\n"); - return 0; -} diff --git a/test cases/unit/122 persp options/toplevel.c b/test cases/unit/122 persp options/toplevel.c deleted file mode 100644 index 5748d6b37..000000000 --- a/test cases/unit/122 persp options/toplevel.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("This is the top level project.\n"); - return 0; -} diff --git a/test cases/unit/123 persp options/meson.build b/test cases/unit/123 persp options/meson.build new file mode 100644 index 000000000..2df4205e4 --- /dev/null +++ b/test cases/unit/123 persp options/meson.build @@ -0,0 +1,24 @@ +project('toplevel', 'c') + +round = get_option('round') +opt = get_option('optimization') +if round == 1 + assert(opt == '1') +elif round == 2 + assert(opt == '1') +elif round == 3 + assert(opt == '1') +elif round == 4 + assert(opt == '3') +elif round == 5 + assert(opt == '3') +elif round == 6 + assert(opt == '3', opt) +else + assert(false, 'Invalid round number') +endif + +executable('toplevel', 'toplevel.c') + +subproject('sub1') +subproject('sub2') diff --git a/test cases/unit/123 persp options/meson.options b/test cases/unit/123 persp options/meson.options new file mode 100644 index 000000000..2bfd08d36 --- /dev/null +++ b/test cases/unit/123 persp options/meson.options @@ -0,0 +1 @@ +option('round', type: 'integer', value: 1, description: 'The test round.') diff --git a/test cases/unit/123 persp options/subprojects/sub1/meson.build b/test cases/unit/123 persp options/subprojects/sub1/meson.build new file mode 100644 index 000000000..5b176189c --- /dev/null +++ b/test cases/unit/123 persp options/subprojects/sub1/meson.build @@ -0,0 +1,22 @@ +project('sub1', 'c') + +round = get_option('round') +opt = get_option('optimization') +if round == 1 + assert(opt == '1') +elif round == 2 + assert(opt == '1') +elif round == 3 + assert(opt == '1') +elif round == 4 + assert(opt == '1') +elif round == 5 + assert(opt == '1') +elif round == 6 + assert(opt == '2') +else + assert(false, 'Invalid round number') +endif + + +executable('sub1', 'sub1.c') diff --git a/test cases/unit/123 persp options/subprojects/sub1/meson.options b/test cases/unit/123 persp options/subprojects/sub1/meson.options new file mode 100644 index 000000000..ba5661a27 --- /dev/null +++ b/test cases/unit/123 persp options/subprojects/sub1/meson.options @@ -0,0 +1 @@ +option('round', type: 'integer', value: 1, description: 'The test round.', yield: true) diff --git a/test cases/unit/123 persp options/subprojects/sub1/sub1.c b/test cases/unit/123 persp options/subprojects/sub1/sub1.c new file mode 100644 index 000000000..4e4b87372 --- /dev/null +++ b/test cases/unit/123 persp options/subprojects/sub1/sub1.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("This is subproject 1.\n"); + return 0; +} diff --git a/test cases/unit/123 persp options/subprojects/sub2/meson.build b/test cases/unit/123 persp options/subprojects/sub2/meson.build new file mode 100644 index 000000000..e8935bc52 --- /dev/null +++ b/test cases/unit/123 persp options/subprojects/sub2/meson.build @@ -0,0 +1,21 @@ +project('sub2', 'c') + +round = get_option('round') +opt = get_option('optimization') +if round == 1 + assert(opt == '1') +elif round == 2 + assert(opt == '3') +elif round == 3 + assert(opt == '2') +elif round == 4 + assert(opt == '2') +elif round == 5 + assert(opt == '1') +elif round == 6 + assert(opt == '2') +else + assert(false, 'Invalid round number') +endif + +executable('sub2', 'sub2.c') diff --git a/test cases/unit/123 persp options/subprojects/sub2/meson.options b/test cases/unit/123 persp options/subprojects/sub2/meson.options new file mode 100644 index 000000000..ba5661a27 --- /dev/null +++ b/test cases/unit/123 persp options/subprojects/sub2/meson.options @@ -0,0 +1 @@ +option('round', type: 'integer', value: 1, description: 'The test round.', yield: true) diff --git a/test cases/unit/123 persp options/subprojects/sub2/sub2.c b/test cases/unit/123 persp options/subprojects/sub2/sub2.c new file mode 100644 index 000000000..4e4b87372 --- /dev/null +++ b/test cases/unit/123 persp options/subprojects/sub2/sub2.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("This is subproject 1.\n"); + return 0; +} diff --git a/test cases/unit/123 persp options/toplevel.c b/test cases/unit/123 persp options/toplevel.c new file mode 100644 index 000000000..5748d6b37 --- /dev/null +++ b/test cases/unit/123 persp options/toplevel.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("This is the top level project.\n"); + return 0; +} diff --git a/test cases/unit/123 reconfigure base options/meson.build b/test cases/unit/123 reconfigure base options/meson.build deleted file mode 100644 index 8a13b78b2..000000000 --- a/test cases/unit/123 reconfigure base options/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('reconfigure', 'c', -default_options: ['c_std=c89']) - -subproject('sub') - -message('b_ndebug: ' + get_option('b_ndebug')) -message('c_std: ' + get_option('c_std')) diff --git a/test cases/unit/123 reconfigure base options/subprojects/sub/meson.build b/test cases/unit/123 reconfigure base options/subprojects/sub/meson.build deleted file mode 100644 index ba740d1ca..000000000 --- a/test cases/unit/123 reconfigure base options/subprojects/sub/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('sub', 'c', -default_options: ['c_std=c89']) - -message('b_ndebug: ' + get_option('b_ndebug')) -message('c_std: ' + get_option('c_std')) diff --git a/test cases/unit/124 interactive tap/meson.build b/test cases/unit/124 interactive tap/meson.build deleted file mode 100644 index 30518db6f..000000000 --- a/test cases/unit/124 interactive tap/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('interactive TAP output') - -test_script = find_program('script.py') -test('main', test_script, protocol: 'tap') diff --git a/test cases/unit/124 interactive tap/script.py b/test cases/unit/124 interactive tap/script.py deleted file mode 100755 index 873a4ae81..000000000 --- a/test cases/unit/124 interactive tap/script.py +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python3 - -print('''1..2 -ok 1 -not ok 2''') diff --git a/test cases/unit/124 reconfigure base options/meson.build b/test cases/unit/124 reconfigure base options/meson.build new file mode 100644 index 000000000..8a13b78b2 --- /dev/null +++ b/test cases/unit/124 reconfigure base options/meson.build @@ -0,0 +1,7 @@ +project('reconfigure', 'c', +default_options: ['c_std=c89']) + +subproject('sub') + +message('b_ndebug: ' + get_option('b_ndebug')) +message('c_std: ' + get_option('c_std')) diff --git a/test cases/unit/124 reconfigure base options/subprojects/sub/meson.build b/test cases/unit/124 reconfigure base options/subprojects/sub/meson.build new file mode 100644 index 000000000..ba740d1ca --- /dev/null +++ b/test cases/unit/124 reconfigure base options/subprojects/sub/meson.build @@ -0,0 +1,5 @@ +project('sub', 'c', +default_options: ['c_std=c89']) + +message('b_ndebug: ' + get_option('b_ndebug')) +message('c_std: ' + get_option('c_std')) diff --git a/test cases/unit/125 declare_dep var/meson.build b/test cases/unit/125 declare_dep var/meson.build deleted file mode 100644 index 4909b590e..000000000 --- a/test cases/unit/125 declare_dep var/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('foo') - -declare_dependency( - variables: { - 'dir': get_option('dir') - } -) diff --git a/test cases/unit/125 declare_dep var/meson_options.txt b/test cases/unit/125 declare_dep var/meson_options.txt deleted file mode 100644 index eb15ffcde..000000000 --- a/test cases/unit/125 declare_dep var/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('dir', type: 'string') diff --git a/test cases/unit/125 interactive tap/meson.build b/test cases/unit/125 interactive tap/meson.build new file mode 100644 index 000000000..30518db6f --- /dev/null +++ b/test cases/unit/125 interactive tap/meson.build @@ -0,0 +1,4 @@ +project('interactive TAP output') + +test_script = find_program('script.py') +test('main', test_script, protocol: 'tap') diff --git a/test cases/unit/125 interactive tap/script.py b/test cases/unit/125 interactive tap/script.py new file mode 100755 index 000000000..873a4ae81 --- /dev/null +++ b/test cases/unit/125 interactive tap/script.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python3 + +print('''1..2 +ok 1 +not ok 2''') diff --git a/test cases/unit/125 pkgsubproj/meson.build b/test cases/unit/125 pkgsubproj/meson.build deleted file mode 100644 index b4cf89fa0..000000000 --- a/test cases/unit/125 pkgsubproj/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('pkg_opt_test') - -subproject('sub') diff --git a/test cases/unit/125 pkgsubproj/subprojects/sub/meson.build b/test cases/unit/125 pkgsubproj/subprojects/sub/meson.build deleted file mode 100644 index 99622b681..000000000 --- a/test cases/unit/125 pkgsubproj/subprojects/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('subproject', default_options: 'pkgconfig.relocatable=true') diff --git a/test cases/unit/126 declare_dep var/meson.build b/test cases/unit/126 declare_dep var/meson.build new file mode 100644 index 000000000..4909b590e --- /dev/null +++ b/test cases/unit/126 declare_dep var/meson.build @@ -0,0 +1,7 @@ +project('foo') + +declare_dependency( + variables: { + 'dir': get_option('dir') + } +) diff --git a/test cases/unit/126 declare_dep var/meson_options.txt b/test cases/unit/126 declare_dep var/meson_options.txt new file mode 100644 index 000000000..eb15ffcde --- /dev/null +++ b/test cases/unit/126 declare_dep var/meson_options.txt @@ -0,0 +1 @@ +option('dir', type: 'string') diff --git a/test cases/unit/126 test slice/meson.build b/test cases/unit/126 test slice/meson.build deleted file mode 100644 index a41c2f62d..000000000 --- a/test cases/unit/126 test slice/meson.build +++ /dev/null @@ -1,12 +0,0 @@ -project('test_slice') - -python = import('python').find_installation('python3') - -foreach i : range(10) - test('test-' + (i + 1).to_string(), - python, - args: [ - meson.current_source_dir() / 'test.py' - ], - ) -endforeach diff --git a/test cases/unit/126 test slice/test.py b/test cases/unit/126 test slice/test.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/127 pkgsubproj/meson.build b/test cases/unit/127 pkgsubproj/meson.build new file mode 100644 index 000000000..b4cf89fa0 --- /dev/null +++ b/test cases/unit/127 pkgsubproj/meson.build @@ -0,0 +1,3 @@ +project('pkg_opt_test') + +subproject('sub') diff --git a/test cases/unit/127 pkgsubproj/subprojects/sub/meson.build b/test cases/unit/127 pkgsubproj/subprojects/sub/meson.build new file mode 100644 index 000000000..99622b681 --- /dev/null +++ b/test cases/unit/127 pkgsubproj/subprojects/sub/meson.build @@ -0,0 +1 @@ +project('subproject', default_options: 'pkgconfig.relocatable=true') diff --git a/test cases/unit/127 sanitizers/meson.build b/test cases/unit/127 sanitizers/meson.build deleted file mode 100644 index b42fb35d4..000000000 --- a/test cases/unit/127 sanitizers/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# Copyright © 2023-2024 Intel Corporation - -project('sanitizer', 'c', meson_version : '>= 1.8') - -summary({ - 'value': get_option('b_sanitize'), -}, section: 'summary') diff --git a/test cases/unit/128 long opt vs D/meson.build b/test cases/unit/128 long opt vs D/meson.build deleted file mode 100644 index e05d88d20..000000000 --- a/test cases/unit/128 long opt vs D/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('empty test') diff --git a/test cases/unit/128 long opt vs D/meson_options.txt b/test cases/unit/128 long opt vs D/meson_options.txt deleted file mode 100644 index 255bf1576..000000000 --- a/test cases/unit/128 long opt vs D/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('sysconfdir2', type: 'string', value: '') diff --git a/test cases/unit/128 test slice/meson.build b/test cases/unit/128 test slice/meson.build new file mode 100644 index 000000000..a41c2f62d --- /dev/null +++ b/test cases/unit/128 test slice/meson.build @@ -0,0 +1,12 @@ +project('test_slice') + +python = import('python').find_installation('python3') + +foreach i : range(10) + test('test-' + (i + 1).to_string(), + python, + args: [ + meson.current_source_dir() / 'test.py' + ], + ) +endforeach diff --git a/test cases/unit/128 test slice/test.py b/test cases/unit/128 test slice/test.py new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/129 sanitizers/meson.build b/test cases/unit/129 sanitizers/meson.build new file mode 100644 index 000000000..b42fb35d4 --- /dev/null +++ b/test cases/unit/129 sanitizers/meson.build @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: Apache-2.0 +# Copyright © 2023-2024 Intel Corporation + +project('sanitizer', 'c', meson_version : '>= 1.8') + +summary({ + 'value': get_option('b_sanitize'), +}, section: 'summary') diff --git a/test cases/unit/129 vala internal glib/lib.vala b/test cases/unit/129 vala internal glib/lib.vala deleted file mode 100644 index e62e63234..000000000 --- a/test cases/unit/129 vala internal glib/lib.vala +++ /dev/null @@ -1,3 +0,0 @@ -public int func() { - return 42; -} diff --git a/test cases/unit/129 vala internal glib/meson.build b/test cases/unit/129 vala internal glib/meson.build deleted file mode 100644 index 947908200..000000000 --- a/test cases/unit/129 vala internal glib/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -project('vala internal glib') - -if not add_languages('vala', required: false) - error('MESON_SKIP_TEST valac not installed') -endif - -glib_ver = get_option('glib-version') -if glib_ver == 'unset' - error('Required to set -Dglib-version') -endif - -glib_dep = declare_dependency(version: glib_ver) -meson.override_dependency('glib-2.0', glib_dep) - -named_glib_dep = dependency('glib-2.0') - -assert(named_glib_dep.type_name() == 'internal') -assert(glib_dep == named_glib_dep) - -tgt = static_library('vala-tgt', 'lib.vala', - dependencies: named_glib_dep) diff --git a/test cases/unit/129 vala internal glib/meson.options b/test cases/unit/129 vala internal glib/meson.options deleted file mode 100644 index f8a1ecee3..000000000 --- a/test cases/unit/129 vala internal glib/meson.options +++ /dev/null @@ -1 +0,0 @@ -option('glib-version', type: 'string', value: 'unset') diff --git a/test cases/unit/130 long opt vs D/meson.build b/test cases/unit/130 long opt vs D/meson.build new file mode 100644 index 000000000..e05d88d20 --- /dev/null +++ b/test cases/unit/130 long opt vs D/meson.build @@ -0,0 +1 @@ +project('empty test') diff --git a/test cases/unit/130 long opt vs D/meson_options.txt b/test cases/unit/130 long opt vs D/meson_options.txt new file mode 100644 index 000000000..255bf1576 --- /dev/null +++ b/test cases/unit/130 long opt vs D/meson_options.txt @@ -0,0 +1 @@ +option('sysconfdir2', type: 'string', value: '') diff --git a/test cases/unit/131 vala internal glib/lib.vala b/test cases/unit/131 vala internal glib/lib.vala new file mode 100644 index 000000000..e62e63234 --- /dev/null +++ b/test cases/unit/131 vala internal glib/lib.vala @@ -0,0 +1,3 @@ +public int func() { + return 42; +} diff --git a/test cases/unit/131 vala internal glib/meson.build b/test cases/unit/131 vala internal glib/meson.build new file mode 100644 index 000000000..947908200 --- /dev/null +++ b/test cases/unit/131 vala internal glib/meson.build @@ -0,0 +1,21 @@ +project('vala internal glib') + +if not add_languages('vala', required: false) + error('MESON_SKIP_TEST valac not installed') +endif + +glib_ver = get_option('glib-version') +if glib_ver == 'unset' + error('Required to set -Dglib-version') +endif + +glib_dep = declare_dependency(version: glib_ver) +meson.override_dependency('glib-2.0', glib_dep) + +named_glib_dep = dependency('glib-2.0') + +assert(named_glib_dep.type_name() == 'internal') +assert(glib_dep == named_glib_dep) + +tgt = static_library('vala-tgt', 'lib.vala', + dependencies: named_glib_dep) diff --git a/test cases/unit/131 vala internal glib/meson.options b/test cases/unit/131 vala internal glib/meson.options new file mode 100644 index 000000000..f8a1ecee3 --- /dev/null +++ b/test cases/unit/131 vala internal glib/meson.options @@ -0,0 +1 @@ +option('glib-version', type: 'string', value: 'unset') diff --git a/test cases/unit/91 install skip subprojects/foo.c b/test cases/unit/91 install skip subprojects/foo.c deleted file mode 100644 index 25927f5a1..000000000 --- a/test cases/unit/91 install skip subprojects/foo.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char *argv[]) -{ - return 0; -} diff --git a/test cases/unit/91 install skip subprojects/foo.dat b/test cases/unit/91 install skip subprojects/foo.dat deleted file mode 100644 index 421376db9..000000000 --- a/test cases/unit/91 install skip subprojects/foo.dat +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/91 install skip subprojects/foo.h b/test cases/unit/91 install skip subprojects/foo.h deleted file mode 100644 index a7e26ac6c..000000000 --- a/test cases/unit/91 install skip subprojects/foo.h +++ /dev/null @@ -1 +0,0 @@ -#define FOO diff --git a/test cases/unit/91 install skip subprojects/foo/foofile b/test cases/unit/91 install skip subprojects/foo/foofile deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/91 install skip subprojects/meson.build b/test cases/unit/91 install skip subprojects/meson.build deleted file mode 100644 index cfbae9483..000000000 --- a/test cases/unit/91 install skip subprojects/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('foo', 'c') - -install_data('foo.dat') -install_headers('foo.h') -install_subdir('foo', install_dir: '') -executable('foo', 'foo.c', install: true) - -subproject('bar') diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c deleted file mode 100644 index 25927f5a1..000000000 --- a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char *argv[]) -{ - return 0; -} diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat deleted file mode 100644 index 421376db9..000000000 --- a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h deleted file mode 100644 index a7e26ac6c..000000000 --- a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h +++ /dev/null @@ -1 +0,0 @@ -#define FOO diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile b/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile deleted file mode 100644 index 421376db9..000000000 --- a/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/meson.build b/test cases/unit/91 install skip subprojects/subprojects/bar/meson.build deleted file mode 100644 index b5b073408..000000000 --- a/test cases/unit/91 install skip subprojects/subprojects/bar/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('bar', 'c') - -install_data('bar.dat') -install_headers('bar.h') -install_subdir('bar', install_dir: '') -executable('bar', 'bar.c', install: true) diff --git a/test cases/unit/92 install skip subprojects/foo.c b/test cases/unit/92 install skip subprojects/foo.c new file mode 100644 index 000000000..25927f5a1 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/foo.c @@ -0,0 +1,4 @@ +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/test cases/unit/92 install skip subprojects/foo.dat b/test cases/unit/92 install skip subprojects/foo.dat new file mode 100644 index 000000000..421376db9 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/foo.dat @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/92 install skip subprojects/foo.h b/test cases/unit/92 install skip subprojects/foo.h new file mode 100644 index 000000000..a7e26ac6c --- /dev/null +++ b/test cases/unit/92 install skip subprojects/foo.h @@ -0,0 +1 @@ +#define FOO diff --git a/test cases/unit/92 install skip subprojects/foo/foofile b/test cases/unit/92 install skip subprojects/foo/foofile new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/92 install skip subprojects/meson.build b/test cases/unit/92 install skip subprojects/meson.build new file mode 100644 index 000000000..cfbae9483 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/meson.build @@ -0,0 +1,8 @@ +project('foo', 'c') + +install_data('foo.dat') +install_headers('foo.h') +install_subdir('foo', install_dir: '') +executable('foo', 'foo.c', install: true) + +subproject('bar') diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c new file mode 100644 index 000000000..25927f5a1 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c @@ -0,0 +1,4 @@ +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat new file mode 100644 index 000000000..421376db9 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h new file mode 100644 index 000000000..a7e26ac6c --- /dev/null +++ b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h @@ -0,0 +1 @@ +#define FOO diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile b/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile new file mode 100644 index 000000000..421376db9 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/meson.build b/test cases/unit/92 install skip subprojects/subprojects/bar/meson.build new file mode 100644 index 000000000..b5b073408 --- /dev/null +++ b/test cases/unit/92 install skip subprojects/subprojects/bar/meson.build @@ -0,0 +1,6 @@ +project('bar', 'c') + +install_data('bar.dat') +install_headers('bar.h') +install_subdir('bar', install_dir: '') +executable('bar', 'bar.c', install: true) diff --git a/test cases/unit/92 new subproject in configured project/meson.build b/test cases/unit/92 new subproject in configured project/meson.build deleted file mode 100644 index b82aa4173..000000000 --- a/test cases/unit/92 new subproject in configured project/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -# Copyright © 2021 Intel Corporation -project('existing project with new subproject', 'c') - -if get_option('use-sub') - dep = subproject('sub') -endif diff --git a/test cases/unit/92 new subproject in configured project/meson_options.txt b/test cases/unit/92 new subproject in configured project/meson_options.txt deleted file mode 100644 index 12d8395d4..000000000 --- a/test cases/unit/92 new subproject in configured project/meson_options.txt +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -# Copyright © 2021 Intel Corporation -option('use-sub', type : 'boolean', value : false) diff --git a/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c b/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c deleted file mode 100644 index 9713d9f7f..000000000 --- a/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-license-identifier: Apache-2.0 */ -/* Copyright © 2021 Intel Corporation */ - -int func(void) { - return 1; -} diff --git a/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build b/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build deleted file mode 100644 index a833b0c35..000000000 --- a/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -# Copyright © 2021 Intel Corporation -project('new subproject', 'c') - -l = library('foo', 'foo.c') - -dep = declare_dependency(link_with : l) diff --git a/test cases/unit/93 clangformat/.clang-format b/test cases/unit/93 clangformat/.clang-format deleted file mode 100644 index 689bc6047..000000000 --- a/test cases/unit/93 clangformat/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ ---- -BasedOnStyle: Google - -... diff --git a/test cases/unit/93 clangformat/.clang-format-ignore b/test cases/unit/93 clangformat/.clang-format-ignore deleted file mode 100644 index 7fc4d5a95..000000000 --- a/test cases/unit/93 clangformat/.clang-format-ignore +++ /dev/null @@ -1,3 +0,0 @@ - -# Ignore C files -*.c diff --git a/test cases/unit/93 clangformat/.clang-format-include b/test cases/unit/93 clangformat/.clang-format-include deleted file mode 100644 index f057c0033..000000000 --- a/test cases/unit/93 clangformat/.clang-format-include +++ /dev/null @@ -1,3 +0,0 @@ - -# Only reformat in src/ -src/**/* diff --git a/test cases/unit/93 clangformat/meson.build b/test cases/unit/93 clangformat/meson.build deleted file mode 100644 index 8f4af981b..000000000 --- a/test cases/unit/93 clangformat/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('dummy', 'c', 'cpp') diff --git a/test cases/unit/93 clangformat/not-included/badformat.cpp b/test cases/unit/93 clangformat/not-included/badformat.cpp deleted file mode 100644 index 99a0ea60c..000000000 --- a/test cases/unit/93 clangformat/not-included/badformat.cpp +++ /dev/null @@ -1,2 +0,0 @@ -class { -}; diff --git a/test cases/unit/93 clangformat/src/badformat.c b/test cases/unit/93 clangformat/src/badformat.c deleted file mode 100644 index f1d18b7ed..000000000 --- a/test cases/unit/93 clangformat/src/badformat.c +++ /dev/null @@ -1,2 +0,0 @@ -struct { -}; diff --git a/test cases/unit/93 clangformat/src/badformat.cpp b/test cases/unit/93 clangformat/src/badformat.cpp deleted file mode 100644 index 99a0ea60c..000000000 --- a/test cases/unit/93 clangformat/src/badformat.cpp +++ /dev/null @@ -1,2 +0,0 @@ -class { -}; diff --git a/test cases/unit/93 new subproject in configured project/meson.build b/test cases/unit/93 new subproject in configured project/meson.build new file mode 100644 index 000000000..b82aa4173 --- /dev/null +++ b/test cases/unit/93 new subproject in configured project/meson.build @@ -0,0 +1,7 @@ +# SPDX-license-identifier: Apache-2.0 +# Copyright © 2021 Intel Corporation +project('existing project with new subproject', 'c') + +if get_option('use-sub') + dep = subproject('sub') +endif diff --git a/test cases/unit/93 new subproject in configured project/meson_options.txt b/test cases/unit/93 new subproject in configured project/meson_options.txt new file mode 100644 index 000000000..12d8395d4 --- /dev/null +++ b/test cases/unit/93 new subproject in configured project/meson_options.txt @@ -0,0 +1,3 @@ +# SPDX-license-identifier: Apache-2.0 +# Copyright © 2021 Intel Corporation +option('use-sub', type : 'boolean', value : false) diff --git a/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c b/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c new file mode 100644 index 000000000..9713d9f7f --- /dev/null +++ b/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c @@ -0,0 +1,6 @@ +/* SPDX-license-identifier: Apache-2.0 */ +/* Copyright © 2021 Intel Corporation */ + +int func(void) { + return 1; +} diff --git a/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build b/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build new file mode 100644 index 000000000..a833b0c35 --- /dev/null +++ b/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build @@ -0,0 +1,7 @@ +# SPDX-license-identifier: Apache-2.0 +# Copyright © 2021 Intel Corporation +project('new subproject', 'c') + +l = library('foo', 'foo.c') + +dep = declare_dependency(link_with : l) diff --git a/test cases/unit/94 clangformat/.clang-format b/test cases/unit/94 clangformat/.clang-format new file mode 100644 index 000000000..689bc6047 --- /dev/null +++ b/test cases/unit/94 clangformat/.clang-format @@ -0,0 +1,4 @@ +--- +BasedOnStyle: Google + +... diff --git a/test cases/unit/94 clangformat/.clang-format-ignore b/test cases/unit/94 clangformat/.clang-format-ignore new file mode 100644 index 000000000..7fc4d5a95 --- /dev/null +++ b/test cases/unit/94 clangformat/.clang-format-ignore @@ -0,0 +1,3 @@ + +# Ignore C files +*.c diff --git a/test cases/unit/94 clangformat/.clang-format-include b/test cases/unit/94 clangformat/.clang-format-include new file mode 100644 index 000000000..f057c0033 --- /dev/null +++ b/test cases/unit/94 clangformat/.clang-format-include @@ -0,0 +1,3 @@ + +# Only reformat in src/ +src/**/* diff --git a/test cases/unit/94 clangformat/meson.build b/test cases/unit/94 clangformat/meson.build new file mode 100644 index 000000000..8f4af981b --- /dev/null +++ b/test cases/unit/94 clangformat/meson.build @@ -0,0 +1 @@ +project('dummy', 'c', 'cpp') diff --git a/test cases/unit/94 clangformat/not-included/badformat.cpp b/test cases/unit/94 clangformat/not-included/badformat.cpp new file mode 100644 index 000000000..99a0ea60c --- /dev/null +++ b/test cases/unit/94 clangformat/not-included/badformat.cpp @@ -0,0 +1,2 @@ +class { +}; diff --git a/test cases/unit/94 clangformat/src/badformat.c b/test cases/unit/94 clangformat/src/badformat.c new file mode 100644 index 000000000..f1d18b7ed --- /dev/null +++ b/test cases/unit/94 clangformat/src/badformat.c @@ -0,0 +1,2 @@ +struct { +}; diff --git a/test cases/unit/94 clangformat/src/badformat.cpp b/test cases/unit/94 clangformat/src/badformat.cpp new file mode 100644 index 000000000..99a0ea60c --- /dev/null +++ b/test cases/unit/94 clangformat/src/badformat.cpp @@ -0,0 +1,2 @@ +class { +}; diff --git a/test cases/unit/94 custominc/easytogrepfor/genh.py b/test cases/unit/94 custominc/easytogrepfor/genh.py deleted file mode 100644 index 48e033a72..000000000 --- a/test cases/unit/94 custominc/easytogrepfor/genh.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -f = open(sys.argv[1], 'w') -f.write('#define RETURN_VALUE 0') -f.close() diff --git a/test cases/unit/94 custominc/easytogrepfor/meson.build b/test cases/unit/94 custominc/easytogrepfor/meson.build deleted file mode 100644 index e749753bc..000000000 --- a/test cases/unit/94 custominc/easytogrepfor/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -genh = custom_target('header', - output: 'generated.h', - command: [find_program('genh.py'), '@OUTPUT@']) diff --git a/test cases/unit/94 custominc/helper.c b/test cases/unit/94 custominc/helper.c deleted file mode 100644 index 3237441bc..000000000 --- a/test cases/unit/94 custominc/helper.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int func(void) { - return RETURN_VALUE; -} diff --git a/test cases/unit/94 custominc/meson.build b/test cases/unit/94 custominc/meson.build deleted file mode 100644 index bab113908..000000000 --- a/test cases/unit/94 custominc/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('implicit custom dirs', 'c') - -subdir('easytogrepfor') - -l = static_library('helper', 'helper.c', genh) -d = declare_dependency(link_with: l, sources: genh) -executable('prog', 'prog.c', dependencies: d, implicit_include_directories: false) - -executable('prog2', 'prog2.c', dependencies: d) diff --git a/test cases/unit/94 custominc/prog.c b/test cases/unit/94 custominc/prog.c deleted file mode 100644 index db9df9d5e..000000000 --- a/test cases/unit/94 custominc/prog.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int func(void); - -int main(int argc, char **argv) { - (void)argc; - (void)(argv); - return func(); -} diff --git a/test cases/unit/94 custominc/prog2.c b/test cases/unit/94 custominc/prog2.c deleted file mode 100644 index e64b22919..000000000 --- a/test cases/unit/94 custominc/prog2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int func(void); - -int main(int argc, char **argv) { - (void)argc; - (void)(argv); - return func() + RETURN_VALUE; -} diff --git a/test cases/unit/95 custominc/easytogrepfor/genh.py b/test cases/unit/95 custominc/easytogrepfor/genh.py new file mode 100644 index 000000000..48e033a72 --- /dev/null +++ b/test cases/unit/95 custominc/easytogrepfor/genh.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +f = open(sys.argv[1], 'w') +f.write('#define RETURN_VALUE 0') +f.close() diff --git a/test cases/unit/95 custominc/easytogrepfor/meson.build b/test cases/unit/95 custominc/easytogrepfor/meson.build new file mode 100644 index 000000000..e749753bc --- /dev/null +++ b/test cases/unit/95 custominc/easytogrepfor/meson.build @@ -0,0 +1,3 @@ +genh = custom_target('header', + output: 'generated.h', + command: [find_program('genh.py'), '@OUTPUT@']) diff --git a/test cases/unit/95 custominc/helper.c b/test cases/unit/95 custominc/helper.c new file mode 100644 index 000000000..3237441bc --- /dev/null +++ b/test cases/unit/95 custominc/helper.c @@ -0,0 +1,5 @@ +#include + +int func(void) { + return RETURN_VALUE; +} diff --git a/test cases/unit/95 custominc/meson.build b/test cases/unit/95 custominc/meson.build new file mode 100644 index 000000000..bab113908 --- /dev/null +++ b/test cases/unit/95 custominc/meson.build @@ -0,0 +1,9 @@ +project('implicit custom dirs', 'c') + +subdir('easytogrepfor') + +l = static_library('helper', 'helper.c', genh) +d = declare_dependency(link_with: l, sources: genh) +executable('prog', 'prog.c', dependencies: d, implicit_include_directories: false) + +executable('prog2', 'prog2.c', dependencies: d) diff --git a/test cases/unit/95 custominc/prog.c b/test cases/unit/95 custominc/prog.c new file mode 100644 index 000000000..db9df9d5e --- /dev/null +++ b/test cases/unit/95 custominc/prog.c @@ -0,0 +1,9 @@ +#include + +int func(void); + +int main(int argc, char **argv) { + (void)argc; + (void)(argv); + return func(); +} diff --git a/test cases/unit/95 custominc/prog2.c b/test cases/unit/95 custominc/prog2.c new file mode 100644 index 000000000..e64b22919 --- /dev/null +++ b/test cases/unit/95 custominc/prog2.c @@ -0,0 +1,10 @@ +#include +#include + +int func(void); + +int main(int argc, char **argv) { + (void)argc; + (void)(argv); + return func() + RETURN_VALUE; +} diff --git a/test cases/unit/95 implicit force fallback/meson.build b/test cases/unit/95 implicit force fallback/meson.build deleted file mode 100644 index 623a338db..000000000 --- a/test cases/unit/95 implicit force fallback/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('implicit force fallback') - -# The dependency 'something' is provided by a subproject. Normally this won't -# use the fallback subproject because required is false. However this unit test -# is configured with wrap_mode=forcefallback and force_fallback_for=something -# in which case we are expecting the fallback to be done. -d = dependency('something', required: false) -assert(d.found()) diff --git a/test cases/unit/95 implicit force fallback/subprojects/something/meson.build b/test cases/unit/95 implicit force fallback/subprojects/something/meson.build deleted file mode 100644 index 89a4727dc..000000000 --- a/test cases/unit/95 implicit force fallback/subprojects/something/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('something') - -meson.override_dependency('something', declare_dependency()) diff --git a/test cases/unit/96 compiler.links file arg/meson.build b/test cases/unit/96 compiler.links file arg/meson.build deleted file mode 100644 index c409dcbd1..000000000 --- a/test cases/unit/96 compiler.links file arg/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('test', ['c', 'cpp']) - -cc = meson.get_compiler('c') -cxx = meson.get_compiler('cpp') - -# used by run_unittests.py to grab the path to the C and C++ compilers -assert(cc.compiles(files('test.c'))) -assert(cxx.compiles(files('test.c'))) - -assert(cc.links(files('test.c'))) -assert(cxx.links(files('test.c'))) diff --git a/test cases/unit/96 compiler.links file arg/test.c b/test cases/unit/96 compiler.links file arg/test.c deleted file mode 100644 index 78f2de106..000000000 --- a/test cases/unit/96 compiler.links file arg/test.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/unit/96 implicit force fallback/meson.build b/test cases/unit/96 implicit force fallback/meson.build new file mode 100644 index 000000000..623a338db --- /dev/null +++ b/test cases/unit/96 implicit force fallback/meson.build @@ -0,0 +1,8 @@ +project('implicit force fallback') + +# The dependency 'something' is provided by a subproject. Normally this won't +# use the fallback subproject because required is false. However this unit test +# is configured with wrap_mode=forcefallback and force_fallback_for=something +# in which case we are expecting the fallback to be done. +d = dependency('something', required: false) +assert(d.found()) diff --git a/test cases/unit/96 implicit force fallback/subprojects/something/meson.build b/test cases/unit/96 implicit force fallback/subprojects/something/meson.build new file mode 100644 index 000000000..89a4727dc --- /dev/null +++ b/test cases/unit/96 implicit force fallback/subprojects/something/meson.build @@ -0,0 +1,3 @@ +project('something') + +meson.override_dependency('something', declare_dependency()) diff --git a/test cases/unit/97 compiler.links file arg/meson.build b/test cases/unit/97 compiler.links file arg/meson.build new file mode 100644 index 000000000..c409dcbd1 --- /dev/null +++ b/test cases/unit/97 compiler.links file arg/meson.build @@ -0,0 +1,11 @@ +project('test', ['c', 'cpp']) + +cc = meson.get_compiler('c') +cxx = meson.get_compiler('cpp') + +# used by run_unittests.py to grab the path to the C and C++ compilers +assert(cc.compiles(files('test.c'))) +assert(cxx.compiles(files('test.c'))) + +assert(cc.links(files('test.c'))) +assert(cxx.links(files('test.c'))) diff --git a/test cases/unit/97 compiler.links file arg/test.c b/test cases/unit/97 compiler.links file arg/test.c new file mode 100644 index 000000000..78f2de106 --- /dev/null +++ b/test cases/unit/97 compiler.links file arg/test.c @@ -0,0 +1 @@ +int main(void) { return 0; } 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 812960172..000000000 --- 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 128c213ac..000000000 --- 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 5e79966f7..000000000 --- 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 5be5bc998..000000000 --- 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 d661ae4ca..000000000 --- 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_FAILURE (-1) - -int main(void) { - if (get_checked() == CHECK_VALUE) { - fprintf(stdout,"good\n"); - return TEST_SUCCESS; - } - fprintf(stdout,"bad\n"); - return TEST_FAILURE; -} 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 e69de29bb..000000000 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 e69de29bb..000000000 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 e69de29bb..000000000 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 557db03de..000000000 --- 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/excludes/excluded.txt b/test cases/unit/98 install all targets/excludes/excluded.txt deleted file mode 100644 index 59b064403..000000000 --- a/test cases/unit/98 install all targets/excludes/excluded.txt +++ /dev/null @@ -1 +0,0 @@ -Excluded diff --git a/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt b/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt deleted file mode 100644 index 3b94f9157..000000000 --- a/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -Placeholder diff --git a/test cases/unit/98 install all targets/excludes/installed.txt b/test cases/unit/98 install all targets/excludes/installed.txt deleted file mode 100644 index 84376928c..000000000 --- a/test cases/unit/98 install all targets/excludes/installed.txt +++ /dev/null @@ -1 +0,0 @@ -Installed 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 e69de29bb..000000000 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 e69de29bb..000000000 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 2ea9c7dd1..000000000 --- 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 0fb4389f7..000000000 --- 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 c5f33a054..000000000 --- a/test cases/unit/98 install all targets/meson.build +++ /dev/null @@ -1,116 +0,0 @@ -project('install tag', 'c') - -subproject('subproject') - -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, -) -custom_target('ct-header1', - output: ['ct-header1.h'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('includedir'), - install: true, -) -custom_target('ct-header2', - output: ['ct-header2.h', 'ct-header3.h'], - command: ['script.py', '@OUTPUT@'], - install_dir: [false, get_option('includedir')], - install: true, -) -install_emptydir(get_option('includedir') / 'subdir-devel') -install_subdir('custom_files', - install_dir: get_option('includedir'), -) - -# Those files should have 'runtime' tag -executable('app', 'main.c', - install: true, -) -executable('app-otherdir', 'main.c', - install: true, - install_dir: 'otherbin', -) -shared_library('shared', 'lib.c', - install: true, -) -both_libraries('both', 'lib.c', - install: true, -) - -# Unversioned .so file should have 'devel' tag, others should have 'runtime' tag -shared_library('versioned_shared', 'lib.c', - install: true, - version: '1.2.3', -) - -# 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', -) -install_subdir('excludes', - install_dir: get_option('datadir'), - install_tag: 'custom', - exclude_directories: 'excluded', - exclude_files: 'excluded.txt', -) - -# 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 c5f3be9ed..000000000 --- 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 e69de29bb..000000000 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 e69de29bb..000000000 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 e69de29bb..000000000 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 2ea9c7dd1..000000000 --- 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 0fb4389f7..000000000 --- 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 53c796abe..000000000 --- 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 c5f3be9ed..000000000 --- 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 install all targets/subprojects/subproject/aaa.txt b/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt deleted file mode 100644 index 43d5a8ed6..000000000 --- a/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt +++ /dev/null @@ -1 +0,0 @@ -AAA diff --git a/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt b/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt deleted file mode 100644 index ba629238c..000000000 --- a/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt +++ /dev/null @@ -1 +0,0 @@ -BBB diff --git a/test cases/unit/98 install all targets/subprojects/subproject/meson.build b/test cases/unit/98 install all targets/subprojects/subproject/meson.build deleted file mode 100644 index ff474ace1..000000000 --- a/test cases/unit/98 install all targets/subprojects/subproject/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('subproject') - -install_data('aaa.txt') - -install_data('bbb.txt', install_tag: 'data') 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 000000000..812960172 --- /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 000000000..128c213ac --- /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 000000000..5e79966f7 --- /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 000000000..5be5bc998 --- /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 000000000..d661ae4ca --- /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_FAILURE (-1) + +int main(void) { + if (get_checked() == CHECK_VALUE) { + fprintf(stdout,"good\n"); + return TEST_SUCCESS; + } + fprintf(stdout,"bad\n"); + return TEST_FAILURE; +} 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 e69de29bb..000000000 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 82876149f..000000000 --- a/test cases/unit/99 custom target name/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('custom target name', 'c') - -python = find_program('python3') - -# 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 785a7b366..000000000 --- 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..557db03de --- /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/excludes/excluded.txt b/test cases/unit/99 install all targets/excludes/excluded.txt new file mode 100644 index 000000000..59b064403 --- /dev/null +++ b/test cases/unit/99 install all targets/excludes/excluded.txt @@ -0,0 +1 @@ +Excluded diff --git a/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt b/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt new file mode 100644 index 000000000..3b94f9157 --- /dev/null +++ b/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt @@ -0,0 +1 @@ +Placeholder diff --git a/test cases/unit/99 install all targets/excludes/installed.txt b/test cases/unit/99 install all targets/excludes/installed.txt new file mode 100644 index 000000000..84376928c --- /dev/null +++ b/test cases/unit/99 install all targets/excludes/installed.txt @@ -0,0 +1 @@ +Installed 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..2ea9c7dd1 --- /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 000000000..0fb4389f7 --- /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 000000000..c5f33a054 --- /dev/null +++ b/test cases/unit/99 install all targets/meson.build @@ -0,0 +1,116 @@ +project('install tag', 'c') + +subproject('subproject') + +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, +) +custom_target('ct-header1', + output: ['ct-header1.h'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('includedir'), + install: true, +) +custom_target('ct-header2', + output: ['ct-header2.h', 'ct-header3.h'], + command: ['script.py', '@OUTPUT@'], + install_dir: [false, get_option('includedir')], + install: true, +) +install_emptydir(get_option('includedir') / 'subdir-devel') +install_subdir('custom_files', + install_dir: get_option('includedir'), +) + +# Those files should have 'runtime' tag +executable('app', 'main.c', + install: true, +) +executable('app-otherdir', 'main.c', + install: true, + install_dir: 'otherbin', +) +shared_library('shared', 'lib.c', + install: true, +) +both_libraries('both', 'lib.c', + install: true, +) + +# Unversioned .so file should have 'devel' tag, others should have 'runtime' tag +shared_library('versioned_shared', 'lib.c', + install: true, + version: '1.2.3', +) + +# 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', +) +install_subdir('excludes', + install_dir: get_option('datadir'), + install_tag: 'custom', + exclude_directories: 'excluded', + exclude_files: 'excluded.txt', +) + +# 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 000000000..c5f3be9ed --- /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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..2ea9c7dd1 --- /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 000000000..0fb4389f7 --- /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 000000000..53c796abe --- /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 000000000..c5f3be9ed --- /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 install all targets/subprojects/subproject/aaa.txt b/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt new file mode 100644 index 000000000..43d5a8ed6 --- /dev/null +++ b/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt @@ -0,0 +1 @@ +AAA diff --git a/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt b/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt new file mode 100644 index 000000000..ba629238c --- /dev/null +++ b/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt @@ -0,0 +1 @@ +BBB diff --git a/test cases/unit/99 install all targets/subprojects/subproject/meson.build b/test cases/unit/99 install all targets/subprojects/subproject/meson.build new file mode 100644 index 000000000..ff474ace1 --- /dev/null +++ b/test cases/unit/99 install all targets/subprojects/subproject/meson.build @@ -0,0 +1,5 @@ +project('subproject') + +install_data('aaa.txt') + +install_data('bbb.txt', install_tag: 'data') -- cgit v1.2.3