From fbeedf4b141ac84d236649aa1e5d4f6bf773ce92 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 20 Oct 2024 19:29:42 +0300 Subject: Condense test directories. --- test cases/common/279 pkgconfig-gen/meson.build | 19 ---- test cases/common/279 pkgconfig-gen/simple.c | 6 -- test cases/common/279 pkgconfig-gen/simple.h | 6 -- .../common/279 pkgconfig-gen/simple2/exports.def | 2 - .../common/279 pkgconfig-gen/simple2/meson.build | 2 - .../common/279 pkgconfig-gen/simple2/simple2.c | 5 - .../common/279 pkgconfig-gen/simple2/simple2.h | 6 -- test cases/common/279 pkgconfig-gen/test.json | 15 --- test cases/common/280 pkgconfig-gen/meson.build | 19 ++++ test cases/common/280 pkgconfig-gen/simple.c | 6 ++ test cases/common/280 pkgconfig-gen/simple.h | 6 ++ .../common/280 pkgconfig-gen/simple2/exports.def | 2 + .../common/280 pkgconfig-gen/simple2/meson.build | 2 + .../common/280 pkgconfig-gen/simple2/simple2.c | 5 + .../common/280 pkgconfig-gen/simple2/simple2.h | 6 ++ test cases/common/280 pkgconfig-gen/test.json | 15 +++ test cases/unit/100 custom target name/file.txt.in | 0 test cases/unit/100 custom target name/meson.build | 14 --- .../unit/100 custom target name/subdir/meson.build | 9 -- test cases/unit/100 relative find program/foo.py | 3 + .../unit/100 relative find program/meson.build | 3 + .../100 relative find program/subdir/meson.build | 2 + test cases/unit/101 relative find program/foo.py | 3 - .../unit/101 relative find program/meson.build | 3 - .../101 relative find program/subdir/meson.build | 2 - test cases/unit/101 rlib linkage/lib2.rs | 5 + test cases/unit/101 rlib linkage/main.rs | 5 + test cases/unit/101 rlib linkage/meson.build | 22 ++++ .../unit/102 python without pkgconfig/meson.build | 4 + test cases/unit/102 rlib linkage/lib2.rs | 5 - test cases/unit/102 rlib linkage/main.rs | 5 - test cases/unit/102 rlib linkage/meson.build | 22 ---- .../unit/103 python without pkgconfig/meson.build | 4 - test cases/unit/103 strip/lib.c | 3 + test cases/unit/103 strip/meson.build | 3 + test cases/unit/104 debug function/meson.build | 4 + test cases/unit/104 strip/lib.c | 3 - test cases/unit/104 strip/meson.build | 3 - test cases/unit/105 debug function/meson.build | 4 - .../meson.build | 15 +++ .../meson.build | 15 --- test cases/unit/91 install skip subprojects/foo.c | 4 + .../unit/91 install skip subprojects/foo.dat | 1 + test cases/unit/91 install skip subprojects/foo.h | 1 + .../unit/91 install skip subprojects/foo/foofile | 0 .../unit/91 install skip subprojects/meson.build | 8 ++ .../subprojects/bar/bar.c | 4 + .../subprojects/bar/bar.dat | 1 + .../subprojects/bar/bar.h | 1 + .../subprojects/bar/bar/barfile | 1 + .../subprojects/bar/meson.build | 6 ++ test cases/unit/92 install skip subprojects/foo.c | 4 - .../unit/92 install skip subprojects/foo.dat | 1 - test cases/unit/92 install skip subprojects/foo.h | 1 - .../unit/92 install skip subprojects/foo/foofile | 0 .../unit/92 install skip subprojects/meson.build | 8 -- .../subprojects/bar/bar.c | 4 - .../subprojects/bar/bar.dat | 1 - .../subprojects/bar/bar.h | 1 - .../subprojects/bar/bar/barfile | 1 - .../subprojects/bar/meson.build | 6 -- .../meson.build | 7 ++ .../meson_options.txt | 3 + .../subprojects/sub/foo.c | 6 ++ .../subprojects/sub/meson.build | 7 ++ test cases/unit/93 clangformat/.clang-format | 4 + .../unit/93 clangformat/.clang-format-ignore | 3 + .../unit/93 clangformat/.clang-format-include | 3 + test cases/unit/93 clangformat/meson.build | 1 + .../unit/93 clangformat/not-included/badformat.cpp | 2 + test cases/unit/93 clangformat/src/badformat.c | 2 + test cases/unit/93 clangformat/src/badformat.cpp | 2 + .../meson.build | 7 -- .../meson_options.txt | 3 - .../subprojects/sub/foo.c | 6 -- .../subprojects/sub/meson.build | 7 -- test cases/unit/94 clangformat/.clang-format | 4 - .../unit/94 clangformat/.clang-format-ignore | 3 - .../unit/94 clangformat/.clang-format-include | 3 - test cases/unit/94 clangformat/meson.build | 1 - .../unit/94 clangformat/not-included/badformat.cpp | 2 - test cases/unit/94 clangformat/src/badformat.c | 2 - test cases/unit/94 clangformat/src/badformat.cpp | 2 - test cases/unit/94 custominc/easytogrepfor/genh.py | 7 ++ .../unit/94 custominc/easytogrepfor/meson.build | 3 + test cases/unit/94 custominc/helper.c | 5 + test cases/unit/94 custominc/meson.build | 9 ++ test cases/unit/94 custominc/prog.c | 9 ++ test cases/unit/94 custominc/prog2.c | 10 ++ test cases/unit/95 custominc/easytogrepfor/genh.py | 7 -- .../unit/95 custominc/easytogrepfor/meson.build | 3 - test cases/unit/95 custominc/helper.c | 5 - test cases/unit/95 custominc/meson.build | 9 -- test cases/unit/95 custominc/prog.c | 9 -- test cases/unit/95 custominc/prog2.c | 10 -- .../unit/95 implicit force fallback/meson.build | 8 ++ .../subprojects/something/meson.build | 3 + .../unit/96 compiler.links file arg/meson.build | 11 ++ test cases/unit/96 compiler.links file arg/test.c | 1 + .../unit/96 implicit force fallback/meson.build | 8 -- .../subprojects/something/meson.build | 3 - .../unit/97 compiler.links file arg/meson.build | 11 -- test cases/unit/97 compiler.links file arg/test.c | 1 - test cases/unit/97 link full name/.gitignore | 5 + .../97 link full name/libtestprovider/meson.build | 20 ++++ .../97 link full name/libtestprovider/provider.c | 12 +++ .../unit/97 link full name/proguser/meson.build | 11 ++ .../unit/97 link full name/proguser/receiver.c | 18 ++++ .../unit/98 install all targets/bar-custom.txt | 0 test cases/unit/98 install all targets/bar-devel.h | 0 .../unit/98 install all targets/bar-notag.txt | 0 .../98 install all targets/custom_files/data.txt | 1 + .../98 install all targets/excludes/excluded.txt | 1 + .../excludes/excluded/placeholder.txt | 1 + .../98 install all targets/excludes/installed.txt | 1 + test cases/unit/98 install all targets/foo.in | 0 .../unit/98 install all targets/foo1-devel.h | 0 test cases/unit/98 install all targets/lib.c | 9 ++ test cases/unit/98 install all targets/main.c | 3 + test cases/unit/98 install all targets/meson.build | 116 +++++++++++++++++++++ test cases/unit/98 install all targets/script.py | 7 ++ .../98 install all targets/subdir/bar2-devel.h | 0 .../unit/98 install all targets/subdir/foo2.in | 0 .../98 install all targets/subdir/foo3-devel.h | 0 .../unit/98 install all targets/subdir/lib.c | 9 ++ .../unit/98 install all targets/subdir/main.c | 3 + .../unit/98 install all targets/subdir/meson.build | 21 ++++ .../unit/98 install all targets/subdir/script.py | 7 ++ .../subprojects/subproject/aaa.txt | 1 + .../subprojects/subproject/bbb.txt | 1 + .../subprojects/subproject/meson.build | 5 + test cases/unit/98 link full name/.gitignore | 5 - .../98 link full name/libtestprovider/meson.build | 20 ---- .../98 link full name/libtestprovider/provider.c | 12 --- .../unit/98 link full name/proguser/meson.build | 11 -- .../unit/98 link full name/proguser/receiver.c | 18 ---- test cases/unit/99 custom target name/file.txt.in | 0 test cases/unit/99 custom target name/meson.build | 14 +++ .../unit/99 custom target name/subdir/meson.build | 9 ++ .../unit/99 install all targets/bar-custom.txt | 0 test cases/unit/99 install all targets/bar-devel.h | 0 .../unit/99 install all targets/bar-notag.txt | 0 .../99 install all targets/custom_files/data.txt | 1 - .../99 install all targets/excludes/excluded.txt | 1 - .../excludes/excluded/placeholder.txt | 1 - .../99 install all targets/excludes/installed.txt | 1 - test cases/unit/99 install all targets/foo.in | 0 .../unit/99 install all targets/foo1-devel.h | 0 test cases/unit/99 install all targets/lib.c | 9 -- test cases/unit/99 install all targets/main.c | 3 - test cases/unit/99 install all targets/meson.build | 116 --------------------- test cases/unit/99 install all targets/script.py | 7 -- .../99 install all targets/subdir/bar2-devel.h | 0 .../unit/99 install all targets/subdir/foo2.in | 0 .../99 install all targets/subdir/foo3-devel.h | 0 .../unit/99 install all targets/subdir/lib.c | 9 -- .../unit/99 install all targets/subdir/main.c | 3 - .../unit/99 install all targets/subdir/meson.build | 21 ---- .../unit/99 install all targets/subdir/script.py | 7 -- .../subprojects/subproject/aaa.txt | 1 - .../subprojects/subproject/bbb.txt | 1 - .../subprojects/subproject/meson.build | 5 - 162 files changed, 538 insertions(+), 538 deletions(-) delete mode 100644 test cases/common/279 pkgconfig-gen/meson.build delete mode 100644 test cases/common/279 pkgconfig-gen/simple.c delete mode 100644 test cases/common/279 pkgconfig-gen/simple.h delete mode 100644 test cases/common/279 pkgconfig-gen/simple2/exports.def delete mode 100644 test cases/common/279 pkgconfig-gen/simple2/meson.build delete mode 100644 test cases/common/279 pkgconfig-gen/simple2/simple2.c delete mode 100644 test cases/common/279 pkgconfig-gen/simple2/simple2.h delete mode 100644 test cases/common/279 pkgconfig-gen/test.json create mode 100644 test cases/common/280 pkgconfig-gen/meson.build create mode 100644 test cases/common/280 pkgconfig-gen/simple.c create mode 100644 test cases/common/280 pkgconfig-gen/simple.h create mode 100644 test cases/common/280 pkgconfig-gen/simple2/exports.def create mode 100644 test cases/common/280 pkgconfig-gen/simple2/meson.build create mode 100644 test cases/common/280 pkgconfig-gen/simple2/simple2.c create mode 100644 test cases/common/280 pkgconfig-gen/simple2/simple2.h create mode 100644 test cases/common/280 pkgconfig-gen/test.json 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/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/excludes/excluded.txt create mode 100644 test cases/unit/98 install all targets/excludes/excluded/placeholder.txt create mode 100644 test cases/unit/98 install all targets/excludes/installed.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 create mode 100644 test cases/unit/98 install all targets/subprojects/subproject/aaa.txt create mode 100644 test cases/unit/98 install all targets/subprojects/subproject/bbb.txt create mode 100644 test cases/unit/98 install all targets/subprojects/subproject/meson.build 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/excludes/excluded.txt delete mode 100644 test cases/unit/99 install all targets/excludes/excluded/placeholder.txt delete mode 100644 test cases/unit/99 install all targets/excludes/installed.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 delete mode 100644 test cases/unit/99 install all targets/subprojects/subproject/aaa.txt delete mode 100644 test cases/unit/99 install all targets/subprojects/subproject/bbb.txt delete mode 100644 test cases/unit/99 install all targets/subprojects/subproject/meson.build (limited to 'test cases') diff --git a/test cases/common/279 pkgconfig-gen/meson.build b/test cases/common/279 pkgconfig-gen/meson.build deleted file mode 100644 index 3f158882f..000000000 --- a/test cases/common/279 pkgconfig-gen/meson.build +++ /dev/null @@ -1,19 +0,0 @@ -project('pkgconfig-get', 'c') - -pkgg = import('pkgconfig') - -subdir('simple2') - -lib = library('simple', 'simple.c', dependencies: lib_dep) -libver = '1.0' -h = install_headers('simple.h') - - -pkgg.generate( - lib, - version : libver, - name : 'libsimple', - filebase : 'simple', - description : 'A simple demo library.', - libraries: [lib_dep], -) \ No newline at end of file diff --git a/test cases/common/279 pkgconfig-gen/simple.c b/test cases/common/279 pkgconfig-gen/simple.c deleted file mode 100644 index da1d909f7..000000000 --- a/test cases/common/279 pkgconfig-gen/simple.c +++ /dev/null @@ -1,6 +0,0 @@ -#include"simple.h" -#include - -int simple_function(void) { - return simple_simple_function(); -} diff --git a/test cases/common/279 pkgconfig-gen/simple.h b/test cases/common/279 pkgconfig-gen/simple.h deleted file mode 100644 index 6896bfd17..000000000 --- a/test cases/common/279 pkgconfig-gen/simple.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SIMPLE_H_ -#define SIMPLE_H_ - -int simple_function(void); - -#endif diff --git a/test cases/common/279 pkgconfig-gen/simple2/exports.def b/test cases/common/279 pkgconfig-gen/simple2/exports.def deleted file mode 100644 index 42c911b93..000000000 --- a/test cases/common/279 pkgconfig-gen/simple2/exports.def +++ /dev/null @@ -1,2 +0,0 @@ -EXPORTS - simple_simple_function @1 diff --git a/test cases/common/279 pkgconfig-gen/simple2/meson.build b/test cases/common/279 pkgconfig-gen/simple2/meson.build deleted file mode 100644 index c8f13c05e..000000000 --- a/test cases/common/279 pkgconfig-gen/simple2/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -lib2 = library('simple2', 'simple2.c', vs_module_defs: 'exports.def') -lib_dep = declare_dependency(link_with: lib2, include_directories: include_directories('.')) diff --git a/test cases/common/279 pkgconfig-gen/simple2/simple2.c b/test cases/common/279 pkgconfig-gen/simple2/simple2.c deleted file mode 100644 index 215b2aef8..000000000 --- a/test cases/common/279 pkgconfig-gen/simple2/simple2.c +++ /dev/null @@ -1,5 +0,0 @@ -#include"simple2.h" - -int simple_simple_function(void) { - return 42; -} diff --git a/test cases/common/279 pkgconfig-gen/simple2/simple2.h b/test cases/common/279 pkgconfig-gen/simple2/simple2.h deleted file mode 100644 index 472e135f2..000000000 --- a/test cases/common/279 pkgconfig-gen/simple2/simple2.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SIMPLE2_H_ -#define SIMPLE2_H_ - -int simple_simple_function(void); - -#endif diff --git a/test cases/common/279 pkgconfig-gen/test.json b/test cases/common/279 pkgconfig-gen/test.json deleted file mode 100644 index 99b18086c..000000000 --- a/test cases/common/279 pkgconfig-gen/test.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "installed": [ - { "type": "file", "file": "usr/include/simple.h"}, - { "type": "file", "file": "usr/lib/pkgconfig/simple.pc"} - ], - "matrix": { - "options": { - "default_library": [ - { "val": "shared" }, - { "val": "static" }, - { "val": "both" } - ] - } - } -} diff --git a/test cases/common/280 pkgconfig-gen/meson.build b/test cases/common/280 pkgconfig-gen/meson.build new file mode 100644 index 000000000..3f158882f --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/meson.build @@ -0,0 +1,19 @@ +project('pkgconfig-get', 'c') + +pkgg = import('pkgconfig') + +subdir('simple2') + +lib = library('simple', 'simple.c', dependencies: lib_dep) +libver = '1.0' +h = install_headers('simple.h') + + +pkgg.generate( + lib, + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + libraries: [lib_dep], +) \ No newline at end of file diff --git a/test cases/common/280 pkgconfig-gen/simple.c b/test cases/common/280 pkgconfig-gen/simple.c new file mode 100644 index 000000000..da1d909f7 --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/simple.c @@ -0,0 +1,6 @@ +#include"simple.h" +#include + +int simple_function(void) { + return simple_simple_function(); +} diff --git a/test cases/common/280 pkgconfig-gen/simple.h b/test cases/common/280 pkgconfig-gen/simple.h new file mode 100644 index 000000000..6896bfd17 --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(void); + +#endif diff --git a/test cases/common/280 pkgconfig-gen/simple2/exports.def b/test cases/common/280 pkgconfig-gen/simple2/exports.def new file mode 100644 index 000000000..42c911b93 --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/simple2/exports.def @@ -0,0 +1,2 @@ +EXPORTS + simple_simple_function @1 diff --git a/test cases/common/280 pkgconfig-gen/simple2/meson.build b/test cases/common/280 pkgconfig-gen/simple2/meson.build new file mode 100644 index 000000000..c8f13c05e --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/simple2/meson.build @@ -0,0 +1,2 @@ +lib2 = library('simple2', 'simple2.c', vs_module_defs: 'exports.def') +lib_dep = declare_dependency(link_with: lib2, include_directories: include_directories('.')) diff --git a/test cases/common/280 pkgconfig-gen/simple2/simple2.c b/test cases/common/280 pkgconfig-gen/simple2/simple2.c new file mode 100644 index 000000000..215b2aef8 --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/simple2/simple2.c @@ -0,0 +1,5 @@ +#include"simple2.h" + +int simple_simple_function(void) { + return 42; +} diff --git a/test cases/common/280 pkgconfig-gen/simple2/simple2.h b/test cases/common/280 pkgconfig-gen/simple2/simple2.h new file mode 100644 index 000000000..472e135f2 --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/simple2/simple2.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE2_H_ +#define SIMPLE2_H_ + +int simple_simple_function(void); + +#endif diff --git a/test cases/common/280 pkgconfig-gen/test.json b/test cases/common/280 pkgconfig-gen/test.json new file mode 100644 index 000000000..99b18086c --- /dev/null +++ b/test cases/common/280 pkgconfig-gen/test.json @@ -0,0 +1,15 @@ +{ + "installed": [ + { "type": "file", "file": "usr/include/simple.h"}, + { "type": "file", "file": "usr/lib/pkgconfig/simple.pc"} + ], + "matrix": { + "options": { + "default_library": [ + { "val": "shared" }, + { "val": "static" }, + { "val": "both" } + ] + } + } +} 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 e69de29bb..000000000 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 82876149f..000000000 --- a/test cases/unit/100 custom target name/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('custom target name', 'c') - -python = find_program('python3') - -# Name argument is optional and should default to 'file.txt' -custom_target( - input: 'file.txt.in', - output: '@BASENAME@', - command: [python, '--version'], - build_by_default: true, - capture: true, -) - -subdir('subdir') diff --git a/test cases/unit/100 custom target name/subdir/meson.build b/test cases/unit/100 custom target name/subdir/meson.build deleted file mode 100644 index 785a7b366..000000000 --- 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 000000000..21239b74b --- /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 000000000..5745d8acb --- /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 000000000..475f5f51c --- /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 21239b74b..000000000 --- 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 5745d8acb..000000000 --- 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 475f5f51c..000000000 --- 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 000000000..3487bc5a9 --- /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 000000000..d0f82e4e1 --- /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 000000000..2d15b2a14 --- /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 000000000..014a61751 --- /dev/null +++ b/test cases/unit/102 python without pkgconfig/meson.build @@ -0,0 +1,4 @@ +project('python without pkgconfig', 'c') + +# This unit test is ran with PKG_CONFIG=notfound +import('python').find_installation().dependency() diff --git a/test cases/unit/102 rlib linkage/lib2.rs b/test cases/unit/102 rlib linkage/lib2.rs deleted file mode 100644 index 3487bc5a9..000000000 --- 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 d0f82e4e1..000000000 --- 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 2d15b2a14..000000000 --- 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 014a61751..000000000 --- a/test cases/unit/103 python without pkgconfig/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('python without pkgconfig', 'c') - -# This unit test is ran with PKG_CONFIG=notfound -import('python').find_installation().dependency() diff --git a/test cases/unit/103 strip/lib.c b/test cases/unit/103 strip/lib.c new file mode 100644 index 000000000..7d8163c3b --- /dev/null +++ b/test cases/unit/103 strip/lib.c @@ -0,0 +1,3 @@ +#include + +void func(void){ fprintf(stderr, "Test 1 2 3\n"); } diff --git a/test cases/unit/103 strip/meson.build b/test cases/unit/103 strip/meson.build new file mode 100644 index 000000000..dff61ab43 --- /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 000000000..c3f4c769f --- /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 7d8163c3b..000000000 --- a/test cases/unit/104 strip/lib.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -void func(void){ fprintf(stderr, "Test 1 2 3\n"); } diff --git a/test cases/unit/104 strip/meson.build b/test cases/unit/104 strip/meson.build deleted file mode 100644 index dff61ab43..000000000 --- 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 c3f4c769f..000000000 --- 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 000000000..ff2128624 --- /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 ff2128624..000000000 --- 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/91 install skip subprojects/foo.c b/test cases/unit/91 install skip subprojects/foo.c new file mode 100644 index 000000000..25927f5a1 --- /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 000000000..421376db9 --- /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 000000000..a7e26ac6c --- /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 000000000..e69de29bb 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 000000000..cfbae9483 --- /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 000000000..25927f5a1 --- /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 000000000..421376db9 --- /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 000000000..a7e26ac6c --- /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 000000000..421376db9 --- /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 000000000..b5b073408 --- /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 25927f5a1..000000000 --- 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 421376db9..000000000 --- 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 a7e26ac6c..000000000 --- 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 e69de29bb..000000000 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 cfbae9483..000000000 --- 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 25927f5a1..000000000 --- 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 421376db9..000000000 --- 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 a7e26ac6c..000000000 --- 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 421376db9..000000000 --- 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 b5b073408..000000000 --- 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 000000000..b82aa4173 --- /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 000000000..12d8395d4 --- /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 000000000..9713d9f7f --- /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 000000000..a833b0c35 --- /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 000000000..689bc6047 --- /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 000000000..7fc4d5a95 --- /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 000000000..f057c0033 --- /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 000000000..8f4af981b --- /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 000000000..99a0ea60c --- /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 000000000..f1d18b7ed --- /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 000000000..99a0ea60c --- /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 b82aa4173..000000000 --- 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 12d8395d4..000000000 --- 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 9713d9f7f..000000000 --- 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 a833b0c35..000000000 --- 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 689bc6047..000000000 --- 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 7fc4d5a95..000000000 --- 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 f057c0033..000000000 --- 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 8f4af981b..000000000 --- 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 99a0ea60c..000000000 --- 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 f1d18b7ed..000000000 --- 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 99a0ea60c..000000000 --- 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 000000000..48e033a72 --- /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 000000000..e749753bc --- /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 000000000..3237441bc --- /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 000000000..bab113908 --- /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 000000000..db9df9d5e --- /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 000000000..e64b22919 --- /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 48e033a72..000000000 --- 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 e749753bc..000000000 --- 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 3237441bc..000000000 --- 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 bab113908..000000000 --- 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 db9df9d5e..000000000 --- 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 e64b22919..000000000 --- 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 000000000..623a338db --- /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 000000000..89a4727dc --- /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 000000000..c409dcbd1 --- /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 000000000..78f2de106 --- /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 623a338db..000000000 --- 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 89a4727dc..000000000 --- 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 c409dcbd1..000000000 --- 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 78f2de106..000000000 --- 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 000000000..812960172 --- /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 000000000..128c213ac --- /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 000000000..5e79966f7 --- /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 000000000..5be5bc998 --- /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 000000000..d661ae4ca --- /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_FAILURE (-1) + +int main(void) { + if (get_checked() == CHECK_VALUE) { + fprintf(stdout,"good\n"); + return TEST_SUCCESS; + } + fprintf(stdout,"bad\n"); + return TEST_FAILURE; +} diff --git a/test cases/unit/98 install all targets/bar-custom.txt b/test cases/unit/98 install all targets/bar-custom.txt new file mode 100644 index 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..557db03de --- /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/excludes/excluded.txt b/test cases/unit/98 install all targets/excludes/excluded.txt new file mode 100644 index 000000000..59b064403 --- /dev/null +++ b/test cases/unit/98 install all targets/excludes/excluded.txt @@ -0,0 +1 @@ +Excluded diff --git a/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt b/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt new file mode 100644 index 000000000..3b94f9157 --- /dev/null +++ b/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt @@ -0,0 +1 @@ +Placeholder diff --git a/test cases/unit/98 install all targets/excludes/installed.txt b/test cases/unit/98 install all targets/excludes/installed.txt new file mode 100644 index 000000000..84376928c --- /dev/null +++ b/test cases/unit/98 install all targets/excludes/installed.txt @@ -0,0 +1 @@ +Installed 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..2ea9c7dd1 --- /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 000000000..0fb4389f7 --- /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 000000000..c5f33a054 --- /dev/null +++ b/test cases/unit/98 install all targets/meson.build @@ -0,0 +1,116 @@ +project('install tag', 'c') + +subproject('subproject') + +subdir('subdir') + +# Those files should not be tagged +configure_file(input: 'foo.in', output: 'foo-notag.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +install_data('bar-notag.txt', + install_dir: get_option('datadir') +) +custom_target('ct1', + output: ['out1-notag.txt', 'out2-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) + +# Those files should be tagged as devel +install_headers('foo1-devel.h') +install_data('bar-devel.h', + install_dir: get_option('includedir'), +) +configure_file(input: 'foo.in', output: 'foo2-devel.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('includedir'), + install: true, +) +static_library('static', 'lib.c', + install: true, +) +custom_target('ct-header1', + output: ['ct-header1.h'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('includedir'), + install: true, +) +custom_target('ct-header2', + output: ['ct-header2.h', 'ct-header3.h'], + command: ['script.py', '@OUTPUT@'], + install_dir: [false, get_option('includedir')], + install: true, +) +install_emptydir(get_option('includedir') / 'subdir-devel') +install_subdir('custom_files', + install_dir: get_option('includedir'), +) + +# Those files should have 'runtime' tag +executable('app', 'main.c', + install: true, +) +executable('app-otherdir', 'main.c', + install: true, + install_dir: 'otherbin', +) +shared_library('shared', 'lib.c', + install: true, +) +both_libraries('both', 'lib.c', + install: true, +) + +# Unversioned .so file should have 'devel' tag, others should have 'runtime' tag +shared_library('versioned_shared', 'lib.c', + install: true, + version: '1.2.3', +) + +# Those files should have custom tag +install_data('bar-custom.txt', + install_dir: get_option('datadir'), + install_tag: 'custom') +configure_file(input: 'foo.in', output: 'foo-custom.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install_tag: 'custom', + install: true, +) +both_libraries('bothcustom', 'lib.c', + install_tag: 'custom', + install: true, +) +custom_target('ct2', + output: ['out1-custom.txt', 'out2-custom.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install_tag: 'custom', + install: true, +) +install_subdir('custom_files', + install_dir: get_option('datadir'), + install_tag: 'custom', +) +install_subdir('excludes', + install_dir: get_option('datadir'), + install_tag: 'custom', + exclude_directories: 'excluded', + exclude_files: 'excluded.txt', +) + +# First is custom, 2nd is devel, 3rd has no tag +custom_target('ct3', + output: ['out3-custom.txt', 'out-devel.h', 'out3-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: [get_option('datadir'), get_option('includedir'), get_option('datadir')], + install_tag: ['custom', 'devel', false], + install: true, +) + +meson.add_install_script('script.py', install_tag: 'custom') +meson.add_install_script('script.py') diff --git a/test cases/unit/98 install all targets/script.py b/test cases/unit/98 install all targets/script.py new file mode 100644 index 000000000..c5f3be9ed --- /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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..e69de29bb 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 000000000..2ea9c7dd1 --- /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 000000000..0fb4389f7 --- /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 000000000..53c796abe --- /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 000000000..c5f3be9ed --- /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 install all targets/subprojects/subproject/aaa.txt b/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt new file mode 100644 index 000000000..43d5a8ed6 --- /dev/null +++ b/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt @@ -0,0 +1 @@ +AAA diff --git a/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt b/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt new file mode 100644 index 000000000..ba629238c --- /dev/null +++ b/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt @@ -0,0 +1 @@ +BBB diff --git a/test cases/unit/98 install all targets/subprojects/subproject/meson.build b/test cases/unit/98 install all targets/subprojects/subproject/meson.build new file mode 100644 index 000000000..ff474ace1 --- /dev/null +++ b/test cases/unit/98 install all targets/subprojects/subproject/meson.build @@ -0,0 +1,5 @@ +project('subproject') + +install_data('aaa.txt') + +install_data('bbb.txt', install_tag: 'data') diff --git a/test cases/unit/98 link full name/.gitignore b/test cases/unit/98 link full name/.gitignore deleted file mode 100644 index 812960172..000000000 --- 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 128c213ac..000000000 --- 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 5e79966f7..000000000 --- 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 5be5bc998..000000000 --- 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 d661ae4ca..000000000 --- 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_FAILURE (-1) - -int main(void) { - if (get_checked() == CHECK_VALUE) { - fprintf(stdout,"good\n"); - return TEST_SUCCESS; - } - fprintf(stdout,"bad\n"); - return TEST_FAILURE; -} diff --git a/test cases/unit/99 custom target name/file.txt.in b/test cases/unit/99 custom target name/file.txt.in new file mode 100644 index 000000000..e69de29bb 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 000000000..82876149f --- /dev/null +++ b/test cases/unit/99 custom target name/meson.build @@ -0,0 +1,14 @@ +project('custom target name', 'c') + +python = find_program('python3') + +# Name argument is optional and should default to 'file.txt' +custom_target( + input: 'file.txt.in', + output: '@BASENAME@', + command: [python, '--version'], + build_by_default: true, + capture: true, +) + +subdir('subdir') diff --git a/test cases/unit/99 custom target name/subdir/meson.build b/test cases/unit/99 custom target name/subdir/meson.build new file mode 100644 index 000000000..785a7b366 --- /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 e69de29bb..000000000 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 e69de29bb..000000000 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 e69de29bb..000000000 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 557db03de..000000000 --- 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/excludes/excluded.txt b/test cases/unit/99 install all targets/excludes/excluded.txt deleted file mode 100644 index 59b064403..000000000 --- a/test cases/unit/99 install all targets/excludes/excluded.txt +++ /dev/null @@ -1 +0,0 @@ -Excluded diff --git a/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt b/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt deleted file mode 100644 index 3b94f9157..000000000 --- a/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -Placeholder diff --git a/test cases/unit/99 install all targets/excludes/installed.txt b/test cases/unit/99 install all targets/excludes/installed.txt deleted file mode 100644 index 84376928c..000000000 --- a/test cases/unit/99 install all targets/excludes/installed.txt +++ /dev/null @@ -1 +0,0 @@ -Installed 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 e69de29bb..000000000 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 e69de29bb..000000000 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 2ea9c7dd1..000000000 --- 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 0fb4389f7..000000000 --- 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 c5f33a054..000000000 --- a/test cases/unit/99 install all targets/meson.build +++ /dev/null @@ -1,116 +0,0 @@ -project('install tag', 'c') - -subproject('subproject') - -subdir('subdir') - -# Those files should not be tagged -configure_file(input: 'foo.in', output: 'foo-notag.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -install_data('bar-notag.txt', - install_dir: get_option('datadir') -) -custom_target('ct1', - output: ['out1-notag.txt', 'out2-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) - -# Those files should be tagged as devel -install_headers('foo1-devel.h') -install_data('bar-devel.h', - install_dir: get_option('includedir'), -) -configure_file(input: 'foo.in', output: 'foo2-devel.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('includedir'), - install: true, -) -static_library('static', 'lib.c', - install: true, -) -custom_target('ct-header1', - output: ['ct-header1.h'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('includedir'), - install: true, -) -custom_target('ct-header2', - output: ['ct-header2.h', 'ct-header3.h'], - command: ['script.py', '@OUTPUT@'], - install_dir: [false, get_option('includedir')], - install: true, -) -install_emptydir(get_option('includedir') / 'subdir-devel') -install_subdir('custom_files', - install_dir: get_option('includedir'), -) - -# Those files should have 'runtime' tag -executable('app', 'main.c', - install: true, -) -executable('app-otherdir', 'main.c', - install: true, - install_dir: 'otherbin', -) -shared_library('shared', 'lib.c', - install: true, -) -both_libraries('both', 'lib.c', - install: true, -) - -# Unversioned .so file should have 'devel' tag, others should have 'runtime' tag -shared_library('versioned_shared', 'lib.c', - install: true, - version: '1.2.3', -) - -# Those files should have custom tag -install_data('bar-custom.txt', - install_dir: get_option('datadir'), - install_tag: 'custom') -configure_file(input: 'foo.in', output: 'foo-custom.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install_tag: 'custom', - install: true, -) -both_libraries('bothcustom', 'lib.c', - install_tag: 'custom', - install: true, -) -custom_target('ct2', - output: ['out1-custom.txt', 'out2-custom.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install_tag: 'custom', - install: true, -) -install_subdir('custom_files', - install_dir: get_option('datadir'), - install_tag: 'custom', -) -install_subdir('excludes', - install_dir: get_option('datadir'), - install_tag: 'custom', - exclude_directories: 'excluded', - exclude_files: 'excluded.txt', -) - -# First is custom, 2nd is devel, 3rd has no tag -custom_target('ct3', - output: ['out3-custom.txt', 'out-devel.h', 'out3-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: [get_option('datadir'), get_option('includedir'), get_option('datadir')], - install_tag: ['custom', 'devel', false], - install: true, -) - -meson.add_install_script('script.py', install_tag: 'custom') -meson.add_install_script('script.py') diff --git a/test cases/unit/99 install all targets/script.py b/test cases/unit/99 install all targets/script.py deleted file mode 100644 index c5f3be9ed..000000000 --- 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 e69de29bb..000000000 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 e69de29bb..000000000 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 e69de29bb..000000000 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 2ea9c7dd1..000000000 --- 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 0fb4389f7..000000000 --- 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 53c796abe..000000000 --- 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 c5f3be9ed..000000000 --- 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/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt b/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt deleted file mode 100644 index 43d5a8ed6..000000000 --- a/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt +++ /dev/null @@ -1 +0,0 @@ -AAA diff --git a/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt b/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt deleted file mode 100644 index ba629238c..000000000 --- a/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt +++ /dev/null @@ -1 +0,0 @@ -BBB diff --git a/test cases/unit/99 install all targets/subprojects/subproject/meson.build b/test cases/unit/99 install all targets/subprojects/subproject/meson.build deleted file mode 100644 index ff474ace1..000000000 --- a/test cases/unit/99 install all targets/subprojects/subproject/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('subproject') - -install_data('aaa.txt') - -install_data('bbb.txt', install_tag: 'data') -- cgit v1.2.3