From 03a1e50739863e669fe8df264f9dfcd09d484d64 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 24 Oct 2022 01:00:57 +0300 Subject: Condense test directory numbers. --- .../meson.build | 18 ----- .../subprojects/subfiles/foo.c | 1 - .../subprojects/subfiles/meson.build | 29 ------- .../subprojects/subfiles/subdir/foo.c | 1 - .../subprojects/subfiles/subdir2/foo.c | 1 - .../252 subproject dependency variables/test.json | 8 -- test cases/common/253 long output/dumper.c | 17 ---- test cases/common/253 long output/meson.build | 5 -- test cases/common/253 module warnings/meson.build | 9 --- test cases/common/253 module warnings/test.json | 16 ---- .../meson.build | 18 +++++ .../subprojects/subfiles/foo.c | 1 + .../subprojects/subfiles/meson.build | 29 +++++++ .../subprojects/subfiles/subdir/foo.c | 1 + .../subprojects/subfiles/subdir2/foo.c | 1 + .../253 subproject dependency variables/test.json | 8 ++ .../common/253 subproject extracted objects/foo.c | 11 --- .../253 subproject extracted objects/meson.build | 5 -- .../subprojects/myobjects/cpplib.cpp | 6 -- .../subprojects/myobjects/cpplib.h | 12 --- .../subprojects/myobjects/meson.build | 3 - .../253 subproject extracted objects/test.json | 5 -- test cases/common/254 generated header dep/foo.c | 1 - .../common/254 generated header dep/meson.build | 22 ------ test cases/common/254 long output/dumper.c | 17 ++++ test cases/common/254 long output/meson.build | 5 ++ .../common/254 subsubproject inplace/meson.build | 3 - .../subprojects/sub/meson.build | 3 - .../sub/subprojects/subsub-1.0/meson.build | 1 - .../subprojects/sub/subprojects/subsub.wrap | 2 - test cases/common/255 module warnings/meson.build | 9 +++ test cases/common/255 module warnings/test.json | 16 ++++ test cases/common/255 preprocess/bar.c | 3 - test cases/common/255 preprocess/foo.c | 1 - test cases/common/255 preprocess/foo.h | 2 - test cases/common/255 preprocess/meson.build | 15 ---- test cases/common/255 preprocess/src/file.map.in | 3 - test cases/common/255 preprocess/src/meson.build | 3 - .../common/256 subproject extracted objects/foo.c | 11 +++ .../256 subproject extracted objects/meson.build | 5 ++ .../subprojects/myobjects/cpplib.cpp | 6 ++ .../subprojects/myobjects/cpplib.h | 12 +++ .../subprojects/myobjects/meson.build | 3 + .../256 subproject extracted objects/test.json | 5 ++ test cases/common/257 generated header dep/foo.c | 1 + .../common/257 generated header dep/meson.build | 22 ++++++ .../common/258 subsubproject inplace/meson.build | 3 + .../subprojects/sub/meson.build | 3 + .../sub/subprojects/subsub-1.0/meson.build | 1 + .../subprojects/sub/subprojects/subsub.wrap | 2 + test cases/common/259 preprocess/bar.c | 3 + test cases/common/259 preprocess/foo.c | 1 + test cases/common/259 preprocess/foo.h | 2 + test cases/common/259 preprocess/meson.build | 15 ++++ test cases/common/259 preprocess/src/file.map.in | 3 + test cases/common/259 preprocess/src/meson.build | 3 + 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 | 1 + test cases/unit/103 strip/meson.build | 3 + test cases/unit/104 debug function/meson.build | 4 + test cases/unit/104 strip/lib.c | 1 - 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 subproject symlink/cp.py | 6 ++ test cases/unit/106 subproject symlink/main.c | 6 ++ test cases/unit/106 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 + .../107 new subproject on reconfigure/meson.build | 3 + .../meson_options.txt | 1 + .../subprojects/foo/foo.c | 2 + .../subprojects/foo/meson.build | 8 ++ 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 - .../unit/108 configure same noop/meson.build | 1 + .../unit/108 configure same noop/meson_options.txt | 5 ++ .../108 new subproject on reconfigure/meson.build | 3 - .../meson_options.txt | 1 - .../subprojects/foo/foo.c | 2 - .../subprojects/foo/meson.build | 8 -- .../unit/109 configure same noop/meson.build | 1 - .../unit/109 configure same noop/meson_options.txt | 5 -- 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 + 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 | 92 ++++++++++++++++++++++ test cases/unit/98 install all targets/script.py | 7 ++ .../98 install all targets/subdir/bar2-devel.h | 0 .../unit/98 install all targets/subdir/foo2.in | 0 .../98 install all targets/subdir/foo3-devel.h | 0 .../unit/98 install all targets/subdir/lib.c | 9 +++ .../unit/98 install all targets/subdir/main.c | 3 + .../unit/98 install all targets/subdir/meson.build | 21 +++++ .../unit/98 install all targets/subdir/script.py | 7 ++ test cases/unit/98 link full name/.gitignore | 5 -- .../98 link full name/libtestprovider/meson.build | 20 ----- .../98 link full name/libtestprovider/provider.c | 12 --- .../unit/98 link full name/proguser/meson.build | 11 --- .../unit/98 link full name/proguser/receiver.c | 18 ----- test cases/unit/99 custom target name/file.txt.in | 0 test cases/unit/99 custom target name/meson.build | 14 ++++ .../unit/99 custom target name/subdir/meson.build | 9 +++ .../unit/99 install all targets/bar-custom.txt | 0 test cases/unit/99 install all targets/bar-devel.h | 0 .../unit/99 install all targets/bar-notag.txt | 0 .../99 install all targets/custom_files/data.txt | 1 - test cases/unit/99 install all targets/foo.in | 0 .../unit/99 install all targets/foo1-devel.h | 0 test cases/unit/99 install all targets/lib.c | 9 --- test cases/unit/99 install all targets/main.c | 3 - test cases/unit/99 install all targets/meson.build | 92 ---------------------- 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 -- unittests/allplatformstests.py | 28 +++---- unittests/linuxliketests.py | 6 +- unittests/platformagnostictests.py | 8 +- 219 files changed, 731 insertions(+), 731 deletions(-) delete mode 100644 test cases/common/252 subproject dependency variables/meson.build delete mode 100644 test cases/common/252 subproject dependency variables/subprojects/subfiles/foo.c delete mode 100644 test cases/common/252 subproject dependency variables/subprojects/subfiles/meson.build delete mode 100644 test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir/foo.c delete mode 100644 test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir2/foo.c delete mode 100644 test cases/common/252 subproject dependency variables/test.json delete mode 100644 test cases/common/253 long output/dumper.c delete mode 100644 test cases/common/253 long output/meson.build delete mode 100644 test cases/common/253 module warnings/meson.build delete mode 100644 test cases/common/253 module warnings/test.json create mode 100644 test cases/common/253 subproject dependency variables/meson.build create mode 100644 test cases/common/253 subproject dependency variables/subprojects/subfiles/foo.c create mode 100644 test cases/common/253 subproject dependency variables/subprojects/subfiles/meson.build create mode 100644 test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir/foo.c create mode 100644 test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir2/foo.c create mode 100644 test cases/common/253 subproject dependency variables/test.json delete mode 100644 test cases/common/253 subproject extracted objects/foo.c delete mode 100644 test cases/common/253 subproject extracted objects/meson.build delete mode 100644 test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.cpp delete mode 100644 test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.h delete mode 100644 test cases/common/253 subproject extracted objects/subprojects/myobjects/meson.build delete mode 100644 test cases/common/253 subproject extracted objects/test.json delete mode 100644 test cases/common/254 generated header dep/foo.c delete mode 100644 test cases/common/254 generated header dep/meson.build create mode 100644 test cases/common/254 long output/dumper.c create mode 100644 test cases/common/254 long output/meson.build delete mode 100644 test cases/common/254 subsubproject inplace/meson.build delete mode 100644 test cases/common/254 subsubproject inplace/subprojects/sub/meson.build delete mode 100644 test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build delete mode 100644 test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap create mode 100644 test cases/common/255 module warnings/meson.build create mode 100644 test cases/common/255 module warnings/test.json delete mode 100644 test cases/common/255 preprocess/bar.c delete mode 100644 test cases/common/255 preprocess/foo.c delete mode 100644 test cases/common/255 preprocess/foo.h delete mode 100644 test cases/common/255 preprocess/meson.build delete mode 100644 test cases/common/255 preprocess/src/file.map.in delete mode 100644 test cases/common/255 preprocess/src/meson.build create mode 100644 test cases/common/256 subproject extracted objects/foo.c create mode 100644 test cases/common/256 subproject extracted objects/meson.build create mode 100644 test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.cpp create mode 100644 test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.h create mode 100644 test cases/common/256 subproject extracted objects/subprojects/myobjects/meson.build create mode 100644 test cases/common/256 subproject extracted objects/test.json create mode 100644 test cases/common/257 generated header dep/foo.c create mode 100644 test cases/common/257 generated header dep/meson.build create mode 100644 test cases/common/258 subsubproject inplace/meson.build create mode 100644 test cases/common/258 subsubproject inplace/subprojects/sub/meson.build create mode 100644 test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build create mode 100644 test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap create mode 100644 test cases/common/259 preprocess/bar.c create mode 100644 test cases/common/259 preprocess/foo.c create mode 100644 test cases/common/259 preprocess/foo.h create mode 100644 test cases/common/259 preprocess/meson.build create mode 100644 test cases/common/259 preprocess/src/file.map.in create mode 100644 test cases/common/259 preprocess/src/meson.build delete mode 100644 test cases/unit/100 custom target name/file.txt.in delete mode 100644 test cases/unit/100 custom target name/meson.build delete mode 100644 test cases/unit/100 custom target name/subdir/meson.build create mode 100755 test cases/unit/100 relative find program/foo.py create mode 100644 test cases/unit/100 relative find program/meson.build create mode 100644 test cases/unit/100 relative find program/subdir/meson.build delete mode 100755 test cases/unit/101 relative find program/foo.py delete mode 100644 test cases/unit/101 relative find program/meson.build delete mode 100644 test cases/unit/101 relative find program/subdir/meson.build create mode 100644 test cases/unit/101 rlib linkage/lib2.rs create mode 100644 test cases/unit/101 rlib linkage/main.rs create mode 100644 test cases/unit/101 rlib linkage/meson.build create mode 100644 test cases/unit/102 python without pkgconfig/meson.build delete mode 100644 test cases/unit/102 rlib linkage/lib2.rs delete mode 100644 test cases/unit/102 rlib linkage/main.rs delete mode 100644 test cases/unit/102 rlib linkage/meson.build delete mode 100644 test cases/unit/103 python without pkgconfig/meson.build create mode 100644 test cases/unit/103 strip/lib.c create mode 100644 test cases/unit/103 strip/meson.build create mode 100644 test cases/unit/104 debug function/meson.build delete mode 100644 test cases/unit/104 strip/lib.c delete mode 100644 test cases/unit/104 strip/meson.build delete mode 100644 test cases/unit/105 debug function/meson.build create mode 100644 test cases/unit/105 pkgconfig relocatable with absolute path/meson.build delete mode 100644 test cases/unit/106 pkgconfig relocatable with absolute path/meson.build create mode 100644 test cases/unit/106 subproject symlink/cp.py create mode 100644 test cases/unit/106 subproject symlink/main.c create mode 100644 test cases/unit/106 subproject symlink/meson.build create mode 100644 test cases/unit/106 subproject symlink/symlinked_subproject/datadir/datafile create mode 100644 test cases/unit/106 subproject symlink/symlinked_subproject/datadir/meson.build create mode 100644 test cases/unit/106 subproject symlink/symlinked_subproject/meson.build create mode 100644 test cases/unit/106 subproject symlink/symlinked_subproject/src.c create mode 100644 test cases/unit/107 new subproject on reconfigure/meson.build create mode 100644 test cases/unit/107 new subproject on reconfigure/meson_options.txt create mode 100644 test cases/unit/107 new subproject on reconfigure/subprojects/foo/foo.c create mode 100644 test cases/unit/107 new subproject on reconfigure/subprojects/foo/meson.build 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/108 configure same noop/meson.build create mode 100644 test cases/unit/108 configure same noop/meson_options.txt 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 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/91 install skip subprojects/foo.c create mode 100644 test cases/unit/91 install skip subprojects/foo.dat create mode 100644 test cases/unit/91 install skip subprojects/foo.h create mode 100644 test cases/unit/91 install skip subprojects/foo/foofile create mode 100644 test cases/unit/91 install skip subprojects/meson.build create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.c create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.h create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/meson.build delete mode 100644 test cases/unit/92 install skip subprojects/foo.c delete mode 100644 test cases/unit/92 install skip subprojects/foo.dat delete mode 100644 test cases/unit/92 install skip subprojects/foo.h delete mode 100644 test cases/unit/92 install skip subprojects/foo/foofile delete mode 100644 test cases/unit/92 install skip subprojects/meson.build delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.c delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.h delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/meson.build create mode 100644 test cases/unit/92 new subproject in configured project/meson.build create mode 100644 test cases/unit/92 new subproject in configured project/meson_options.txt create mode 100644 test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c create mode 100644 test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build create mode 100644 test cases/unit/93 clangformat/.clang-format create mode 100644 test cases/unit/93 clangformat/.clang-format-ignore create mode 100644 test cases/unit/93 clangformat/.clang-format-include create mode 100644 test cases/unit/93 clangformat/meson.build create mode 100644 test cases/unit/93 clangformat/not-included/badformat.cpp create mode 100644 test cases/unit/93 clangformat/src/badformat.c create mode 100644 test cases/unit/93 clangformat/src/badformat.cpp delete mode 100644 test cases/unit/93 new subproject in configured project/meson.build delete mode 100644 test cases/unit/93 new subproject in configured project/meson_options.txt delete mode 100644 test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c delete mode 100644 test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build delete mode 100644 test cases/unit/94 clangformat/.clang-format delete mode 100644 test cases/unit/94 clangformat/.clang-format-ignore delete mode 100644 test cases/unit/94 clangformat/.clang-format-include delete mode 100644 test cases/unit/94 clangformat/meson.build delete mode 100644 test cases/unit/94 clangformat/not-included/badformat.cpp delete mode 100644 test cases/unit/94 clangformat/src/badformat.c delete mode 100644 test cases/unit/94 clangformat/src/badformat.cpp create mode 100644 test cases/unit/94 custominc/easytogrepfor/genh.py create mode 100644 test cases/unit/94 custominc/easytogrepfor/meson.build create mode 100644 test cases/unit/94 custominc/helper.c create mode 100644 test cases/unit/94 custominc/meson.build create mode 100644 test cases/unit/94 custominc/prog.c create mode 100644 test cases/unit/94 custominc/prog2.c delete mode 100644 test cases/unit/95 custominc/easytogrepfor/genh.py delete mode 100644 test cases/unit/95 custominc/easytogrepfor/meson.build delete mode 100644 test cases/unit/95 custominc/helper.c delete mode 100644 test cases/unit/95 custominc/meson.build delete mode 100644 test cases/unit/95 custominc/prog.c delete mode 100644 test cases/unit/95 custominc/prog2.c create mode 100644 test cases/unit/95 implicit force fallback/meson.build create mode 100644 test cases/unit/95 implicit force fallback/subprojects/something/meson.build create mode 100644 test cases/unit/96 compiler.links file arg/meson.build create mode 100644 test cases/unit/96 compiler.links file arg/test.c delete mode 100644 test cases/unit/96 implicit force fallback/meson.build delete mode 100644 test cases/unit/96 implicit force fallback/subprojects/something/meson.build delete mode 100644 test cases/unit/97 compiler.links file arg/meson.build delete mode 100644 test cases/unit/97 compiler.links file arg/test.c create mode 100644 test cases/unit/97 link full name/.gitignore create mode 100644 test cases/unit/97 link full name/libtestprovider/meson.build create mode 100644 test cases/unit/97 link full name/libtestprovider/provider.c create mode 100644 test cases/unit/97 link full name/proguser/meson.build create mode 100644 test cases/unit/97 link full name/proguser/receiver.c create mode 100644 test cases/unit/98 install all targets/bar-custom.txt create mode 100644 test cases/unit/98 install all targets/bar-devel.h create mode 100644 test cases/unit/98 install all targets/bar-notag.txt create mode 100644 test cases/unit/98 install all targets/custom_files/data.txt create mode 100644 test cases/unit/98 install all targets/foo.in create mode 100644 test cases/unit/98 install all targets/foo1-devel.h create mode 100644 test cases/unit/98 install all targets/lib.c create mode 100644 test cases/unit/98 install all targets/main.c create mode 100644 test cases/unit/98 install all targets/meson.build create mode 100644 test cases/unit/98 install all targets/script.py create mode 100644 test cases/unit/98 install all targets/subdir/bar2-devel.h create mode 100644 test cases/unit/98 install all targets/subdir/foo2.in create mode 100644 test cases/unit/98 install all targets/subdir/foo3-devel.h create mode 100644 test cases/unit/98 install all targets/subdir/lib.c create mode 100644 test cases/unit/98 install all targets/subdir/main.c create mode 100644 test cases/unit/98 install all targets/subdir/meson.build create mode 100644 test cases/unit/98 install all targets/subdir/script.py delete mode 100644 test cases/unit/98 link full name/.gitignore delete mode 100644 test cases/unit/98 link full name/libtestprovider/meson.build delete mode 100644 test cases/unit/98 link full name/libtestprovider/provider.c delete mode 100644 test cases/unit/98 link full name/proguser/meson.build delete mode 100644 test cases/unit/98 link full name/proguser/receiver.c create mode 100644 test cases/unit/99 custom target name/file.txt.in create mode 100644 test cases/unit/99 custom target name/meson.build create mode 100644 test cases/unit/99 custom target name/subdir/meson.build delete mode 100644 test cases/unit/99 install all targets/bar-custom.txt delete mode 100644 test cases/unit/99 install all targets/bar-devel.h delete mode 100644 test cases/unit/99 install all targets/bar-notag.txt delete mode 100644 test cases/unit/99 install all targets/custom_files/data.txt delete mode 100644 test cases/unit/99 install all targets/foo.in delete mode 100644 test cases/unit/99 install all targets/foo1-devel.h delete mode 100644 test cases/unit/99 install all targets/lib.c delete mode 100644 test cases/unit/99 install all targets/main.c delete mode 100644 test cases/unit/99 install all targets/meson.build delete mode 100644 test cases/unit/99 install all targets/script.py delete mode 100644 test cases/unit/99 install all targets/subdir/bar2-devel.h delete mode 100644 test cases/unit/99 install all targets/subdir/foo2.in delete mode 100644 test cases/unit/99 install all targets/subdir/foo3-devel.h delete mode 100644 test cases/unit/99 install all targets/subdir/lib.c delete mode 100644 test cases/unit/99 install all targets/subdir/main.c delete mode 100644 test cases/unit/99 install all targets/subdir/meson.build delete mode 100644 test cases/unit/99 install all targets/subdir/script.py diff --git a/test cases/common/252 subproject dependency variables/meson.build b/test cases/common/252 subproject dependency variables/meson.build deleted file mode 100644 index 403b6f1..0000000 --- a/test cases/common/252 subproject dependency variables/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -project('subproject dependency variables', 'c') - -subfiles_dep = subproject('subfiles').get_variable('files_dep') - -executable( - 'foo', - join_paths(subfiles_dep.get_variable('pkgdatadir'), 'foo.c') -) - -executable( - 'foo2', - subfiles_dep.get_variable('pkgdatadir2') / 'foo.c' -) - -executable( - 'foor32', - subfiles_dep.get_variable('pkgdatadir3') / 'foo.c' -) diff --git a/test cases/common/252 subproject dependency variables/subprojects/subfiles/foo.c b/test cases/common/252 subproject dependency variables/subprojects/subfiles/foo.c deleted file mode 100644 index 78f2de1..0000000 --- a/test cases/common/252 subproject dependency variables/subprojects/subfiles/foo.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/common/252 subproject dependency variables/subprojects/subfiles/meson.build b/test cases/common/252 subproject dependency variables/subprojects/subfiles/meson.build deleted file mode 100644 index f5ad0f2..0000000 --- a/test cases/common/252 subproject dependency variables/subprojects/subfiles/meson.build +++ /dev/null @@ -1,29 +0,0 @@ -project('dependency variable resource') - -files_dep = declare_dependency( - variables: [ - 'pkgdatadir=@0@/subdir'.format(meson.current_source_dir()), - 'pkgdatadir2=@0@/subdir2'.format(meson.current_source_dir()), - 'pkgdatadir3=@0@'.format(meson.current_source_dir()), - ] -) - -install_data('subdir/foo.c', install_dir: get_option('datadir') / 'subdir') -install_subdir('subdir2', install_dir: get_option('datadir')) -install_data('foo.c', install_dir: get_option('datadir')) - -import('pkgconfig').generate( - name: 'depvar_resource', - description: 'Get a resource file from pkgconfig or a subproject', - version: '0.1', - variables: [ - 'pkgdatadir=${datadir}/subdir', - 'pkgdatadir2=${datadir}/subdir2', - ], - uninstalled_variables: [ - 'pkgdatadir=@0@/subdir'.format(meson.current_source_dir()), - 'pkgdatadir2=@0@/subdir2'.format(meson.current_source_dir()), - 'pkgdatadir3=@0@'.format(meson.current_source_dir()), - ], - dataonly: true, -) diff --git a/test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir/foo.c b/test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir/foo.c deleted file mode 100644 index 78f2de1..0000000 --- a/test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir/foo.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir2/foo.c b/test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir2/foo.c deleted file mode 100644 index 78f2de1..0000000 --- a/test cases/common/252 subproject dependency variables/subprojects/subfiles/subdir2/foo.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/common/252 subproject dependency variables/test.json b/test cases/common/252 subproject dependency variables/test.json deleted file mode 100644 index c345bbe..0000000 --- a/test cases/common/252 subproject dependency variables/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "installed": [ - { "type": "file", "file": "usr/share/pkgconfig/depvar_resource.pc" }, - { "type": "file", "file": "usr/share/foo.c" }, - { "type": "file", "file": "usr/share/subdir/foo.c" }, - { "type": "file", "file": "usr/share/subdir2/foo.c" } - ] -} diff --git a/test cases/common/253 long output/dumper.c b/test cases/common/253 long output/dumper.c deleted file mode 100644 index d479e08..0000000 --- a/test cases/common/253 long output/dumper.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -int main(void) -{ - for (int i = 0 ; i < 100000 ; i++) - fprintf(stderr, "# Iteration %d to stderr\n", i + 1); - - printf("ok 1 - dumper to stderr\n"); - - for (int i = 0 ; i < 100000 ; i++) - fprintf(stdout, "# Iteration %d to stdout\n", i + 1); - - printf("ok 2 - dumper to stdout\n1..2\n"); - - return 0; -} - diff --git a/test cases/common/253 long output/meson.build b/test cases/common/253 long output/meson.build deleted file mode 100644 index 6d8d62b..0000000 --- a/test cases/common/253 long output/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('long-stderr', 'c') - -dumper = executable('dumper', 'dumper.c') -test('dump-test', dumper) -test('dump-test-TAP', dumper, protocol : 'tap') diff --git a/test cases/common/253 module warnings/meson.build b/test cases/common/253 module warnings/meson.build deleted file mode 100644 index 56e2055..0000000 --- a/test cases/common/253 module warnings/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('module warnings', meson_version : '>= 0.56') - -import('python3') # deprecated module -import('java') # new module -import('unstable-keyval') # module that has been stabilized, import with unstable- -import('unstable_simd') # A module with the deprecated `unstable_foo` instead of `unstable-foo` - -ice = import('icestorm', required : false) -assert(not ice.found(), 'unstable-icestorm module should not be importable as `simd`') diff --git a/test cases/common/253 module warnings/test.json b/test cases/common/253 module warnings/test.json deleted file mode 100644 index be31601..0000000 --- a/test cases/common/253 module warnings/test.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/common/253 module warnings/meson.build:3: WARNING: Project targets '>= 0.56' but uses feature deprecated since '0.48.0': module python3." - }, - { - "line": "test cases/common/253 module warnings/meson.build:4: WARNING: Project targets '>= 0.56' but uses feature introduced in '0.60.0': module java." - }, - { - "line": "test cases/common/253 module warnings/meson.build:5: WARNING: Project targets '>= 0.56' but uses feature deprecated since '0.56.0': module keyval has been stabilized. drop \"unstable-\" prefix from the module name" - }, - { - "line": "test cases/common/253 module warnings/meson.build:6: DEPRECATION: Importing unstable modules as \"unstable_simd\" instead of \"unstable-simd\"" - } - ] -} diff --git a/test cases/common/253 subproject dependency variables/meson.build b/test cases/common/253 subproject dependency variables/meson.build new file mode 100644 index 0000000..403b6f1 --- /dev/null +++ b/test cases/common/253 subproject dependency variables/meson.build @@ -0,0 +1,18 @@ +project('subproject dependency variables', 'c') + +subfiles_dep = subproject('subfiles').get_variable('files_dep') + +executable( + 'foo', + join_paths(subfiles_dep.get_variable('pkgdatadir'), 'foo.c') +) + +executable( + 'foo2', + subfiles_dep.get_variable('pkgdatadir2') / 'foo.c' +) + +executable( + 'foor32', + subfiles_dep.get_variable('pkgdatadir3') / 'foo.c' +) diff --git a/test cases/common/253 subproject dependency variables/subprojects/subfiles/foo.c b/test cases/common/253 subproject dependency variables/subprojects/subfiles/foo.c new file mode 100644 index 0000000..78f2de1 --- /dev/null +++ b/test cases/common/253 subproject dependency variables/subprojects/subfiles/foo.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/common/253 subproject dependency variables/subprojects/subfiles/meson.build b/test cases/common/253 subproject dependency variables/subprojects/subfiles/meson.build new file mode 100644 index 0000000..f5ad0f2 --- /dev/null +++ b/test cases/common/253 subproject dependency variables/subprojects/subfiles/meson.build @@ -0,0 +1,29 @@ +project('dependency variable resource') + +files_dep = declare_dependency( + variables: [ + 'pkgdatadir=@0@/subdir'.format(meson.current_source_dir()), + 'pkgdatadir2=@0@/subdir2'.format(meson.current_source_dir()), + 'pkgdatadir3=@0@'.format(meson.current_source_dir()), + ] +) + +install_data('subdir/foo.c', install_dir: get_option('datadir') / 'subdir') +install_subdir('subdir2', install_dir: get_option('datadir')) +install_data('foo.c', install_dir: get_option('datadir')) + +import('pkgconfig').generate( + name: 'depvar_resource', + description: 'Get a resource file from pkgconfig or a subproject', + version: '0.1', + variables: [ + 'pkgdatadir=${datadir}/subdir', + 'pkgdatadir2=${datadir}/subdir2', + ], + uninstalled_variables: [ + 'pkgdatadir=@0@/subdir'.format(meson.current_source_dir()), + 'pkgdatadir2=@0@/subdir2'.format(meson.current_source_dir()), + 'pkgdatadir3=@0@'.format(meson.current_source_dir()), + ], + dataonly: true, +) diff --git a/test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir/foo.c b/test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir/foo.c new file mode 100644 index 0000000..78f2de1 --- /dev/null +++ b/test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir/foo.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir2/foo.c b/test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir2/foo.c new file mode 100644 index 0000000..78f2de1 --- /dev/null +++ b/test cases/common/253 subproject dependency variables/subprojects/subfiles/subdir2/foo.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/common/253 subproject dependency variables/test.json b/test cases/common/253 subproject dependency variables/test.json new file mode 100644 index 0000000..c345bbe --- /dev/null +++ b/test cases/common/253 subproject dependency variables/test.json @@ -0,0 +1,8 @@ +{ + "installed": [ + { "type": "file", "file": "usr/share/pkgconfig/depvar_resource.pc" }, + { "type": "file", "file": "usr/share/foo.c" }, + { "type": "file", "file": "usr/share/subdir/foo.c" }, + { "type": "file", "file": "usr/share/subdir2/foo.c" } + ] +} diff --git a/test cases/common/253 subproject extracted objects/foo.c b/test cases/common/253 subproject extracted objects/foo.c deleted file mode 100644 index f6c7aeb..0000000 --- a/test cases/common/253 subproject extracted objects/foo.c +++ /dev/null @@ -1,11 +0,0 @@ -#if defined _WIN32 || defined __CYGWIN__ - #define DLL_IMPORT __declspec(dllimport) -#else - #define DLL_IMPORT -#endif - -int DLL_IMPORT cppfunc(void); - -int otherfunc(void) { - return cppfunc() != 42; -} diff --git a/test cases/common/253 subproject extracted objects/meson.build b/test cases/common/253 subproject extracted objects/meson.build deleted file mode 100644 index bad450f..0000000 --- a/test cases/common/253 subproject extracted objects/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('link to extracted objects', 'c') - -sublib = subproject('myobjects').get_variable('sublib') - -mainlib = static_library('foo', 'foo.c', install: true, link_with: sublib) diff --git a/test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.cpp b/test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.cpp deleted file mode 100644 index 12ef756..0000000 --- a/test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#define BUILDING_DLL -#include "cpplib.h" - -extern "C" int DLL_PUBLIC cppfunc(void) { - return 42; -} diff --git a/test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.h b/test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.h deleted file mode 100644 index a1c38b3..0000000 --- a/test cases/common/253 subproject extracted objects/subprojects/myobjects/cpplib.h +++ /dev/null @@ -1,12 +0,0 @@ -/* See http://gcc.gnu.org/wiki/Visibility#How_to_use_the_new_C.2B-.2B-_visibility_support */ -#if defined(_WIN32) || defined(__CYGWIN__) - #ifdef BUILDING_DLL - #define DLL_PUBLIC __declspec(dllexport) - #else - #define DLL_PUBLIC __declspec(dllimport) - #endif -#else - #define DLL_PUBLIC __attribute__ ((visibility ("default"))) -#endif - -extern "C" int DLL_PUBLIC cppfunc(void); diff --git a/test cases/common/253 subproject extracted objects/subprojects/myobjects/meson.build b/test cases/common/253 subproject extracted objects/subprojects/myobjects/meson.build deleted file mode 100644 index 1c2729b..0000000 --- a/test cases/common/253 subproject extracted objects/subprojects/myobjects/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('myobjects', 'cpp') - -sublib = static_library('sublib', 'cpplib.cpp') diff --git a/test cases/common/253 subproject extracted objects/test.json b/test cases/common/253 subproject extracted objects/test.json deleted file mode 100644 index baa5dfb..0000000 --- a/test cases/common/253 subproject extracted objects/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "installed": [ - { "type": "file", "file": "usr/lib/libfoo.a" } - ] -} diff --git a/test cases/common/254 generated header dep/foo.c b/test cases/common/254 generated header dep/foo.c deleted file mode 100644 index f4de601..0000000 --- a/test cases/common/254 generated header dep/foo.c +++ /dev/null @@ -1 +0,0 @@ -#include "foo.h" diff --git a/test cases/common/254 generated header dep/meson.build b/test cases/common/254 generated header dep/meson.build deleted file mode 100644 index 195d082..0000000 --- a/test cases/common/254 generated header dep/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project('generated header dep', 'c') - -# Regression test case for a very specific case: -# - Uses both_libraries(), or library() with default_library=both. -# - A header file is generated by a custom_target() and passed as source. -# - A C file that uses that header is passed as a declare_dependency() source. -# Under those specific conditions, the static library used to miss an order -# dependency on the header file. This happened in GLib: -# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2917. - -python = import('python').find_installation() -header = custom_target( - output: 'foo.h', - capture: true, - command: [python, '-c', 'print("#define FOO")'], -) - -sources_dep = declare_dependency(sources: files('foo.c')) - -both_libraries('foo', header, - dependencies: sources_dep, -) diff --git a/test cases/common/254 long output/dumper.c b/test cases/common/254 long output/dumper.c new file mode 100644 index 0000000..d479e08 --- /dev/null +++ b/test cases/common/254 long output/dumper.c @@ -0,0 +1,17 @@ +#include + +int main(void) +{ + for (int i = 0 ; i < 100000 ; i++) + fprintf(stderr, "# Iteration %d to stderr\n", i + 1); + + printf("ok 1 - dumper to stderr\n"); + + for (int i = 0 ; i < 100000 ; i++) + fprintf(stdout, "# Iteration %d to stdout\n", i + 1); + + printf("ok 2 - dumper to stdout\n1..2\n"); + + return 0; +} + diff --git a/test cases/common/254 long output/meson.build b/test cases/common/254 long output/meson.build new file mode 100644 index 0000000..6d8d62b --- /dev/null +++ b/test cases/common/254 long output/meson.build @@ -0,0 +1,5 @@ +project('long-stderr', 'c') + +dumper = executable('dumper', 'dumper.c') +test('dump-test', dumper) +test('dump-test-TAP', dumper, protocol : 'tap') diff --git a/test cases/common/254 subsubproject inplace/meson.build b/test cases/common/254 subsubproject inplace/meson.build deleted file mode 100644 index 26a421b..0000000 --- a/test cases/common/254 subsubproject inplace/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('main') - -subproject('sub') diff --git a/test cases/common/254 subsubproject inplace/subprojects/sub/meson.build b/test cases/common/254 subsubproject inplace/subprojects/sub/meson.build deleted file mode 100644 index 5e33d21..0000000 --- a/test cases/common/254 subsubproject inplace/subprojects/sub/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('sub') - -subproject('subsub') diff --git a/test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build b/test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build deleted file mode 100644 index 7807a1b..0000000 --- a/test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('subsub') diff --git a/test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap b/test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap deleted file mode 100644 index bf39852..0000000 --- a/test cases/common/254 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap +++ /dev/null @@ -1,2 +0,0 @@ -[wrap-file] -directory = subsub-1.0 diff --git a/test cases/common/255 module warnings/meson.build b/test cases/common/255 module warnings/meson.build new file mode 100644 index 0000000..56e2055 --- /dev/null +++ b/test cases/common/255 module warnings/meson.build @@ -0,0 +1,9 @@ +project('module warnings', meson_version : '>= 0.56') + +import('python3') # deprecated module +import('java') # new module +import('unstable-keyval') # module that has been stabilized, import with unstable- +import('unstable_simd') # A module with the deprecated `unstable_foo` instead of `unstable-foo` + +ice = import('icestorm', required : false) +assert(not ice.found(), 'unstable-icestorm module should not be importable as `simd`') diff --git a/test cases/common/255 module warnings/test.json b/test cases/common/255 module warnings/test.json new file mode 100644 index 0000000..5556b90 --- /dev/null +++ b/test cases/common/255 module warnings/test.json @@ -0,0 +1,16 @@ +{ + "stdout": [ + { + "line": "test cases/common/255 module warnings/meson.build:3: WARNING: Project targets '>= 0.56' but uses feature deprecated since '0.48.0': module python3." + }, + { + "line": "test cases/common/255 module warnings/meson.build:4: WARNING: Project targets '>= 0.56' but uses feature introduced in '0.60.0': module java." + }, + { + "line": "test cases/common/255 module warnings/meson.build:5: WARNING: Project targets '>= 0.56' but uses feature deprecated since '0.56.0': module keyval has been stabilized. drop \"unstable-\" prefix from the module name" + }, + { + "line": "test cases/common/255 module warnings/meson.build:6: DEPRECATION: Importing unstable modules as \"unstable_simd\" instead of \"unstable-simd\"" + } + ] +} diff --git a/test cases/common/255 preprocess/bar.c b/test cases/common/255 preprocess/bar.c deleted file mode 100644 index 43737b9..0000000 --- a/test cases/common/255 preprocess/bar.c +++ /dev/null @@ -1,3 +0,0 @@ -int bar(void) { - return BAR; -} diff --git a/test cases/common/255 preprocess/foo.c b/test cases/common/255 preprocess/foo.c deleted file mode 100644 index c9d16c5..0000000 --- a/test cases/common/255 preprocess/foo.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/test cases/common/255 preprocess/foo.h b/test cases/common/255 preprocess/foo.h deleted file mode 100644 index ba60bf3..0000000 --- a/test cases/common/255 preprocess/foo.h +++ /dev/null @@ -1,2 +0,0 @@ -int bar(void); -int main(void) { return FOO + bar(); } diff --git a/test cases/common/255 preprocess/meson.build b/test cases/common/255 preprocess/meson.build deleted file mode 100644 index 4824598..0000000 --- a/test cases/common/255 preprocess/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project('preprocess', 'c') - -cc = meson.get_compiler('c') - -add_project_arguments(['-DFOO=0', '-DBAR=0'], language: 'c') - -pp_files = cc.preprocess('foo.c', 'bar.c', output: '@PLAINNAME@') - -foreach f : pp_files - message(f.full_path()) -endforeach - -subdir('src') - -test('test-foo', executable('app', pp_files, link_depends: file_map)) diff --git a/test cases/common/255 preprocess/src/file.map.in b/test cases/common/255 preprocess/src/file.map.in deleted file mode 100644 index 152fb65..0000000 --- a/test cases/common/255 preprocess/src/file.map.in +++ /dev/null @@ -1,3 +0,0 @@ -#if 1 -Hello World -#endif diff --git a/test cases/common/255 preprocess/src/meson.build b/test cases/common/255 preprocess/src/meson.build deleted file mode 100644 index 4cd9554..0000000 --- a/test cases/common/255 preprocess/src/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -file_map = cc.preprocess('file.map.in', - output: '@BASENAME@', -) diff --git a/test cases/common/256 subproject extracted objects/foo.c b/test cases/common/256 subproject extracted objects/foo.c new file mode 100644 index 0000000..f6c7aeb --- /dev/null +++ b/test cases/common/256 subproject extracted objects/foo.c @@ -0,0 +1,11 @@ +#if defined _WIN32 || defined __CYGWIN__ + #define DLL_IMPORT __declspec(dllimport) +#else + #define DLL_IMPORT +#endif + +int DLL_IMPORT cppfunc(void); + +int otherfunc(void) { + return cppfunc() != 42; +} diff --git a/test cases/common/256 subproject extracted objects/meson.build b/test cases/common/256 subproject extracted objects/meson.build new file mode 100644 index 0000000..bad450f --- /dev/null +++ b/test cases/common/256 subproject extracted objects/meson.build @@ -0,0 +1,5 @@ +project('link to extracted objects', 'c') + +sublib = subproject('myobjects').get_variable('sublib') + +mainlib = static_library('foo', 'foo.c', install: true, link_with: sublib) diff --git a/test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.cpp b/test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.cpp new file mode 100644 index 0000000..12ef756 --- /dev/null +++ b/test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.cpp @@ -0,0 +1,6 @@ +#define BUILDING_DLL +#include "cpplib.h" + +extern "C" int DLL_PUBLIC cppfunc(void) { + return 42; +} diff --git a/test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.h b/test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.h new file mode 100644 index 0000000..a1c38b3 --- /dev/null +++ b/test cases/common/256 subproject extracted objects/subprojects/myobjects/cpplib.h @@ -0,0 +1,12 @@ +/* See http://gcc.gnu.org/wiki/Visibility#How_to_use_the_new_C.2B-.2B-_visibility_support */ +#if defined(_WIN32) || defined(__CYGWIN__) + #ifdef BUILDING_DLL + #define DLL_PUBLIC __declspec(dllexport) + #else + #define DLL_PUBLIC __declspec(dllimport) + #endif +#else + #define DLL_PUBLIC __attribute__ ((visibility ("default"))) +#endif + +extern "C" int DLL_PUBLIC cppfunc(void); diff --git a/test cases/common/256 subproject extracted objects/subprojects/myobjects/meson.build b/test cases/common/256 subproject extracted objects/subprojects/myobjects/meson.build new file mode 100644 index 0000000..1c2729b --- /dev/null +++ b/test cases/common/256 subproject extracted objects/subprojects/myobjects/meson.build @@ -0,0 +1,3 @@ +project('myobjects', 'cpp') + +sublib = static_library('sublib', 'cpplib.cpp') diff --git a/test cases/common/256 subproject extracted objects/test.json b/test cases/common/256 subproject extracted objects/test.json new file mode 100644 index 0000000..baa5dfb --- /dev/null +++ b/test cases/common/256 subproject extracted objects/test.json @@ -0,0 +1,5 @@ +{ + "installed": [ + { "type": "file", "file": "usr/lib/libfoo.a" } + ] +} diff --git a/test cases/common/257 generated header dep/foo.c b/test cases/common/257 generated header dep/foo.c new file mode 100644 index 0000000..f4de601 --- /dev/null +++ b/test cases/common/257 generated header dep/foo.c @@ -0,0 +1 @@ +#include "foo.h" diff --git a/test cases/common/257 generated header dep/meson.build b/test cases/common/257 generated header dep/meson.build new file mode 100644 index 0000000..195d082 --- /dev/null +++ b/test cases/common/257 generated header dep/meson.build @@ -0,0 +1,22 @@ +project('generated header dep', 'c') + +# Regression test case for a very specific case: +# - Uses both_libraries(), or library() with default_library=both. +# - A header file is generated by a custom_target() and passed as source. +# - A C file that uses that header is passed as a declare_dependency() source. +# Under those specific conditions, the static library used to miss an order +# dependency on the header file. This happened in GLib: +# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2917. + +python = import('python').find_installation() +header = custom_target( + output: 'foo.h', + capture: true, + command: [python, '-c', 'print("#define FOO")'], +) + +sources_dep = declare_dependency(sources: files('foo.c')) + +both_libraries('foo', header, + dependencies: sources_dep, +) diff --git a/test cases/common/258 subsubproject inplace/meson.build b/test cases/common/258 subsubproject inplace/meson.build new file mode 100644 index 0000000..26a421b --- /dev/null +++ b/test cases/common/258 subsubproject inplace/meson.build @@ -0,0 +1,3 @@ +project('main') + +subproject('sub') diff --git a/test cases/common/258 subsubproject inplace/subprojects/sub/meson.build b/test cases/common/258 subsubproject inplace/subprojects/sub/meson.build new file mode 100644 index 0000000..5e33d21 --- /dev/null +++ b/test cases/common/258 subsubproject inplace/subprojects/sub/meson.build @@ -0,0 +1,3 @@ +project('sub') + +subproject('subsub') diff --git a/test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build b/test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build new file mode 100644 index 0000000..7807a1b --- /dev/null +++ b/test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub-1.0/meson.build @@ -0,0 +1 @@ +project('subsub') diff --git a/test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap b/test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap new file mode 100644 index 0000000..bf39852 --- /dev/null +++ b/test cases/common/258 subsubproject inplace/subprojects/sub/subprojects/subsub.wrap @@ -0,0 +1,2 @@ +[wrap-file] +directory = subsub-1.0 diff --git a/test cases/common/259 preprocess/bar.c b/test cases/common/259 preprocess/bar.c new file mode 100644 index 0000000..43737b9 --- /dev/null +++ b/test cases/common/259 preprocess/bar.c @@ -0,0 +1,3 @@ +int bar(void) { + return BAR; +} diff --git a/test cases/common/259 preprocess/foo.c b/test cases/common/259 preprocess/foo.c new file mode 100644 index 0000000..c9d16c5 --- /dev/null +++ b/test cases/common/259 preprocess/foo.c @@ -0,0 +1 @@ +#include diff --git a/test cases/common/259 preprocess/foo.h b/test cases/common/259 preprocess/foo.h new file mode 100644 index 0000000..ba60bf3 --- /dev/null +++ b/test cases/common/259 preprocess/foo.h @@ -0,0 +1,2 @@ +int bar(void); +int main(void) { return FOO + bar(); } diff --git a/test cases/common/259 preprocess/meson.build b/test cases/common/259 preprocess/meson.build new file mode 100644 index 0000000..4824598 --- /dev/null +++ b/test cases/common/259 preprocess/meson.build @@ -0,0 +1,15 @@ +project('preprocess', 'c') + +cc = meson.get_compiler('c') + +add_project_arguments(['-DFOO=0', '-DBAR=0'], language: 'c') + +pp_files = cc.preprocess('foo.c', 'bar.c', output: '@PLAINNAME@') + +foreach f : pp_files + message(f.full_path()) +endforeach + +subdir('src') + +test('test-foo', executable('app', pp_files, link_depends: file_map)) diff --git a/test cases/common/259 preprocess/src/file.map.in b/test cases/common/259 preprocess/src/file.map.in new file mode 100644 index 0000000..152fb65 --- /dev/null +++ b/test cases/common/259 preprocess/src/file.map.in @@ -0,0 +1,3 @@ +#if 1 +Hello World +#endif diff --git a/test cases/common/259 preprocess/src/meson.build b/test cases/common/259 preprocess/src/meson.build new file mode 100644 index 0000000..4cd9554 --- /dev/null +++ b/test cases/common/259 preprocess/src/meson.build @@ -0,0 +1,3 @@ +file_map = cc.preprocess('file.map.in', + output: '@BASENAME@', +) diff --git a/test cases/unit/100 custom target name/file.txt.in b/test cases/unit/100 custom target name/file.txt.in deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/100 custom target name/meson.build b/test cases/unit/100 custom target name/meson.build deleted file mode 100644 index 8d148a8..0000000 --- a/test cases/unit/100 custom target name/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('custom target name', 'c') - -python = import('python').find_installation() - -# Name argument is optional and should default to 'file.txt' -custom_target( - input: 'file.txt.in', - output: '@BASENAME@', - command: [python, '--version'], - build_by_default: true, - capture: true, -) - -subdir('subdir') diff --git a/test cases/unit/100 custom target name/subdir/meson.build b/test cases/unit/100 custom target name/subdir/meson.build deleted file mode 100644 index 785a7b3..0000000 --- a/test cases/unit/100 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/100 relative find program/foo.py b/test cases/unit/100 relative find program/foo.py new file mode 100755 index 0000000..21239b7 --- /dev/null +++ b/test cases/unit/100 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/100 relative find program/meson.build b/test cases/unit/100 relative find program/meson.build new file mode 100644 index 0000000..5745d8a --- /dev/null +++ b/test cases/unit/100 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/100 relative find program/subdir/meson.build b/test cases/unit/100 relative find program/subdir/meson.build new file mode 100644 index 0000000..475f5f5 --- /dev/null +++ b/test cases/unit/100 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 relative find program/foo.py b/test cases/unit/101 relative find program/foo.py deleted file mode 100755 index 21239b7..0000000 --- a/test cases/unit/101 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/101 relative find program/meson.build b/test cases/unit/101 relative find program/meson.build deleted file mode 100644 index 5745d8a..0000000 --- a/test cases/unit/101 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/101 relative find program/subdir/meson.build b/test cases/unit/101 relative find program/subdir/meson.build deleted file mode 100644 index 475f5f5..0000000 --- a/test cases/unit/101 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 rlib linkage/lib2.rs b/test cases/unit/101 rlib linkage/lib2.rs new file mode 100644 index 0000000..3487bc5 --- /dev/null +++ b/test cases/unit/101 rlib linkage/lib2.rs @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..d0f82e4 --- /dev/null +++ b/test cases/unit/101 rlib linkage/main.rs @@ -0,0 +1,5 @@ +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 new file mode 100644 index 0000000..2d15b2a --- /dev/null +++ b/test cases/unit/101 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/102 python without pkgconfig/meson.build b/test cases/unit/102 python without pkgconfig/meson.build new file mode 100644 index 0000000..b3a0c42 --- /dev/null +++ b/test cases/unit/102 python without pkgconfig/meson.build @@ -0,0 +1,4 @@ +project('python wihtout pkgconfig', 'c') + +# This unit test is ran with PKG_CONFIG=notfound +import('python').find_installation().dependency() diff --git a/test cases/unit/102 rlib linkage/lib2.rs b/test cases/unit/102 rlib linkage/lib2.rs deleted file mode 100644 index 3487bc5..0000000 --- a/test cases/unit/102 rlib linkage/lib2.rs +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index d0f82e4..0000000 --- a/test cases/unit/102 rlib linkage/main.rs +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 2d15b2a..0000000 --- a/test cases/unit/102 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/103 python without pkgconfig/meson.build b/test cases/unit/103 python without pkgconfig/meson.build deleted file mode 100644 index b3a0c42..0000000 --- a/test cases/unit/103 python without pkgconfig/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('python wihtout pkgconfig', 'c') - -# This unit test is ran with PKG_CONFIG=notfound -import('python').find_installation().dependency() diff --git a/test cases/unit/103 strip/lib.c b/test cases/unit/103 strip/lib.c new file mode 100644 index 0000000..3940fde --- /dev/null +++ b/test cases/unit/103 strip/lib.c @@ -0,0 +1 @@ +void func(void){} diff --git a/test cases/unit/103 strip/meson.build b/test cases/unit/103 strip/meson.build new file mode 100644 index 0000000..dff61ab --- /dev/null +++ b/test cases/unit/103 strip/meson.build @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..c3f4c76 --- /dev/null +++ b/test cases/unit/104 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/104 strip/lib.c b/test cases/unit/104 strip/lib.c deleted file mode 100644 index 3940fde..0000000 --- a/test cases/unit/104 strip/lib.c +++ /dev/null @@ -1 +0,0 @@ -void func(void){} diff --git a/test cases/unit/104 strip/meson.build b/test cases/unit/104 strip/meson.build deleted file mode 100644 index dff61ab..0000000 --- a/test cases/unit/104 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/105 debug function/meson.build b/test cases/unit/105 debug function/meson.build deleted file mode 100644 index c3f4c76..0000000 --- a/test cases/unit/105 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/105 pkgconfig relocatable with absolute path/meson.build b/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build new file mode 100644 index 0000000..ff21286 --- /dev/null +++ b/test cases/unit/105 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 pkgconfig relocatable with absolute path/meson.build b/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build deleted file mode 100644 index ff21286..0000000 --- a/test cases/unit/106 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 subproject symlink/cp.py b/test cases/unit/106 subproject symlink/cp.py new file mode 100644 index 0000000..adb0547 --- /dev/null +++ b/test cases/unit/106 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/106 subproject symlink/main.c b/test cases/unit/106 subproject symlink/main.c new file mode 100644 index 0000000..62bd4b4 --- /dev/null +++ b/test cases/unit/106 subproject symlink/main.c @@ -0,0 +1,6 @@ +extern int foo(void); + +int main(void) +{ + return foo(); +} diff --git a/test cases/unit/106 subproject symlink/meson.build b/test cases/unit/106 subproject symlink/meson.build new file mode 100644 index 0000000..6766c8e --- /dev/null +++ b/test cases/unit/106 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/106 subproject symlink/symlinked_subproject/datadir/datafile b/test cases/unit/106 subproject symlink/symlinked_subproject/datadir/datafile new file mode 100644 index 0000000..6a68294 --- /dev/null +++ b/test cases/unit/106 subproject symlink/symlinked_subproject/datadir/datafile @@ -0,0 +1 @@ +hello meson diff --git a/test cases/unit/106 subproject symlink/symlinked_subproject/datadir/meson.build b/test cases/unit/106 subproject symlink/symlinked_subproject/datadir/meson.build new file mode 100644 index 0000000..cbeb0a9 --- /dev/null +++ b/test cases/unit/106 subproject symlink/symlinked_subproject/datadir/meson.build @@ -0,0 +1 @@ +install_data('datafile') diff --git a/test cases/unit/106 subproject symlink/symlinked_subproject/meson.build b/test cases/unit/106 subproject symlink/symlinked_subproject/meson.build new file mode 100644 index 0000000..3930465 --- /dev/null +++ b/test cases/unit/106 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/106 subproject symlink/symlinked_subproject/src.c b/test cases/unit/106 subproject symlink/symlinked_subproject/src.c new file mode 100644 index 0000000..97d7ad1 --- /dev/null +++ b/test cases/unit/106 subproject symlink/symlinked_subproject/src.c @@ -0,0 +1,4 @@ +int foo(void) +{ + return 0; +} diff --git a/test cases/unit/107 new subproject on reconfigure/meson.build b/test cases/unit/107 new subproject on reconfigure/meson.build new file mode 100644 index 0000000..7342c9a --- /dev/null +++ b/test cases/unit/107 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/107 new subproject on reconfigure/meson_options.txt b/test cases/unit/107 new subproject on reconfigure/meson_options.txt new file mode 100644 index 0000000..b3dd683 --- /dev/null +++ b/test cases/unit/107 new subproject on reconfigure/meson_options.txt @@ -0,0 +1 @@ +option('foo', type: 'feature', value: 'disabled') diff --git a/test cases/unit/107 new subproject on reconfigure/subprojects/foo/foo.c b/test cases/unit/107 new subproject on reconfigure/subprojects/foo/foo.c new file mode 100644 index 0000000..1edf995 --- /dev/null +++ b/test cases/unit/107 new subproject on reconfigure/subprojects/foo/foo.c @@ -0,0 +1,2 @@ +void foo(void); +void foo(void) {} diff --git a/test cases/unit/107 new subproject on reconfigure/subprojects/foo/meson.build b/test cases/unit/107 new subproject on reconfigure/subprojects/foo/meson.build new file mode 100644 index 0000000..2a6e30a --- /dev/null +++ b/test cases/unit/107 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/107 subproject symlink/cp.py b/test cases/unit/107 subproject symlink/cp.py deleted file mode 100644 index adb0547..0000000 --- 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 62bd4b4..0000000 --- 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 6766c8e..0000000 --- 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 6a68294..0000000 --- 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 cbeb0a9..0000000 --- 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 3930465..0000000 --- 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 97d7ad1..0000000 --- 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/108 configure same noop/meson.build b/test cases/unit/108 configure same noop/meson.build new file mode 100644 index 0000000..d3f1326 --- /dev/null +++ b/test cases/unit/108 configure same noop/meson.build @@ -0,0 +1 @@ +project('configure same noop test') diff --git a/test cases/unit/108 configure same noop/meson_options.txt b/test cases/unit/108 configure same noop/meson_options.txt new file mode 100644 index 0000000..c406af2 --- /dev/null +++ b/test cases/unit/108 configure same noop/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'opt', + type : 'string', + value: '', +) 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 7342c9a..0000000 --- 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 b3dd683..0000000 --- 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 1edf995..0000000 --- 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 2a6e30a..0000000 --- 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/109 configure same noop/meson.build b/test cases/unit/109 configure same noop/meson.build deleted file mode 100644 index d3f1326..0000000 --- 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 c406af2..0000000 --- a/test cases/unit/109 configure same noop/meson_options.txt +++ /dev/null @@ -1,5 +0,0 @@ -option( - 'opt', - type : 'string', - value: '', -) diff --git a/test cases/unit/91 install skip subprojects/foo.c b/test cases/unit/91 install skip subprojects/foo.c new file mode 100644 index 0000000..25927f5 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/foo.c @@ -0,0 +1,4 @@ +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 new file mode 100644 index 0000000..421376d --- /dev/null +++ b/test cases/unit/91 install skip subprojects/foo.dat @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/91 install skip subprojects/foo.h b/test cases/unit/91 install skip subprojects/foo.h new file mode 100644 index 0000000..a7e26ac --- /dev/null +++ b/test cases/unit/91 install skip subprojects/foo.h @@ -0,0 +1 @@ +#define FOO diff --git a/test cases/unit/91 install skip subprojects/foo/foofile b/test cases/unit/91 install skip subprojects/foo/foofile new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/91 install skip subprojects/meson.build b/test cases/unit/91 install skip subprojects/meson.build new file mode 100644 index 0000000..cfbae94 --- /dev/null +++ b/test cases/unit/91 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/91 install skip subprojects/subprojects/bar/bar.c b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c new file mode 100644 index 0000000..25927f5 --- /dev/null +++ b/test cases/unit/91 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/91 install skip subprojects/subprojects/bar/bar.dat b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat new file mode 100644 index 0000000..421376d --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat @@ -0,0 +1 @@ +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 new file mode 100644 index 0000000..a7e26ac --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h @@ -0,0 +1 @@ +#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 new file mode 100644 index 0000000..421376d --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile @@ -0,0 +1 @@ +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 new file mode 100644 index 0000000..b5b0734 --- /dev/null +++ b/test cases/unit/91 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 install skip subprojects/foo.c b/test cases/unit/92 install skip subprojects/foo.c deleted file mode 100644 index 25927f5..0000000 --- a/test cases/unit/92 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/92 install skip subprojects/foo.dat b/test cases/unit/92 install skip subprojects/foo.dat deleted file mode 100644 index 421376d..0000000 --- a/test cases/unit/92 install skip subprojects/foo.dat +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/92 install skip subprojects/foo.h b/test cases/unit/92 install skip subprojects/foo.h deleted file mode 100644 index a7e26ac..0000000 --- a/test cases/unit/92 install skip subprojects/foo.h +++ /dev/null @@ -1 +0,0 @@ -#define FOO diff --git a/test cases/unit/92 install skip subprojects/foo/foofile b/test cases/unit/92 install skip subprojects/foo/foofile deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/92 install skip subprojects/meson.build b/test cases/unit/92 install skip subprojects/meson.build deleted file mode 100644 index cfbae94..0000000 --- a/test cases/unit/92 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/92 install skip subprojects/subprojects/bar/bar.c b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c deleted file mode 100644 index 25927f5..0000000 --- a/test cases/unit/92 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/92 install skip subprojects/subprojects/bar/bar.dat b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat deleted file mode 100644 index 421376d..0000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index a7e26ac..0000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h +++ /dev/null @@ -1 +0,0 @@ -#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 deleted file mode 100644 index 421376d..0000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index b5b0734..0000000 --- a/test cases/unit/92 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 new subproject in configured project/meson.build b/test cases/unit/92 new subproject in configured project/meson.build new file mode 100644 index 0000000..b82aa41 --- /dev/null +++ b/test cases/unit/92 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/92 new subproject in configured project/meson_options.txt b/test cases/unit/92 new subproject in configured project/meson_options.txt new file mode 100644 index 0000000..12d8395 --- /dev/null +++ b/test cases/unit/92 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/92 new subproject in configured project/subprojects/sub/foo.c b/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c new file mode 100644 index 0000000..9713d9f --- /dev/null +++ b/test cases/unit/92 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/92 new subproject in configured project/subprojects/sub/meson.build b/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build new file mode 100644 index 0000000..a833b0c --- /dev/null +++ b/test cases/unit/92 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/93 clangformat/.clang-format b/test cases/unit/93 clangformat/.clang-format new file mode 100644 index 0000000..689bc60 --- /dev/null +++ b/test cases/unit/93 clangformat/.clang-format @@ -0,0 +1,4 @@ +--- +BasedOnStyle: Google + +... diff --git a/test cases/unit/93 clangformat/.clang-format-ignore b/test cases/unit/93 clangformat/.clang-format-ignore new file mode 100644 index 0000000..7fc4d5a --- /dev/null +++ b/test cases/unit/93 clangformat/.clang-format-ignore @@ -0,0 +1,3 @@ + +# Ignore C files +*.c diff --git a/test cases/unit/93 clangformat/.clang-format-include b/test cases/unit/93 clangformat/.clang-format-include new file mode 100644 index 0000000..f057c00 --- /dev/null +++ b/test cases/unit/93 clangformat/.clang-format-include @@ -0,0 +1,3 @@ + +# Only reformat in src/ +src/**/* diff --git a/test cases/unit/93 clangformat/meson.build b/test cases/unit/93 clangformat/meson.build new file mode 100644 index 0000000..8f4af98 --- /dev/null +++ b/test cases/unit/93 clangformat/meson.build @@ -0,0 +1 @@ +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 new file mode 100644 index 0000000..99a0ea6 --- /dev/null +++ b/test cases/unit/93 clangformat/not-included/badformat.cpp @@ -0,0 +1,2 @@ +class { +}; diff --git a/test cases/unit/93 clangformat/src/badformat.c b/test cases/unit/93 clangformat/src/badformat.c new file mode 100644 index 0000000..f1d18b7 --- /dev/null +++ b/test cases/unit/93 clangformat/src/badformat.c @@ -0,0 +1,2 @@ +struct { +}; diff --git a/test cases/unit/93 clangformat/src/badformat.cpp b/test cases/unit/93 clangformat/src/badformat.cpp new file mode 100644 index 0000000..99a0ea6 --- /dev/null +++ b/test cases/unit/93 clangformat/src/badformat.cpp @@ -0,0 +1,2 @@ +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 deleted file mode 100644 index b82aa41..0000000 --- a/test cases/unit/93 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/93 new subproject in configured project/meson_options.txt b/test cases/unit/93 new subproject in configured project/meson_options.txt deleted file mode 100644 index 12d8395..0000000 --- a/test cases/unit/93 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/93 new subproject in configured project/subprojects/sub/foo.c b/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c deleted file mode 100644 index 9713d9f..0000000 --- a/test cases/unit/93 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/93 new subproject in configured project/subprojects/sub/meson.build b/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build deleted file mode 100644 index a833b0c..0000000 --- a/test cases/unit/93 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/94 clangformat/.clang-format b/test cases/unit/94 clangformat/.clang-format deleted file mode 100644 index 689bc60..0000000 --- a/test cases/unit/94 clangformat/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ ---- -BasedOnStyle: Google - -... diff --git a/test cases/unit/94 clangformat/.clang-format-ignore b/test cases/unit/94 clangformat/.clang-format-ignore deleted file mode 100644 index 7fc4d5a..0000000 --- a/test cases/unit/94 clangformat/.clang-format-ignore +++ /dev/null @@ -1,3 +0,0 @@ - -# Ignore C files -*.c diff --git a/test cases/unit/94 clangformat/.clang-format-include b/test cases/unit/94 clangformat/.clang-format-include deleted file mode 100644 index f057c00..0000000 --- a/test cases/unit/94 clangformat/.clang-format-include +++ /dev/null @@ -1,3 +0,0 @@ - -# Only reformat in src/ -src/**/* diff --git a/test cases/unit/94 clangformat/meson.build b/test cases/unit/94 clangformat/meson.build deleted file mode 100644 index 8f4af98..0000000 --- a/test cases/unit/94 clangformat/meson.build +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 99a0ea6..0000000 --- a/test cases/unit/94 clangformat/not-included/badformat.cpp +++ /dev/null @@ -1,2 +0,0 @@ -class { -}; diff --git a/test cases/unit/94 clangformat/src/badformat.c b/test cases/unit/94 clangformat/src/badformat.c deleted file mode 100644 index f1d18b7..0000000 --- a/test cases/unit/94 clangformat/src/badformat.c +++ /dev/null @@ -1,2 +0,0 @@ -struct { -}; diff --git a/test cases/unit/94 clangformat/src/badformat.cpp b/test cases/unit/94 clangformat/src/badformat.cpp deleted file mode 100644 index 99a0ea6..0000000 --- a/test cases/unit/94 clangformat/src/badformat.cpp +++ /dev/null @@ -1,2 +0,0 @@ -class { -}; diff --git a/test cases/unit/94 custominc/easytogrepfor/genh.py b/test cases/unit/94 custominc/easytogrepfor/genh.py new file mode 100644 index 0000000..48e033a --- /dev/null +++ b/test cases/unit/94 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/94 custominc/easytogrepfor/meson.build b/test cases/unit/94 custominc/easytogrepfor/meson.build new file mode 100644 index 0000000..e749753 --- /dev/null +++ b/test cases/unit/94 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/94 custominc/helper.c b/test cases/unit/94 custominc/helper.c new file mode 100644 index 0000000..3237441 --- /dev/null +++ b/test cases/unit/94 custominc/helper.c @@ -0,0 +1,5 @@ +#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 new file mode 100644 index 0000000..bab1139 --- /dev/null +++ b/test cases/unit/94 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/94 custominc/prog.c b/test cases/unit/94 custominc/prog.c new file mode 100644 index 0000000..db9df9d --- /dev/null +++ b/test cases/unit/94 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/94 custominc/prog2.c b/test cases/unit/94 custominc/prog2.c new file mode 100644 index 0000000..e64b229 --- /dev/null +++ b/test cases/unit/94 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 custominc/easytogrepfor/genh.py b/test cases/unit/95 custominc/easytogrepfor/genh.py deleted file mode 100644 index 48e033a..0000000 --- a/test cases/unit/95 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/95 custominc/easytogrepfor/meson.build b/test cases/unit/95 custominc/easytogrepfor/meson.build deleted file mode 100644 index e749753..0000000 --- a/test cases/unit/95 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/95 custominc/helper.c b/test cases/unit/95 custominc/helper.c deleted file mode 100644 index 3237441..0000000 --- a/test cases/unit/95 custominc/helper.c +++ /dev/null @@ -1,5 +0,0 @@ -#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 deleted file mode 100644 index bab1139..0000000 --- a/test cases/unit/95 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/95 custominc/prog.c b/test cases/unit/95 custominc/prog.c deleted file mode 100644 index db9df9d..0000000 --- a/test cases/unit/95 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/95 custominc/prog2.c b/test cases/unit/95 custominc/prog2.c deleted file mode 100644 index e64b229..0000000 --- a/test cases/unit/95 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 implicit force fallback/meson.build b/test cases/unit/95 implicit force fallback/meson.build new file mode 100644 index 0000000..623a338 --- /dev/null +++ b/test cases/unit/95 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/95 implicit force fallback/subprojects/something/meson.build b/test cases/unit/95 implicit force fallback/subprojects/something/meson.build new file mode 100644 index 0000000..89a4727 --- /dev/null +++ b/test cases/unit/95 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/96 compiler.links file arg/meson.build b/test cases/unit/96 compiler.links file arg/meson.build new file mode 100644 index 0000000..c409dcb --- /dev/null +++ b/test cases/unit/96 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/96 compiler.links file arg/test.c b/test cases/unit/96 compiler.links file arg/test.c new file mode 100644 index 0000000..78f2de1 --- /dev/null +++ b/test cases/unit/96 compiler.links file arg/test.c @@ -0,0 +1 @@ +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 deleted file mode 100644 index 623a338..0000000 --- a/test cases/unit/96 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/96 implicit force fallback/subprojects/something/meson.build b/test cases/unit/96 implicit force fallback/subprojects/something/meson.build deleted file mode 100644 index 89a4727..0000000 --- a/test cases/unit/96 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/97 compiler.links file arg/meson.build b/test cases/unit/97 compiler.links file arg/meson.build deleted file mode 100644 index c409dcb..0000000 --- a/test cases/unit/97 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/97 compiler.links file arg/test.c b/test cases/unit/97 compiler.links file arg/test.c deleted file mode 100644 index 78f2de1..0000000 --- a/test cases/unit/97 compiler.links file arg/test.c +++ /dev/null @@ -1 +0,0 @@ -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 new file mode 100644 index 0000000..8129601 --- /dev/null +++ b/test cases/unit/97 link full name/.gitignore @@ -0,0 +1,5 @@ +*.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 new file mode 100644 index 0000000..128c213 --- /dev/null +++ b/test cases/unit/97 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/97 link full name/libtestprovider/provider.c b/test cases/unit/97 link full name/libtestprovider/provider.c new file mode 100644 index 0000000..5e79966 --- /dev/null +++ b/test cases/unit/97 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/97 link full name/proguser/meson.build b/test cases/unit/97 link full name/proguser/meson.build new file mode 100644 index 0000000..5be5bc9 --- /dev/null +++ b/test cases/unit/97 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/97 link full name/proguser/receiver.c b/test cases/unit/97 link full name/proguser/receiver.c new file mode 100644 index 0000000..65e9d8e --- /dev/null +++ b/test cases/unit/97 link full name/proguser/receiver.c @@ -0,0 +1,18 @@ +#include +int __attribute__((weak)) get_checked(void) { + return -1; +} + + +#define CHECK_VALUE (100) +#define TEST_SUCCESS (0) +#define TEST_FAILTURE (-1) + +int main(void) { + if (get_checked() == CHECK_VALUE) { + fprintf(stdout,"good\n"); + return TEST_SUCCESS; + } + fprintf(stdout,"bad\n"); + return TEST_FAILTURE; +} diff --git a/test cases/unit/98 install all targets/bar-custom.txt b/test cases/unit/98 install all targets/bar-custom.txt new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/98 install all targets/bar-devel.h b/test cases/unit/98 install all targets/bar-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/98 install all targets/bar-notag.txt b/test cases/unit/98 install all targets/bar-notag.txt new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..557db03 --- /dev/null +++ b/test cases/unit/98 install all targets/custom_files/data.txt @@ -0,0 +1 @@ +Hello World diff --git a/test cases/unit/98 install all targets/foo.in b/test cases/unit/98 install all targets/foo.in new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/98 install all targets/foo1-devel.h b/test cases/unit/98 install all targets/foo1-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/98 install all targets/lib.c b/test cases/unit/98 install all targets/lib.c new file mode 100644 index 0000000..2ea9c7d --- /dev/null +++ b/test cases/unit/98 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/98 install all targets/main.c b/test cases/unit/98 install all targets/main.c new file mode 100644 index 0000000..0fb4389 --- /dev/null +++ b/test cases/unit/98 install all targets/main.c @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..c90632a --- /dev/null +++ b/test cases/unit/98 install all targets/meson.build @@ -0,0 +1,92 @@ +project('install tag', 'c') + +subdir('subdir') + +# Those files should not be tagged +configure_file(input: 'foo.in', output: 'foo-notag.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +install_data('bar-notag.txt', + install_dir: get_option('datadir') +) +custom_target('ct1', + output: ['out1-notag.txt', 'out2-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) + +# Those files should be tagged as devel +install_headers('foo1-devel.h') +install_data('bar-devel.h', + install_dir: get_option('includedir'), +) +configure_file(input: 'foo.in', output: 'foo2-devel.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('includedir'), + install: true, +) +static_library('static', 'lib.c', + install: true, +) + +# Those files should have 'runtime' tag +executable('app', 'main.c', + install: true, +) +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', +) + +# 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 new file mode 100644 index 0000000..c5f3be9 --- /dev/null +++ b/test cases/unit/98 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/98 install all targets/subdir/bar2-devel.h b/test cases/unit/98 install all targets/subdir/bar2-devel.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/98 install all targets/subdir/foo2.in b/test cases/unit/98 install all targets/subdir/foo2.in new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/98 install all targets/subdir/lib.c b/test cases/unit/98 install all targets/subdir/lib.c new file mode 100644 index 0000000..2ea9c7d --- /dev/null +++ b/test cases/unit/98 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/98 install all targets/subdir/main.c b/test cases/unit/98 install all targets/subdir/main.c new file mode 100644 index 0000000..0fb4389 --- /dev/null +++ b/test cases/unit/98 install all targets/subdir/main.c @@ -0,0 +1,3 @@ +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 new file mode 100644 index 0000000..53c796a --- /dev/null +++ b/test cases/unit/98 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/98 install all targets/subdir/script.py b/test cases/unit/98 install all targets/subdir/script.py new file mode 100644 index 0000000..c5f3be9 --- /dev/null +++ b/test cases/unit/98 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/98 link full name/.gitignore b/test cases/unit/98 link full name/.gitignore deleted file mode 100644 index 8129601..0000000 --- a/test cases/unit/98 link full name/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.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 deleted file mode 100644 index 128c213..0000000 --- a/test cases/unit/98 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/98 link full name/libtestprovider/provider.c b/test cases/unit/98 link full name/libtestprovider/provider.c deleted file mode 100644 index 5e79966..0000000 --- a/test cases/unit/98 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/98 link full name/proguser/meson.build b/test cases/unit/98 link full name/proguser/meson.build deleted file mode 100644 index 5be5bc9..0000000 --- a/test cases/unit/98 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/98 link full name/proguser/receiver.c b/test cases/unit/98 link full name/proguser/receiver.c deleted file mode 100644 index 65e9d8e..0000000 --- a/test cases/unit/98 link full name/proguser/receiver.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -int __attribute__((weak)) get_checked(void) { - return -1; -} - - -#define CHECK_VALUE (100) -#define TEST_SUCCESS (0) -#define TEST_FAILTURE (-1) - -int main(void) { - if (get_checked() == CHECK_VALUE) { - fprintf(stdout,"good\n"); - return TEST_SUCCESS; - } - fprintf(stdout,"bad\n"); - return TEST_FAILTURE; -} diff --git a/test cases/unit/99 custom target name/file.txt.in b/test cases/unit/99 custom target name/file.txt.in new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/99 custom target name/meson.build b/test cases/unit/99 custom target name/meson.build new file mode 100644 index 0000000..8d148a8 --- /dev/null +++ b/test cases/unit/99 custom target name/meson.build @@ -0,0 +1,14 @@ +project('custom target name', 'c') + +python = import('python').find_installation() + +# Name argument is optional and should default to 'file.txt' +custom_target( + input: 'file.txt.in', + output: '@BASENAME@', + command: [python, '--version'], + build_by_default: true, + capture: true, +) + +subdir('subdir') diff --git a/test cases/unit/99 custom target name/subdir/meson.build b/test cases/unit/99 custom target name/subdir/meson.build new file mode 100644 index 0000000..785a7b3 --- /dev/null +++ b/test cases/unit/99 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/99 install all targets/bar-custom.txt b/test cases/unit/99 install all targets/bar-custom.txt deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 install all targets/bar-devel.h b/test cases/unit/99 install all targets/bar-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 install all targets/bar-notag.txt b/test cases/unit/99 install all targets/bar-notag.txt deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index 557db03..0000000 --- a/test cases/unit/99 install all targets/custom_files/data.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/test cases/unit/99 install all targets/foo.in b/test cases/unit/99 install all targets/foo.in deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 install all targets/foo1-devel.h b/test cases/unit/99 install all targets/foo1-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 install all targets/lib.c b/test cases/unit/99 install all targets/lib.c deleted file mode 100644 index 2ea9c7d..0000000 --- a/test cases/unit/99 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/99 install all targets/main.c b/test cases/unit/99 install all targets/main.c deleted file mode 100644 index 0fb4389..0000000 --- a/test cases/unit/99 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/99 install all targets/meson.build b/test cases/unit/99 install all targets/meson.build deleted file mode 100644 index c90632a..0000000 --- a/test cases/unit/99 install all targets/meson.build +++ /dev/null @@ -1,92 +0,0 @@ -project('install tag', 'c') - -subdir('subdir') - -# Those files should not be tagged -configure_file(input: 'foo.in', output: 'foo-notag.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -install_data('bar-notag.txt', - install_dir: get_option('datadir') -) -custom_target('ct1', - output: ['out1-notag.txt', 'out2-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) - -# Those files should be tagged as devel -install_headers('foo1-devel.h') -install_data('bar-devel.h', - install_dir: get_option('includedir'), -) -configure_file(input: 'foo.in', output: 'foo2-devel.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('includedir'), - install: true, -) -static_library('static', 'lib.c', - install: true, -) - -# Those files should have 'runtime' tag -executable('app', 'main.c', - install: true, -) -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', -) - -# 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 deleted file mode 100644 index c5f3be9..0000000 --- a/test cases/unit/99 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/99 install all targets/subdir/bar2-devel.h b/test cases/unit/99 install all targets/subdir/bar2-devel.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 install all targets/subdir/foo2.in b/test cases/unit/99 install all targets/subdir/foo2.in deleted file mode 100644 index e69de29..0000000 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 deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/99 install all targets/subdir/lib.c b/test cases/unit/99 install all targets/subdir/lib.c deleted file mode 100644 index 2ea9c7d..0000000 --- a/test cases/unit/99 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/99 install all targets/subdir/main.c b/test cases/unit/99 install all targets/subdir/main.c deleted file mode 100644 index 0fb4389..0000000 --- a/test cases/unit/99 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/99 install all targets/subdir/meson.build b/test cases/unit/99 install all targets/subdir/meson.build deleted file mode 100644 index 53c796a..0000000 --- a/test cases/unit/99 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/99 install all targets/subdir/script.py b/test cases/unit/99 install all targets/subdir/script.py deleted file mode 100644 index c5f3be9..0000000 --- a/test cases/unit/99 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/unittests/allplatformstests.py b/unittests/allplatformstests.py index 7382f40..37ef59b 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -542,7 +542,7 @@ class AllPlatformTests(BasePlatformTests): self.run_tests() def test_implicit_forcefallback(self): - testdir = os.path.join(self.unit_test_dir, '96 implicit force fallback') + testdir = os.path.join(self.unit_test_dir, '95 implicit force fallback') with self.assertRaises(subprocess.CalledProcessError): self.init(testdir) self.init(testdir, extra_args=['--wrap-mode=forcefallback']) @@ -581,7 +581,7 @@ class AllPlatformTests(BasePlatformTests): self.assertIn('1/1 subtest 1', out) def test_long_output(self): - testdir = os.path.join(self.common_test_dir, '253 long output') + testdir = os.path.join(self.common_test_dir, '254 long output') self.init(testdir) self.build() self.run_tests() @@ -1749,7 +1749,7 @@ class AllPlatformTests(BasePlatformTests): check_pcfile('libvartest2.pc', relocatable=False) self.wipe() - testdir_abs = os.path.join(self.unit_test_dir, '106 pkgconfig relocatable with absolute path') + testdir_abs = os.path.join(self.unit_test_dir, '105 pkgconfig relocatable with absolute path') self.init(testdir_abs) check_pcfile('libsimple.pc', relocatable=True, levels=3) @@ -2112,7 +2112,7 @@ class AllPlatformTests(BasePlatformTests): self.assertIn(msg, out) def test_mixed_language_linker_check(self): - testdir = os.path.join(self.unit_test_dir, '97 compiler.links file arg') + testdir = os.path.join(self.unit_test_dir, '96 compiler.links file arg') self.init(testdir) cmds = self.get_meson_log_compiler_checks() self.assertEqual(len(cmds), 5) @@ -3877,7 +3877,7 @@ class AllPlatformTests(BasePlatformTests): self.init(srcdir, extra_args=['-Dbuild.b_lto=true']) def test_install_skip_subprojects(self): - testdir = os.path.join(self.unit_test_dir, '92 install skip subprojects') + testdir = os.path.join(self.unit_test_dir, '91 install skip subprojects') self.init(testdir) self.build() @@ -3923,7 +3923,7 @@ class AllPlatformTests(BasePlatformTests): check_installed_files(['--skip-subprojects', 'another'], all_expected) def test_adding_subproject_to_configure_project(self) -> None: - srcdir = os.path.join(self.unit_test_dir, '93 new subproject in configured project') + srcdir = os.path.join(self.unit_test_dir, '92 new subproject in configured project') self.init(srcdir) self.build() self.setconf('-Duse-sub=true') @@ -3946,7 +3946,7 @@ class AllPlatformTests(BasePlatformTests): if not shutil.which('clang-format'): raise SkipTest('clang-format not found') - testdir = os.path.join(self.unit_test_dir, '94 clangformat') + testdir = os.path.join(self.unit_test_dir, '93 clangformat') newdir = os.path.join(self.builddir, 'testdir') shutil.copytree(testdir, newdir) self.new_builddir() @@ -3971,7 +3971,7 @@ class AllPlatformTests(BasePlatformTests): self.build('clang-format-check') def test_custom_target_implicit_include(self): - testdir = os.path.join(self.unit_test_dir, '95 custominc') + testdir = os.path.join(self.unit_test_dir, '94 custominc') self.init(testdir) self.build() compdb = self.get_compdb() @@ -4011,7 +4011,7 @@ class AllPlatformTests(BasePlatformTests): self.assertEqual(sorted(link_args), sorted(['-flto'])) def test_install_tag(self) -> None: - testdir = os.path.join(self.unit_test_dir, '99 install all targets') + testdir = os.path.join(self.unit_test_dir, '98 install all targets') self.init(testdir) self.build() @@ -4158,7 +4158,7 @@ class AllPlatformTests(BasePlatformTests): do_install(None, expected_all, 2) def test_introspect_install_plan(self): - testdir = os.path.join(self.unit_test_dir, '99 install all targets') + testdir = os.path.join(self.unit_test_dir, '98 install all targets') introfile = os.path.join(self.builddir, 'meson-info', 'intro-install_plan.json') self.init(testdir) self.assertPathExists(introfile) @@ -4360,7 +4360,7 @@ class AllPlatformTests(BasePlatformTests): }} ''') - testdir = os.path.join(self.unit_test_dir, '102 rlib linkage') + testdir = os.path.join(self.unit_test_dir, '101 rlib linkage') gen_file = os.path.join(testdir, 'lib.rs') with open(gen_file, 'w') as f: f.write(template.format(0)) @@ -4380,7 +4380,7 @@ class AllPlatformTests(BasePlatformTests): self.assertIn('exit status 39', cm.exception.stdout) def test_custom_target_name(self): - testdir = os.path.join(self.unit_test_dir, '100 custom target name') + testdir = os.path.join(self.unit_test_dir, '99 custom target name') self.init(testdir) out = self.build() if self.backend is Backend.ninja: @@ -4388,7 +4388,7 @@ class AllPlatformTests(BasePlatformTests): self.assertIn('Generating subdir/file.txt with a custom command', out) def test_symlinked_subproject(self): - testdir = os.path.join(self.unit_test_dir, '107 subproject symlink') + testdir = os.path.join(self.unit_test_dir, '106 subproject symlink') subproject_dir = os.path.join(testdir, 'subprojects') subproject = os.path.join(testdir, 'symlinked_subproject') symlinked_subproject = os.path.join(testdir, 'subprojects', 'symlinked_subproject') @@ -4401,7 +4401,7 @@ class AllPlatformTests(BasePlatformTests): self.build() def test_configure_same_noop(self): - testdir = os.path.join(self.unit_test_dir, '109 configure same noop') + testdir = os.path.join(self.unit_test_dir, '108 configure same noop') self.init(testdir, extra_args=['-Dopt=val']) filename = os.path.join(self.privatedir, 'coredata.dat') diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index 7de3214..357e420 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -1350,7 +1350,7 @@ class LinuxlikeTests(BasePlatformTests): see: https://github.com/mesonbuild/meson/issues/9000 https://stackoverflow.com/questions/48532868/gcc-library-option-with-a-colon-llibevent-a ''' - testdir = os.path.join(self.unit_test_dir, '98 link full name','libtestprovider') + testdir = os.path.join(self.unit_test_dir, '97 link full name','libtestprovider') oldprefix = self.prefix # install into installdir without using DESTDIR installdir = self.installdir @@ -1363,7 +1363,7 @@ class LinuxlikeTests(BasePlatformTests): self.new_builddir() env = {'LIBRARY_PATH': os.path.join(installdir, self.libdir), 'PKG_CONFIG_PATH': _prepend_pkg_config_path(os.path.join(installdir, self.libdir, 'pkgconfig'))} - testdir = os.path.join(self.unit_test_dir, '98 link full name','proguser') + testdir = os.path.join(self.unit_test_dir, '97 link full name','proguser') self.init(testdir,override_envvars=env) # test for link with full path @@ -1775,7 +1775,7 @@ class LinuxlikeTests(BasePlatformTests): @skipUnless(is_linux(), 'Test only applicable to Linux') def test_install_strip(self): - testdir = os.path.join(self.unit_test_dir, '104 strip') + testdir = os.path.join(self.unit_test_dir, '103 strip') self.init(testdir) self.build() diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index ed5d96b..fc40442 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -35,7 +35,7 @@ class PlatformAgnosticTests(BasePlatformTests): Tests that find_program() with a relative path does not find the program in current workdir. ''' - testdir = os.path.join(self.unit_test_dir, '101 relative find program') + testdir = os.path.join(self.unit_test_dir, '100 relative find program') self.init(testdir, workdir=testdir) def test_invalid_option_names(self): @@ -71,11 +71,11 @@ class PlatformAgnosticTests(BasePlatformTests): interp.process(fname) def test_python_dependency_without_pkgconfig(self): - testdir = os.path.join(self.unit_test_dir, '103 python without pkgconfig') + testdir = os.path.join(self.unit_test_dir, '102 python without pkgconfig') self.init(testdir, override_envvars={'PKG_CONFIG': 'notfound'}) def test_debug_function_outputs_to_meson_log(self): - testdir = os.path.join(self.unit_test_dir, '105 debug function') + testdir = os.path.join(self.unit_test_dir, '104 debug function') log_msg = 'This is an example debug output, should only end up in debug log' output = self.init(testdir) @@ -88,7 +88,7 @@ class PlatformAgnosticTests(BasePlatformTests): self.assertIn(log_msg, file.read()) def test_new_subproject_reconfigure(self): - testdir = os.path.join(self.unit_test_dir, '108 new subproject on reconfigure') + testdir = os.path.join(self.unit_test_dir, '107 new subproject on reconfigure') self.init(testdir) self.build() -- cgit v1.1