From 6256b277687cba68e527712c3a7d327f480ab005 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 28 Mar 2022 19:33:52 +0300 Subject: Condense test directory names. --- .../100 no glib-compile-resources/meson.build | 8 ++ .../100 no glib-compile-resources/test.json | 7 ++ .../trivial.gresource.xml | 3 + test cases/failing/100 no lang/main.c | 3 - test cases/failing/100 no lang/meson.build | 2 - test cases/failing/100 no lang/test.json | 7 -- .../101 no glib-compile-resources/meson.build | 8 -- .../101 no glib-compile-resources/test.json | 7 -- .../trivial.gresource.xml | 3 - test cases/failing/101 number in combo/meson.build | 1 + .../failing/101 number in combo/nativefile.ini | 2 + test cases/failing/101 number in combo/test.json | 5 ++ test cases/failing/102 bool in combo/meson.build | 1 + .../failing/102 bool in combo/meson_options.txt | 5 ++ .../failing/102 bool in combo/nativefile.ini | 2 + test cases/failing/102 bool in combo/test.json | 5 ++ test cases/failing/102 number in combo/meson.build | 1 - .../failing/102 number in combo/nativefile.ini | 2 - test cases/failing/102 number in combo/test.json | 5 -- test cases/failing/103 bool in combo/meson.build | 1 - .../failing/103 bool in combo/meson_options.txt | 5 -- .../failing/103 bool in combo/nativefile.ini | 2 - test cases/failing/103 bool in combo/test.json | 5 -- .../failing/103 compiler no lang/meson.build | 2 + test cases/failing/103 compiler no lang/test.json | 7 ++ .../failing/104 compiler no lang/meson.build | 2 - test cases/failing/104 compiler no lang/test.json | 7 -- test cases/failing/104 no fallback/meson.build | 2 + .../104 no fallback/subprojects/foob/meson.build | 2 + test cases/failing/104 no fallback/test.json | 8 ++ test cases/failing/105 feature require/meson.build | 2 + .../failing/105 feature require/meson_options.txt | 1 + test cases/failing/105 feature require/test.json | 8 ++ test cases/failing/105 no fallback/meson.build | 2 - .../105 no fallback/subprojects/foob/meson.build | 2 - test cases/failing/105 no fallback/test.json | 8 -- .../failing/106 feature require.bis/meson.build | 2 + .../106 feature require.bis/meson_options.txt | 1 + .../failing/106 feature require.bis/test.json | 8 ++ test cases/failing/106 feature require/meson.build | 2 - .../failing/106 feature require/meson_options.txt | 1 - test cases/failing/106 feature require/test.json | 8 -- .../failing/107 feature require.bis/meson.build | 2 - .../107 feature require.bis/meson_options.txt | 1 - .../failing/107 feature require.bis/test.json | 8 -- .../107 no build get_external_property/meson.build | 3 + .../107 no build get_external_property/test.json | 7 ++ .../failing/108 enter subdir twice/meson.build | 3 + .../failing/108 enter subdir twice/sub/meson.build | 1 + .../failing/108 enter subdir twice/test.json | 7 ++ .../108 no build get_external_property/meson.build | 3 - .../108 no build get_external_property/test.json | 7 -- .../failing/109 enter subdir twice/meson.build | 3 - .../failing/109 enter subdir twice/sub/meson.build | 1 - .../failing/109 enter subdir twice/test.json | 7 -- .../109 invalid fstring/meson.build | 4 + .../109 invalid fstring/test.json | 7 ++ test cases/failing/109 invalid fstring/meson.build | 3 + test cases/failing/109 invalid fstring/test.json | 7 ++ .../110 compiler argument checking/meson.build | 4 + .../110 compiler argument checking/test.json | 7 ++ test cases/failing/111 empty fallback/meson.build | 6 ++ .../111 empty fallback/subprojects/foo/meson.build | 3 + test cases/failing/111 empty fallback/test.json | 7 ++ .../109 invalid fstring/meson.build | 4 - .../109 invalid fstring/test.json | 7 -- test cases/failing/111 invalid fstring/meson.build | 3 - test cases/failing/111 invalid fstring/test.json | 7 -- .../112 cmake executable dependency/meson.build | 9 +++ .../subprojects/cmlib/CMakeLists.txt | 5 ++ .../subprojects/cmlib/main.c | 3 + .../112 cmake executable dependency/test.json | 10 +++ .../112 compiler argument checking/meson.build | 4 - .../112 compiler argument checking/test.json | 7 -- .../113 allow_fallback with fallback/meson.build | 3 + .../113 allow_fallback with fallback/test.json | 8 ++ test cases/failing/113 empty fallback/meson.build | 6 -- .../113 empty fallback/subprojects/foo/meson.build | 3 - test cases/failing/113 empty fallback/test.json | 7 -- .../114 cmake executable dependency/meson.build | 9 --- .../subprojects/cmlib/CMakeLists.txt | 5 -- .../subprojects/cmlib/main.c | 3 - .../114 cmake executable dependency/test.json | 10 --- .../failing/114 nonsensical bindgen/meson.build | 20 +++++ .../failing/114 nonsensical bindgen/src/header.h | 8 ++ .../failing/114 nonsensical bindgen/src/source.c | 8 ++ .../failing/114 nonsensical bindgen/test.json | 8 ++ .../115 allow_fallback with fallback/meson.build | 3 - .../115 allow_fallback with fallback/test.json | 8 -- .../failing/115 run_target in test/meson.build | 4 + .../failing/115 run_target in test/test.json | 8 ++ .../failing/115 run_target in test/trivial.c | 6 ++ .../failing/116 nonsensical bindgen/meson.build | 20 ----- .../failing/116 nonsensical bindgen/src/header.h | 8 -- .../failing/116 nonsensical bindgen/src/source.c | 8 -- .../failing/116 nonsensical bindgen/test.json | 8 -- .../meson.build | 4 + .../116 run_target in add_install_script/test.json | 8 ++ .../116 run_target in add_install_script/trivial.c | 11 +++ .../117 pathsep in install_symlink/meson.build | 3 + .../117 pathsep in install_symlink/test.json | 7 ++ .../failing/117 run_target in test/meson.build | 4 - .../failing/117 run_target in test/test.json | 8 -- .../failing/117 run_target in test/trivial.c | 6 -- .../meson.build | 4 - .../118 run_target in add_install_script/test.json | 8 -- .../118 run_target in add_install_script/trivial.c | 11 --- .../118 subproject version conflict/meson.build | 4 + .../subprojects/A/meson.build | 4 + .../subprojects/B/meson.build | 3 + .../118 subproject version conflict/test.json | 7 ++ .../119 pathsep in install_symlink/meson.build | 3 - .../119 pathsep in install_symlink/test.json | 7 -- .../119 structured source empty string/main.rs | 0 .../119 structured source empty string/meson.build | 13 +++ .../119 structured source empty string/test.json | 7 ++ .../120 structured_sources conflicts/main.rs | 0 .../120 structured_sources conflicts/meson.build | 17 ++++ .../120 structured_sources conflicts/test.json | 7 ++ .../120 subproject version conflict/meson.build | 4 - .../subprojects/A/meson.build | 4 - .../subprojects/B/meson.build | 3 - .../120 subproject version conflict/test.json | 7 -- .../failing/121 missing compiler/meson.build | 3 + .../121 missing compiler/subprojects/sub/main.c | 1 + .../subprojects/sub/meson.build | 4 + test cases/failing/121 missing compiler/test.json | 7 ++ .../121 structured source empty string/main.rs | 0 .../121 structured source empty string/meson.build | 13 --- .../121 structured source empty string/test.json | 7 -- .../122 structured_sources conflicts/main.rs | 0 .../122 structured_sources conflicts/meson.build | 17 ---- .../122 structured_sources conflicts/test.json | 7 -- .../failing/123 missing compiler/meson.build | 3 - .../123 missing compiler/subprojects/sub/main.c | 1 - .../subprojects/sub/meson.build | 4 - test cases/failing/123 missing compiler/test.json | 7 -- test cases/failing/38 prefix absolute/meson.build | 2 + test cases/failing/38 prefix absolute/test.json | 11 +++ test cases/failing/39 kwarg assign/dummy.c | 3 + test cases/failing/39 kwarg assign/meson.build | 3 + test cases/failing/39 kwarg assign/prog.c | 3 + test cases/failing/39 kwarg assign/test.json | 7 ++ test cases/failing/39 prefix absolute/meson.build | 2 - test cases/failing/39 prefix absolute/test.json | 11 --- .../40 custom target plainname many inputs/1.txt | 1 + .../40 custom target plainname many inputs/2.txt | 1 + .../catfiles.py | 9 +++ .../meson.build | 8 ++ .../test.json | 7 ++ test cases/failing/40 kwarg assign/dummy.c | 3 - test cases/failing/40 kwarg assign/meson.build | 3 - test cases/failing/40 kwarg assign/prog.c | 3 - test cases/failing/40 kwarg assign/test.json | 7 -- .../generator.py | 16 ++++ .../meson.build | 13 +++ .../test.json | 33 ++++++++ .../41 custom target plainname many inputs/1.txt | 1 - .../41 custom target plainname many inputs/2.txt | 1 - .../catfiles.py | 9 --- .../meson.build | 8 -- .../test.json | 7 -- .../generator.py | 16 ---- .../meson.build | 13 --- .../test.json | 33 -------- .../failing/42 project name colon/meson.build | 1 + test cases/failing/42 project name colon/test.json | 7 ++ test cases/failing/43 abs subdir/bob/meson.build | 2 + test cases/failing/43 abs subdir/meson.build | 5 ++ test cases/failing/43 abs subdir/test.json | 7 ++ .../failing/43 project name colon/meson.build | 1 - test cases/failing/43 project name colon/test.json | 7 -- test cases/failing/44 abs subdir/bob/meson.build | 2 - test cases/failing/44 abs subdir/meson.build | 5 -- test cases/failing/44 abs subdir/test.json | 7 -- .../failing/44 abspath to srcdir/meson.build | 3 + test cases/failing/44 abspath to srcdir/test.json | 7 ++ .../failing/45 abspath to srcdir/meson.build | 3 - test cases/failing/45 abspath to srcdir/test.json | 7 -- .../45 pkgconfig variables reserved/meson.build | 16 ++++ .../45 pkgconfig variables reserved/simple.c | 5 ++ .../45 pkgconfig variables reserved/simple.h | 6 ++ .../45 pkgconfig variables reserved/test.json | 7 ++ .../46 pkgconfig variables reserved/meson.build | 16 ---- .../46 pkgconfig variables reserved/simple.c | 5 -- .../46 pkgconfig variables reserved/simple.h | 6 -- .../46 pkgconfig variables reserved/test.json | 7 -- .../46 pkgconfig variables zero length/meson.build | 16 ++++ .../46 pkgconfig variables zero length/simple.c | 5 ++ .../46 pkgconfig variables zero length/simple.h | 6 ++ .../46 pkgconfig variables zero length/test.json | 7 ++ .../meson.build | 16 ++++ .../simple.c | 5 ++ .../simple.h | 6 ++ .../test.json | 7 ++ .../47 pkgconfig variables zero length/meson.build | 16 ---- .../47 pkgconfig variables zero length/simple.c | 5 -- .../47 pkgconfig variables zero length/simple.h | 6 -- .../47 pkgconfig variables zero length/test.json | 7 -- .../meson.build | 16 ++++ .../48 pkgconfig variables not key value/simple.c | 5 ++ .../48 pkgconfig variables not key value/simple.h | 6 ++ .../48 pkgconfig variables not key value/test.json | 7 ++ .../meson.build | 16 ---- .../simple.c | 5 -- .../simple.h | 6 -- .../test.json | 7 -- .../failing/49 executable comparison/meson.build | 6 ++ test cases/failing/49 executable comparison/prog.c | 1 + .../failing/49 executable comparison/test.json | 8 ++ .../meson.build | 16 ---- .../49 pkgconfig variables not key value/simple.c | 5 -- .../49 pkgconfig variables not key value/simple.h | 6 -- .../49 pkgconfig variables not key value/test.json | 7 -- .../failing/50 executable comparison/meson.build | 6 -- test cases/failing/50 executable comparison/prog.c | 1 - .../failing/50 executable comparison/test.json | 8 -- .../failing/50 inconsistent comparison/meson.build | 7 ++ .../failing/50 inconsistent comparison/test.json | 7 ++ .../failing/51 inconsistent comparison/meson.build | 7 -- .../failing/51 inconsistent comparison/test.json | 7 -- test cases/failing/51 slashname/meson.build | 11 +++ test cases/failing/51 slashname/sub/meson.build | 1 + test cases/failing/51 slashname/sub/prog.c | 6 ++ test cases/failing/51 slashname/test.json | 7 ++ .../52 reserved meson prefix/meson-foo/meson.build | 0 .../failing/52 reserved meson prefix/meson.build | 3 + .../failing/52 reserved meson prefix/test.json | 7 ++ test cases/failing/52 slashname/meson.build | 11 --- test cases/failing/52 slashname/sub/meson.build | 1 - test cases/failing/52 slashname/sub/prog.c | 6 -- test cases/failing/52 slashname/test.json | 7 -- .../53 reserved meson prefix/meson-foo/meson.build | 0 .../failing/53 reserved meson prefix/meson.build | 3 - .../failing/53 reserved meson prefix/test.json | 7 -- .../failing/53 wrong shared crate type/foo.rs | 0 .../failing/53 wrong shared crate type/meson.build | 7 ++ .../failing/53 wrong shared crate type/test.json | 7 ++ .../failing/54 wrong shared crate type/foo.rs | 0 .../failing/54 wrong shared crate type/meson.build | 7 -- .../failing/54 wrong shared crate type/test.json | 7 -- .../failing/54 wrong static crate type/foo.rs | 0 .../failing/54 wrong static crate type/meson.build | 7 ++ .../failing/54 wrong static crate type/test.json | 7 ++ test cases/failing/55 or on new line/meson.build | 7 ++ .../failing/55 or on new line/meson_options.txt | 1 + test cases/failing/55 or on new line/test.json | 7 ++ .../failing/55 wrong static crate type/foo.rs | 0 .../failing/55 wrong static crate type/meson.build | 7 -- .../failing/55 wrong static crate type/test.json | 7 -- .../failing/56 link with executable/meson.build | 4 + .../failing/56 link with executable/module.c | 4 + test cases/failing/56 link with executable/prog.c | 5 ++ .../failing/56 link with executable/test.json | 7 ++ test cases/failing/56 or on new line/meson.build | 7 -- .../failing/56 or on new line/meson_options.txt | 1 - test cases/failing/56 or on new line/test.json | 7 -- .../57 assign custom target index/meson.build | 24 ++++++ .../57 assign custom target index/test.json | 7 ++ .../failing/57 link with executable/meson.build | 4 - .../failing/57 link with executable/module.c | 4 - test cases/failing/57 link with executable/prog.c | 5 -- .../failing/57 link with executable/test.json | 7 -- .../58 assign custom target index/meson.build | 24 ------ .../58 assign custom target index/test.json | 7 -- test cases/failing/58 getoption prefix/meson.build | 5 ++ .../subprojects/abc/meson.build | 1 + .../subprojects/abc/meson_options.txt | 1 + test cases/failing/58 getoption prefix/test.json | 7 ++ .../failing/59 bad option argument/meson.build | 3 + .../59 bad option argument/meson_options.txt | 1 + .../failing/59 bad option argument/test.json | 7 ++ test cases/failing/59 getoption prefix/meson.build | 5 -- .../subprojects/abc/meson.build | 1 - .../subprojects/abc/meson_options.txt | 1 - test cases/failing/59 getoption prefix/test.json | 7 -- .../failing/60 bad option argument/meson.build | 3 - .../60 bad option argument/meson_options.txt | 1 - .../failing/60 bad option argument/test.json | 7 -- test cases/failing/60 subproj filegrab/meson.build | 5 ++ test cases/failing/60 subproj filegrab/prog.c | 1 + .../60 subproj filegrab/subprojects/a/meson.build | 3 + test cases/failing/60 subproj filegrab/test.json | 7 ++ test cases/failing/61 grab subproj/meson.build | 7 ++ .../61 grab subproj/subprojects/foo/meson.build | 3 + .../failing/61 grab subproj/subprojects/foo/sub.c | 6 ++ test cases/failing/61 grab subproj/test.json | 7 ++ test cases/failing/61 subproj filegrab/meson.build | 5 -- test cases/failing/61 subproj filegrab/prog.c | 1 - .../61 subproj filegrab/subprojects/a/meson.build | 3 - test cases/failing/61 subproj filegrab/test.json | 7 -- test cases/failing/62 grab sibling/meson.build | 3 + .../62 grab sibling/subprojects/a/meson.build | 3 + .../62 grab sibling/subprojects/b/meson.build | 3 + .../failing/62 grab sibling/subprojects/b/sneaky.c | 6 ++ test cases/failing/62 grab sibling/test.json | 7 ++ test cases/failing/62 grab subproj/meson.build | 7 -- .../62 grab subproj/subprojects/foo/meson.build | 3 - .../failing/62 grab subproj/subprojects/foo/sub.c | 6 -- test cases/failing/62 grab subproj/test.json | 7 -- test cases/failing/63 grab sibling/meson.build | 3 - .../63 grab sibling/subprojects/a/meson.build | 3 - .../63 grab sibling/subprojects/b/meson.build | 3 - .../failing/63 grab sibling/subprojects/b/sneaky.c | 6 -- test cases/failing/63 grab sibling/test.json | 7 -- .../failing/63 string as link target/meson.build | 2 + test cases/failing/63 string as link target/prog.c | 1 + .../failing/63 string as link target/test.json | 7 ++ .../meson.build | 2 + .../64 dependency not-found and required/test.json | 7 ++ .../failing/64 string as link target/meson.build | 2 - test cases/failing/64 string as link target/prog.c | 1 - .../failing/64 string as link target/test.json | 7 -- .../meson.build | 2 - .../65 dependency not-found and required/test.json | 7 -- .../failing/65 subproj different versions/main.c | 9 +++ .../65 subproj different versions/meson.build | 9 +++ .../subprojects/a/a.c | 5 ++ .../subprojects/a/a.h | 1 + .../subprojects/a/meson.build | 11 +++ .../subprojects/b/b.c | 5 ++ .../subprojects/b/b.h | 1 + .../subprojects/b/meson.build | 11 +++ .../subprojects/c/c.h | 3 + .../subprojects/c/meson.build | 5 ++ .../65 subproj different versions/test.json | 7 ++ .../failing/66 subproj different versions/main.c | 9 --- .../66 subproj different versions/meson.build | 9 --- .../subprojects/a/a.c | 5 -- .../subprojects/a/a.h | 1 - .../subprojects/a/meson.build | 11 --- .../subprojects/b/b.c | 5 -- .../subprojects/b/b.h | 1 - .../subprojects/b/meson.build | 11 --- .../subprojects/c/c.h | 3 - .../subprojects/c/meson.build | 5 -- .../66 subproj different versions/test.json | 7 -- .../failing/66 wrong boost module/meson.build | 9 +++ test cases/failing/66 wrong boost module/test.json | 7 ++ .../67 install_data rename bad size/file1.txt | 0 .../67 install_data rename bad size/file2.txt | 0 .../67 install_data rename bad size/meson.build | 3 + .../67 install_data rename bad size/test.json | 7 ++ .../failing/67 wrong boost module/meson.build | 9 --- test cases/failing/67 wrong boost module/test.json | 7 -- .../68 install_data rename bad size/file1.txt | 0 .../68 install_data rename bad size/file2.txt | 0 .../68 install_data rename bad size/meson.build | 3 - .../68 install_data rename bad size/test.json | 7 -- test cases/failing/68 skip only subdir/meson.build | 8 ++ .../failing/68 skip only subdir/subdir/meson.build | 3 + test cases/failing/68 skip only subdir/test.json | 7 ++ test cases/failing/69 dual override/meson.build | 5 ++ test cases/failing/69 dual override/overrides.py | 4 + test cases/failing/69 dual override/test.json | 7 ++ test cases/failing/69 skip only subdir/meson.build | 8 -- .../failing/69 skip only subdir/subdir/meson.build | 3 - test cases/failing/69 skip only subdir/test.json | 7 -- test cases/failing/70 dual override/meson.build | 5 -- test cases/failing/70 dual override/overrides.py | 4 - test cases/failing/70 dual override/test.json | 7 -- test cases/failing/70 override used/meson.build | 5 ++ test cases/failing/70 override used/other.py | 3 + test cases/failing/70 override used/something.py | 3 + test cases/failing/70 override used/test.json | 7 ++ test cases/failing/71 override used/meson.build | 5 -- test cases/failing/71 override used/other.py | 3 - test cases/failing/71 override used/something.py | 3 - test cases/failing/71 override used/test.json | 7 -- .../71 run_command unclean exit/meson.build | 4 + .../71 run_command unclean exit/returncode.py | 4 + .../failing/71 run_command unclean exit/test.json | 8 ++ .../72 int literal leading zero/meson.build | 5 ++ .../failing/72 int literal leading zero/test.json | 8 ++ .../72 run_command unclean exit/meson.build | 4 - .../72 run_command unclean exit/returncode.py | 4 - .../failing/72 run_command unclean exit/test.json | 8 -- .../failing/73 configuration immutable/input | 0 .../failing/73 configuration immutable/meson.build | 12 +++ .../failing/73 configuration immutable/test.json | 7 ++ .../73 int literal leading zero/meson.build | 5 -- .../failing/73 int literal leading zero/test.json | 8 -- .../failing/74 configuration immutable/input | 0 .../failing/74 configuration immutable/meson.build | 12 --- .../failing/74 configuration immutable/test.json | 7 -- .../74 link with shared module on osx/meson.build | 8 ++ .../74 link with shared module on osx/module.c | 3 + .../74 link with shared module on osx/prog.c | 4 + .../74 link with shared module on osx/test.json | 7 ++ .../75 link with shared module on osx/meson.build | 8 -- .../75 link with shared module on osx/module.c | 3 - .../75 link with shared module on osx/prog.c | 4 - .../75 link with shared module on osx/test.json | 7 -- .../config9.h.in | 1 + .../meson.build | 10 +++ .../test.json | 8 ++ .../config9.h.in | 1 - .../meson.build | 10 --- .../test.json | 8 -- .../meson.build | 2 + .../test.json | 7 ++ .../meson.build | 2 - .../test.json | 7 -- test cases/failing/77 unfound run/meson.build | 4 + test cases/failing/77 unfound run/test.json | 7 ++ .../meson.build | 8 ++ .../78 framework dependency with version/test.json | 7 ++ test cases/failing/78 unfound run/meson.build | 4 - test cases/failing/78 unfound run/test.json | 7 -- .../meson.build | 8 -- .../79 framework dependency with version/test.json | 7 -- test cases/failing/79 override exe config/foo.c | 3 + .../failing/79 override exe config/meson.build | 6 ++ .../failing/79 override exe config/test.json | 7 ++ .../80 gl dependency with version/meson.build | 9 +++ .../80 gl dependency with version/test.json | 7 ++ test cases/failing/80 override exe config/foo.c | 3 - .../failing/80 override exe config/meson.build | 6 -- .../failing/80 override exe config/test.json | 7 -- .../81 gl dependency with version/meson.build | 9 --- .../81 gl dependency with version/test.json | 7 -- .../81 threads dependency with version/meson.build | 3 + .../81 threads dependency with version/test.json | 7 ++ .../82 gtest dependency with version/meson.build | 8 ++ .../82 gtest dependency with version/test.json | 7 ++ .../82 threads dependency with version/meson.build | 3 - .../82 threads dependency with version/test.json | 7 -- test cases/failing/83 dub libray/meson.build | 11 +++ test cases/failing/83 dub libray/test.json | 7 ++ .../83 gtest dependency with version/meson.build | 8 -- .../83 gtest dependency with version/test.json | 7 -- test cases/failing/84 dub executable/meson.build | 11 +++ test cases/failing/84 dub executable/test.json | 7 ++ test cases/failing/84 dub libray/meson.build | 11 --- test cases/failing/84 dub libray/test.json | 7 -- test cases/failing/85 dub compiler/meson.build | 17 ++++ test cases/failing/85 dub compiler/test.json | 19 +++++ test cases/failing/85 dub executable/meson.build | 11 --- test cases/failing/85 dub executable/test.json | 7 -- test cases/failing/86 dub compiler/meson.build | 17 ---- test cases/failing/86 dub compiler/test.json | 19 ----- .../failing/86 subproj not-found dep/meson.build | 2 + .../subprojects/somesubproj/meson.build | 3 + .../failing/86 subproj not-found dep/test.json | 7 ++ test cases/failing/87 invalid configure file/input | 0 .../failing/87 invalid configure file/meson.build | 9 +++ .../failing/87 invalid configure file/test.json | 7 ++ .../failing/87 subproj not-found dep/meson.build | 2 - .../subprojects/somesubproj/meson.build | 3 - .../failing/87 subproj not-found dep/test.json | 7 -- test cases/failing/88 invalid configure file/input | 0 .../failing/88 invalid configure file/meson.build | 9 --- .../failing/88 invalid configure file/test.json | 7 -- test cases/failing/88 kwarg dupe/meson.build | 6 ++ test cases/failing/88 kwarg dupe/prog.c | 6 ++ test cases/failing/88 kwarg dupe/test.json | 7 ++ test cases/failing/89 kwarg dupe/meson.build | 6 -- test cases/failing/89 kwarg dupe/prog.c | 6 -- test cases/failing/89 kwarg dupe/test.json | 7 -- test cases/failing/89 missing pch file/meson.build | 3 + test cases/failing/89 missing pch file/prog.c | 3 + test cases/failing/89 missing pch file/test.json | 8 ++ test cases/failing/90 missing pch file/meson.build | 3 - test cases/failing/90 missing pch file/prog.c | 3 - test cases/failing/90 missing pch file/test.json | 8 -- .../90 pch source different folder/include/pch.h | 0 .../90 pch source different folder/meson.build | 5 ++ .../failing/90 pch source different folder/prog.c | 1 + .../90 pch source different folder/src/pch.c | 0 .../90 pch source different folder/test.json | 7 ++ .../91 pch source different folder/include/pch.h | 0 .../91 pch source different folder/meson.build | 5 -- .../failing/91 pch source different folder/prog.c | 1 - .../91 pch source different folder/src/pch.c | 0 .../91 pch source different folder/test.json | 7 -- .../failing/91 unknown config tool/meson.build | 2 + .../failing/91 unknown config tool/test.json | 7 ++ .../92 custom target install data/Info.plist.cpp | 1 + .../92 custom target install data/meson.build | 11 +++ .../92 custom target install data/preproc.py | 13 +++ .../92 custom target install data/test.json | 7 ++ .../failing/92 unknown config tool/meson.build | 2 - .../failing/92 unknown config tool/test.json | 7 -- .../failing/93 add dict non string key/meson.build | 9 +++ .../failing/93 add dict non string key/test.json | 7 ++ .../93 custom target install data/Info.plist.cpp | 1 - .../93 custom target install data/meson.build | 11 --- .../93 custom target install data/preproc.py | 13 --- .../93 custom target install data/test.json | 7 -- .../failing/94 add dict duplicate keys/meson.build | 9 +++ .../failing/94 add dict duplicate keys/test.json | 7 ++ .../failing/94 add dict non string key/meson.build | 9 --- .../failing/94 add dict non string key/test.json | 7 -- .../failing/95 add dict duplicate keys/meson.build | 9 --- .../failing/95 add dict duplicate keys/test.json | 7 -- .../95 no host get_external_property/meson.build | 3 + .../95 no host get_external_property/test.json | 7 ++ .../96 no host get_external_property/meson.build | 3 - .../96 no host get_external_property/test.json | 7 -- test cases/failing/96 no native compiler/main.c | 3 + .../failing/96 no native compiler/meson.build | 12 +++ test cases/failing/96 no native compiler/test.json | 7 ++ test cases/failing/97 no native compiler/main.c | 3 - .../failing/97 no native compiler/meson.build | 12 --- test cases/failing/97 no native compiler/test.json | 7 -- .../failing/97 subdir parse error/meson.build | 2 + .../97 subdir parse error/subdir/meson.build | 1 + test cases/failing/97 subdir parse error/test.json | 7 ++ .../failing/98 invalid option file/meson.build | 1 + .../98 invalid option file/meson_options.txt | 1 + .../failing/98 invalid option file/test.json | 7 ++ .../failing/98 subdir parse error/meson.build | 2 - .../98 subdir parse error/subdir/meson.build | 1 - test cases/failing/98 subdir parse error/test.json | 7 -- .../failing/99 invalid option file/meson.build | 1 - .../99 invalid option file/meson_options.txt | 1 - .../failing/99 invalid option file/test.json | 7 -- test cases/failing/99 no lang/main.c | 3 + test cases/failing/99 no lang/meson.build | 2 + test cases/failing/99 no lang/test.json | 7 ++ test cases/unit/100 custom target name/file.txt.in | 0 test cases/unit/100 custom target name/meson.build | 14 ---- .../unit/100 custom target name/subdir/meson.build | 9 --- test cases/unit/100 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 strip/lib.c | 1 - test cases/unit/104 strip/meson.build | 3 - .../built library/bar.c | 7 ++ .../built library/meson.build | 26 ++++++ .../built library/meson_options.txt | 1 + .../built library/prog.c | 7 ++ .../external library/bar.c | 6 ++ .../external library/faa.c | 4 + .../external library/foo.c | 4 + .../external library/meson.build | 22 +++++ .../built library/bar.c | 7 -- .../built library/meson.build | 26 ------ .../built library/meson_options.txt | 1 - .../built library/prog.c | 7 -- .../external library/bar.c | 6 -- .../external library/faa.c | 4 - .../external library/foo.c | 4 - .../external library/meson.build | 22 ----- .../unit/40 featurenew subprojects/meson.build | 7 ++ .../subprojects/bar/meson.build | 3 + .../subprojects/baz/meson.build | 3 + .../subprojects/foo/meson.build | 3 + .../unit/41 featurenew subprojects/meson.build | 7 -- .../subprojects/bar/meson.build | 3 - .../subprojects/baz/meson.build | 3 - .../subprojects/foo/meson.build | 3 - test cases/unit/41 rpath order/meson.build | 11 +++ test cases/unit/41 rpath order/myexe.c | 3 + .../unit/41 rpath order/subprojects/sub1/lib.c | 0 .../41 rpath order/subprojects/sub1/meson.build | 5 ++ .../unit/41 rpath order/subprojects/sub2/lib.c | 0 .../41 rpath order/subprojects/sub2/meson.build | 5 ++ test cases/unit/42 dep order/lib1.c | 0 test cases/unit/42 dep order/lib2.c | 0 test cases/unit/42 dep order/meson.build | 8 ++ test cases/unit/42 dep order/myexe.c | 3 + test cases/unit/42 rpath order/meson.build | 11 --- test cases/unit/42 rpath order/myexe.c | 3 - .../unit/42 rpath order/subprojects/sub1/lib.c | 0 .../42 rpath order/subprojects/sub1/meson.build | 5 -- .../unit/42 rpath order/subprojects/sub2/lib.c | 0 .../42 rpath order/subprojects/sub2/meson.build | 5 -- test cases/unit/43 dep order/lib1.c | 0 test cases/unit/43 dep order/lib2.c | 0 test cases/unit/43 dep order/meson.build | 8 -- test cases/unit/43 dep order/myexe.c | 3 - test cases/unit/43 promote wrap/meson.build | 4 + .../43 promote wrap/subprojects/s1/meson.build | 1 + .../s1/subprojects/ambiguous/meson.build | 1 + .../43 promote wrap/subprojects/s2/meson.build | 1 + .../subprojects/s2/subprojects/ambiguous.wrap | 2 + test cases/unit/44 promote wrap/meson.build | 4 - .../44 promote wrap/subprojects/s1/meson.build | 1 - .../s1/subprojects/ambiguous/meson.build | 1 - .../44 promote wrap/subprojects/s2/meson.build | 1 - .../subprojects/s2/subprojects/ambiguous.wrap | 2 - test cases/unit/44 vscpp17/main.cpp | 29 +++++++ test cases/unit/44 vscpp17/meson.build | 4 + .../45 native dep pkgconfig var/cross_pkgconfig.py | 12 +++ .../cross_pkgconfig/dep_tester.pc | 5 ++ .../unit/45 native dep pkgconfig var/meson.build | 15 ++++ .../45 native dep pkgconfig var/meson_options.txt | 6 ++ .../native_pkgconfig/dep_tester.pc | 5 ++ test cases/unit/45 vscpp17/main.cpp | 29 ------- test cases/unit/45 vscpp17/meson.build | 4 - .../46 native dep pkgconfig var/cross_pkgconfig.py | 12 --- .../cross_pkgconfig/dep_tester.pc | 5 -- .../unit/46 native dep pkgconfig var/meson.build | 15 ---- .../46 native dep pkgconfig var/meson_options.txt | 6 -- .../native_pkgconfig/dep_tester.pc | 5 -- test cases/unit/46 native file binary/meson.build | 21 +++++ .../unit/46 native file binary/meson_options.txt | 5 ++ test cases/unit/47 native file binary/meson.build | 21 ----- .../unit/47 native file binary/meson_options.txt | 5 -- test cases/unit/47 reconfigure/main.c | 4 + test cases/unit/47 reconfigure/meson.build | 11 +++ test cases/unit/47 reconfigure/meson_options.txt | 4 + .../47 reconfigure/subprojects/sub1/meson.build | 3 + test cases/unit/48 reconfigure/main.c | 4 - test cases/unit/48 reconfigure/meson.build | 11 --- test cases/unit/48 reconfigure/meson_options.txt | 4 - .../48 reconfigure/subprojects/sub1/meson.build | 3 - test cases/unit/48 testsetup default/envcheck.py | 11 +++ test cases/unit/48 testsetup default/meson.build | 23 ++++++ .../unit/49 pkgconfig csharp library/meson.build | 10 +++ .../unit/49 pkgconfig csharp library/somelib.cs | 12 +++ test cases/unit/49 testsetup default/envcheck.py | 11 --- test cases/unit/49 testsetup default/meson.build | 23 ------ test cases/unit/50 noncross options/meson.build | 14 ++++ test cases/unit/50 noncross options/prog.c | 1 + test cases/unit/50 noncross options/ylib.pc | 13 +++ .../unit/50 pkgconfig csharp library/meson.build | 10 --- .../unit/50 pkgconfig csharp library/somelib.cs | 12 --- test cases/unit/51 ldflagdedup/bob.c | 5 ++ test cases/unit/51 ldflagdedup/meson.build | 12 +++ test cases/unit/51 ldflagdedup/prog.c | 7 ++ test cases/unit/51 noncross options/meson.build | 14 ---- test cases/unit/51 noncross options/prog.c | 1 - test cases/unit/51 noncross options/ylib.pc | 13 --- test cases/unit/52 ldflagdedup/bob.c | 5 -- test cases/unit/52 ldflagdedup/meson.build | 12 --- test cases/unit/52 ldflagdedup/prog.c | 7 -- .../52 pkgconfig static link order/meson.build | 11 +++ test cases/unit/53 clang-format/.clang-format | 5 ++ .../unit/53 clang-format/dummydir.h/dummy.dat | 1 + test cases/unit/53 clang-format/header_expected_h | 3 + test cases/unit/53 clang-format/header_orig_h | 9 +++ test cases/unit/53 clang-format/meson.build | 3 + test cases/unit/53 clang-format/prog_expected_c | 6 ++ test cases/unit/53 clang-format/prog_orig_c | 20 +++++ .../53 pkgconfig static link order/meson.build | 11 --- test cases/unit/54 clang-format/.clang-format | 5 -- .../unit/54 clang-format/dummydir.h/dummy.dat | 1 - test cases/unit/54 clang-format/header_expected_h | 3 - test cases/unit/54 clang-format/header_orig_h | 9 --- test cases/unit/54 clang-format/meson.build | 3 - test cases/unit/54 clang-format/prog_expected_c | 6 -- test cases/unit/54 clang-format/prog_orig_c | 20 ----- .../subprojects/projectBad/meson.build | 9 +++ .../subprojects/projectBad/meson_options.txt | 1 + test cases/unit/55 dedup compiler libs/app/app.c | 13 +++ .../unit/55 dedup compiler libs/app/meson.build | 2 + test cases/unit/55 dedup compiler libs/liba/liba.c | 18 +++++ test cases/unit/55 dedup compiler libs/liba/liba.h | 8 ++ .../unit/55 dedup compiler libs/liba/meson.build | 8 ++ test cases/unit/55 dedup compiler libs/libb/libb.c | 7 ++ test cases/unit/55 dedup compiler libs/libb/libb.h | 6 ++ .../unit/55 dedup compiler libs/libb/meson.build | 6 ++ test cases/unit/55 dedup compiler libs/meson.build | 7 ++ .../subprojects/projectBad/meson.build | 9 --- .../subprojects/projectBad/meson_options.txt | 1 - test cases/unit/56 dedup compiler libs/app/app.c | 13 --- .../unit/56 dedup compiler libs/app/meson.build | 2 - test cases/unit/56 dedup compiler libs/liba/liba.c | 18 ----- test cases/unit/56 dedup compiler libs/liba/liba.h | 8 -- .../unit/56 dedup compiler libs/liba/meson.build | 8 -- test cases/unit/56 dedup compiler libs/libb/libb.c | 7 -- test cases/unit/56 dedup compiler libs/libb/libb.h | 6 -- .../unit/56 dedup compiler libs/libb/meson.build | 6 -- test cases/unit/56 dedup compiler libs/meson.build | 7 -- test cases/unit/56 introspection/cp.py | 5 ++ test cases/unit/56 introspection/meson.build | 72 +++++++++++++++++ test cases/unit/56 introspection/meson_options.txt | 2 + .../unit/56 introspection/sharedlib/meson.build | 2 + .../unit/56 introspection/sharedlib/shared.cpp | 9 +++ .../unit/56 introspection/sharedlib/shared.hpp | 10 +++ .../unit/56 introspection/staticlib/meson.build | 3 + .../unit/56 introspection/staticlib/static.c | 5 ++ .../unit/56 introspection/staticlib/static.h | 11 +++ test cases/unit/56 introspection/t1.cpp | 13 +++ test cases/unit/56 introspection/t2.cpp | 8 ++ test cases/unit/56 introspection/t3.cpp | 16 ++++ test cases/unit/57 introspection/cp.py | 5 -- test cases/unit/57 introspection/meson.build | 72 ----------------- test cases/unit/57 introspection/meson_options.txt | 2 - .../unit/57 introspection/sharedlib/meson.build | 2 - .../unit/57 introspection/sharedlib/shared.cpp | 9 --- .../unit/57 introspection/sharedlib/shared.hpp | 10 --- .../unit/57 introspection/staticlib/meson.build | 3 - .../unit/57 introspection/staticlib/static.c | 5 -- .../unit/57 introspection/staticlib/static.h | 11 --- test cases/unit/57 introspection/t1.cpp | 13 --- test cases/unit/57 introspection/t2.cpp | 8 -- test cases/unit/57 introspection/t3.cpp | 16 ---- .../build_extra_path/totally_made_up_dep.pc | 7 ++ .../host_extra_path/totally_made_up_dep.pc | 7 ++ .../unit/57 pkg_config_path option/meson.build | 7 ++ .../unit/58 introspect buildoptions/c_compiler.py | 3 + test cases/unit/58 introspect buildoptions/main.c | 6 ++ .../unit/58 introspect buildoptions/meson.build | 18 +++++ .../58 introspect buildoptions/meson_options.txt | 2 + .../subprojects/evilFile.txt | 0 .../subprojects/projectA/meson.build | 3 + .../subprojects/projectA/meson_options.txt | 1 + .../subprojects/projectBad/meson.build | 9 +++ .../subprojects/projectBad/meson_options.txt | 1 + .../build_extra_path/totally_made_up_dep.pc | 7 -- .../host_extra_path/totally_made_up_dep.pc | 7 -- .../unit/58 pkg_config_path option/meson.build | 7 -- .../unit/59 introspect buildoptions/c_compiler.py | 3 - test cases/unit/59 introspect buildoptions/main.c | 6 -- .../unit/59 introspect buildoptions/meson.build | 18 ----- .../59 introspect buildoptions/meson_options.txt | 2 - .../subprojects/evilFile.txt | 0 .../subprojects/projectA/meson.build | 3 - .../subprojects/projectA/meson_options.txt | 1 - .../subprojects/projectBad/meson.build | 9 --- .../subprojects/projectBad/meson_options.txt | 1 - test cases/unit/59 native file override/crossfile | 16 ++++ test cases/unit/59 native file override/crossfile2 | 4 + .../unit/59 native file override/meson.build | 10 +++ .../unit/59 native file override/meson_options.txt | 13 +++ test cases/unit/59 native file override/nativefile | 16 ++++ test cases/unit/60 identity cross/build_wrapper.py | 11 +++ test cases/unit/60 identity cross/host_wrapper.py | 11 +++ test cases/unit/60 identity cross/meson.build | 15 ++++ test cases/unit/60 identity cross/stuff.h | 27 +++++++ test cases/unit/60 native file override/crossfile | 16 ---- test cases/unit/60 native file override/crossfile2 | 4 - .../unit/60 native file override/meson.build | 10 --- .../unit/60 native file override/meson_options.txt | 13 --- test cases/unit/60 native file override/nativefile | 16 ---- test cases/unit/61 identity cross/build_wrapper.py | 11 --- test cases/unit/61 identity cross/host_wrapper.py | 11 --- test cases/unit/61 identity cross/meson.build | 15 ---- test cases/unit/61 identity cross/stuff.h | 27 ------- .../pkgconfig/librelativepath.pc | 9 +++ test cases/unit/62 cmake_prefix_path/meson.build | 4 + .../lib/cmake/mesontest/mesontest-config.cmake | 4 + .../pkgconfig/librelativepath.pc | 9 --- test cases/unit/63 cmake parser/meson.build | 19 +++++ .../lib/cmake/mesontest/mesontest-config.cmake | 63 +++++++++++++++ test cases/unit/63 cmake_prefix_path/meson.build | 4 - .../lib/cmake/mesontest/mesontest-config.cmake | 4 - test cases/unit/64 alias target/main.c | 3 + test cases/unit/64 alias target/meson.build | 17 ++++ test cases/unit/64 alias target/subdir/meson.build | 6 ++ test cases/unit/64 cmake parser/meson.build | 19 ----- .../lib/cmake/mesontest/mesontest-config.cmake | 63 --------------- test cases/unit/65 alias target/main.c | 3 - test cases/unit/65 alias target/meson.build | 17 ---- test cases/unit/65 alias target/subdir/meson.build | 6 -- .../unit/65 static archive stripping/app/appA.c | 4 + .../unit/65 static archive stripping/app/appB.c | 4 + .../65 static archive stripping/app/meson.build | 7 ++ .../unit/65 static archive stripping/lib/libA.c | 5 ++ .../unit/65 static archive stripping/lib/libA.h | 1 + .../unit/65 static archive stripping/lib/libB.c | 5 ++ .../unit/65 static archive stripping/lib/libB.h | 1 + .../65 static archive stripping/lib/meson.build | 23 ++++++ .../unit/66 static archive stripping/app/appA.c | 4 - .../unit/66 static archive stripping/app/appB.c | 4 - .../66 static archive stripping/app/meson.build | 7 -- .../unit/66 static archive stripping/lib/libA.c | 5 -- .../unit/66 static archive stripping/lib/libA.h | 1 - .../unit/66 static archive stripping/lib/libB.c | 5 -- .../unit/66 static archive stripping/lib/libB.h | 1 - .../66 static archive stripping/lib/meson.build | 23 ------ test cases/unit/66 static link/lib/func1.c | 9 +++ test cases/unit/66 static link/lib/func10.c | 4 + test cases/unit/66 static link/lib/func11.c | 6 ++ test cases/unit/66 static link/lib/func12.c | 7 ++ test cases/unit/66 static link/lib/func14.c | 4 + test cases/unit/66 static link/lib/func15.c | 6 ++ test cases/unit/66 static link/lib/func16.c | 6 ++ test cases/unit/66 static link/lib/func17.c | 4 + test cases/unit/66 static link/lib/func18.c | 6 ++ test cases/unit/66 static link/lib/func19.c | 7 ++ test cases/unit/66 static link/lib/func2.c | 6 ++ test cases/unit/66 static link/lib/func3.c | 4 + test cases/unit/66 static link/lib/func4.c | 6 ++ test cases/unit/66 static link/lib/func5.c | 4 + test cases/unit/66 static link/lib/func6.c | 6 ++ test cases/unit/66 static link/lib/func7.c | 4 + test cases/unit/66 static link/lib/func8.c | 6 ++ test cases/unit/66 static link/lib/func9.c | 6 ++ test cases/unit/66 static link/lib/meson.build | 80 ++++++++++++++++++ test cases/unit/66 static link/meson.build | 32 ++++++++ test cases/unit/66 static link/test1.c | 7 ++ test cases/unit/66 static link/test2.c | 6 ++ test cases/unit/66 static link/test3.c | 6 ++ test cases/unit/66 static link/test4.c | 6 ++ test cases/unit/66 static link/test5.c | 6 ++ test cases/unit/67 static link/lib/func1.c | 9 --- test cases/unit/67 static link/lib/func10.c | 4 - test cases/unit/67 static link/lib/func11.c | 6 -- test cases/unit/67 static link/lib/func12.c | 7 -- test cases/unit/67 static link/lib/func14.c | 4 - test cases/unit/67 static link/lib/func15.c | 6 -- test cases/unit/67 static link/lib/func16.c | 6 -- test cases/unit/67 static link/lib/func17.c | 4 - test cases/unit/67 static link/lib/func18.c | 6 -- test cases/unit/67 static link/lib/func19.c | 7 -- test cases/unit/67 static link/lib/func2.c | 6 -- test cases/unit/67 static link/lib/func3.c | 4 - test cases/unit/67 static link/lib/func4.c | 6 -- test cases/unit/67 static link/lib/func5.c | 4 - test cases/unit/67 static link/lib/func6.c | 6 -- test cases/unit/67 static link/lib/func7.c | 4 - test cases/unit/67 static link/lib/func8.c | 6 -- test cases/unit/67 static link/lib/func9.c | 6 -- test cases/unit/67 static link/lib/meson.build | 80 ------------------ test cases/unit/67 static link/meson.build | 32 -------- test cases/unit/67 static link/test1.c | 7 -- test cases/unit/67 static link/test2.c | 6 -- test cases/unit/67 static link/test3.c | 6 -- test cases/unit/67 static link/test4.c | 6 -- test cases/unit/67 static link/test5.c | 6 -- test cases/unit/67 test env value/meson.build | 10 +++ test cases/unit/67 test env value/test.py | 6 ++ test cases/unit/68 clang-tidy/.clang-tidy | 1 + test cases/unit/68 clang-tidy/cttest.cpp | 7 ++ test cases/unit/68 clang-tidy/dummydir.h/dummy.dat | 1 + test cases/unit/68 clang-tidy/meson.build | 3 + test cases/unit/68 test env value/meson.build | 10 --- test cases/unit/68 test env value/test.py | 6 -- test cases/unit/69 clang-tidy/.clang-tidy | 1 - test cases/unit/69 clang-tidy/cttest.cpp | 7 -- test cases/unit/69 clang-tidy/dummydir.h/dummy.dat | 1 - test cases/unit/69 clang-tidy/meson.build | 3 - test cases/unit/69 cross/crossfile.in | 5 ++ test cases/unit/69 cross/meson.build | 16 ++++ test cases/unit/69 cross/meson_options.txt | 1 + test cases/unit/70 cross test passed/exewrapper.py | 24 ++++++ test cases/unit/70 cross test passed/meson.build | 19 +++++ .../unit/70 cross test passed/meson_options.txt | 5 ++ test cases/unit/70 cross test passed/script.py | 7 ++ test cases/unit/70 cross test passed/src/main.c | 6 ++ test cases/unit/70 cross/crossfile.in | 5 -- test cases/unit/70 cross/meson.build | 16 ---- test cases/unit/70 cross/meson_options.txt | 1 - test cases/unit/71 cross test passed/exewrapper.py | 24 ------ test cases/unit/71 cross test passed/meson.build | 19 ----- .../unit/71 cross test passed/meson_options.txt | 5 -- test cases/unit/71 cross test passed/script.py | 7 -- test cases/unit/71 cross test passed/src/main.c | 6 -- test cases/unit/71 summary/meson.build | 23 ++++++ test cases/unit/71 summary/meson_options.txt | 1 + .../unit/71 summary/subprojects/sub/meson.build | 4 + .../unit/71 summary/subprojects/sub2/meson.build | 6 ++ .../sub2/subprojects/subsub/meson.build | 3 + test cases/unit/72 summary/meson.build | 23 ------ test cases/unit/72 summary/meson_options.txt | 1 - .../unit/72 summary/subprojects/sub/meson.build | 4 - .../unit/72 summary/subprojects/sub2/meson.build | 6 -- .../sub2/subprojects/subsub/meson.build | 3 - test cases/unit/72 wrap file url/meson.build | 4 + .../72 wrap file url/subprojects/foo-patch.tar.xz | Bin 0 -> 228 bytes .../unit/72 wrap file url/subprojects/foo.tar.xz | Bin 0 -> 216 bytes test cases/unit/73 dep files/foo.c | 0 test cases/unit/73 dep files/meson.build | 16 ++++ test cases/unit/73 wrap file url/meson.build | 4 - .../73 wrap file url/subprojects/foo-patch.tar.xz | Bin 228 -> 0 bytes .../unit/73 wrap file url/subprojects/foo.tar.xz | Bin 216 -> 0 bytes test cases/unit/74 dep files/foo.c | 0 test cases/unit/74 dep files/meson.build | 16 ---- .../unit/74 pkgconfig prefixes/client/client.c | 8 ++ .../unit/74 pkgconfig prefixes/client/meson.build | 3 + .../unit/74 pkgconfig prefixes/val1/meson.build | 5 ++ test cases/unit/74 pkgconfig prefixes/val1/val1.c | 3 + test cases/unit/74 pkgconfig prefixes/val1/val1.h | 1 + .../unit/74 pkgconfig prefixes/val2/meson.build | 8 ++ test cases/unit/74 pkgconfig prefixes/val2/val2.c | 4 + test cases/unit/74 pkgconfig prefixes/val2/val2.h | 1 + .../unit/75 pkgconfig prefixes/client/client.c | 8 -- .../unit/75 pkgconfig prefixes/client/meson.build | 3 - .../unit/75 pkgconfig prefixes/val1/meson.build | 5 -- test cases/unit/75 pkgconfig prefixes/val1/val1.c | 3 - test cases/unit/75 pkgconfig prefixes/val1/val1.h | 1 - .../unit/75 pkgconfig prefixes/val2/meson.build | 8 -- test cases/unit/75 pkgconfig prefixes/val2/val2.c | 4 - test cases/unit/75 pkgconfig prefixes/val2/val2.h | 1 - test cases/unit/75 subdir libdir/meson.build | 2 + .../75 subdir libdir/subprojects/flub/meson.build | 1 + test cases/unit/76 as link whole/bar.c | 6 ++ test cases/unit/76 as link whole/foo.c | 6 ++ test cases/unit/76 as link whole/meson.build | 11 +++ test cases/unit/76 subdir libdir/meson.build | 2 - .../76 subdir libdir/subprojects/flub/meson.build | 1 - test cases/unit/77 as link whole/bar.c | 6 -- test cases/unit/77 as link whole/foo.c | 6 -- test cases/unit/77 as link whole/meson.build | 11 --- test cases/unit/77 nostdlib/meson.build | 14 ++++ test cases/unit/77 nostdlib/prog.c | 7 ++ .../unit/77 nostdlib/subprojects/mylibc/libc.c | 35 ++++++++ .../77 nostdlib/subprojects/mylibc/meson.build | 13 +++ .../unit/77 nostdlib/subprojects/mylibc/stdio.h | 5 ++ .../77 nostdlib/subprojects/mylibc/stubstart.s | 8 ++ test cases/unit/78 nostdlib/meson.build | 14 ---- test cases/unit/78 nostdlib/prog.c | 7 -- .../unit/78 nostdlib/subprojects/mylibc/libc.c | 35 -------- .../78 nostdlib/subprojects/mylibc/meson.build | 13 --- .../unit/78 nostdlib/subprojects/mylibc/stdio.h | 5 -- .../78 nostdlib/subprojects/mylibc/stubstart.s | 8 -- .../unit/78 user options for subproject/.gitignore | 1 + .../75 user options for subproject/.gitignore | 1 + .../75 user options for subproject/meson.build | 3 + test cases/unit/79 global-rpath/meson.build | 3 + test cases/unit/79 global-rpath/rpathified.cpp | 6 ++ test cases/unit/79 global-rpath/yonder/meson.build | 5 ++ test cases/unit/79 global-rpath/yonder/yonder.cpp | 3 + test cases/unit/79 global-rpath/yonder/yonder.h | 1 + .../unit/79 user options for subproject/.gitignore | 1 - .../75 user options for subproject/.gitignore | 1 - .../75 user options for subproject/meson.build | 3 - test cases/unit/80 global-rpath/meson.build | 3 - test cases/unit/80 global-rpath/rpathified.cpp | 6 -- test cases/unit/80 global-rpath/yonder/meson.build | 5 -- test cases/unit/80 global-rpath/yonder/yonder.cpp | 3 - test cases/unit/80 global-rpath/yonder/yonder.h | 1 - test cases/unit/80 wrap-git/meson.build | 4 + .../packagefiles/wrap_git_builddef/meson.build | 3 + .../subprojects/wrap_git_upstream/main.c | 4 + .../unit/81 meson version compare/meson.build | 19 +++++ .../subprojects/foo/meson.build | 8 ++ test cases/unit/81 wrap-git/meson.build | 4 - .../packagefiles/wrap_git_builddef/meson.build | 3 - .../subprojects/wrap_git_upstream/main.c | 4 - .../unit/82 cross only introspect/meson.build | 2 + .../unit/82 meson version compare/meson.build | 19 ----- .../subprojects/foo/meson.build | 8 -- .../unit/83 change option choices/meson.build | 1 + .../83 change option choices/meson_options.1.txt | 13 +++ .../83 change option choices/meson_options.2.txt | 13 +++ .../unit/83 cross only introspect/meson.build | 2 - .../unit/84 change option choices/meson.build | 1 - .../84 change option choices/meson_options.1.txt | 13 --- .../84 change option choices/meson_options.2.txt | 13 --- .../84 nested subproject regenerate depends/main.c | 3 + .../meson.build | 6 ++ .../subprojects/sub1/meson.build | 4 + .../subprojects/sub2/CMakeLists.txt | 1 + test cases/unit/85 cpp modules/main.cpp | 7 ++ test cases/unit/85 cpp modules/meson.build | 17 ++++ test cases/unit/85 cpp modules/src0.ixx | 7 ++ test cases/unit/85 cpp modules/src1.ixx | 7 ++ test cases/unit/85 cpp modules/src2.ixx | 7 ++ test cases/unit/85 cpp modules/src3.ixx | 7 ++ test cases/unit/85 cpp modules/src4.ixx | 7 ++ test cases/unit/85 cpp modules/src5.ixx | 7 ++ test cases/unit/85 cpp modules/src6.ixx | 7 ++ test cases/unit/85 cpp modules/src7.ixx | 7 ++ test cases/unit/85 cpp modules/src8.ixx | 7 ++ test cases/unit/85 cpp modules/src9.ixx | 5 ++ .../85 nested subproject regenerate depends/main.c | 3 - .../meson.build | 6 -- .../subprojects/sub1/meson.build | 4 - .../subprojects/sub2/CMakeLists.txt | 1 - test cases/unit/86 cpp modules/main.cpp | 7 -- test cases/unit/86 cpp modules/meson.build | 17 ---- test cases/unit/86 cpp modules/src0.ixx | 7 -- test cases/unit/86 cpp modules/src1.ixx | 7 -- test cases/unit/86 cpp modules/src2.ixx | 7 -- test cases/unit/86 cpp modules/src3.ixx | 7 -- test cases/unit/86 cpp modules/src4.ixx | 7 -- test cases/unit/86 cpp modules/src5.ixx | 7 -- test cases/unit/86 cpp modules/src6.ixx | 7 -- test cases/unit/86 cpp modules/src7.ixx | 7 -- test cases/unit/86 cpp modules/src8.ixx | 7 -- test cases/unit/86 cpp modules/src9.ixx | 5 -- test cases/unit/86 prelinking/file1.c | 14 ++++ test cases/unit/86 prelinking/file2.c | 9 +++ test cases/unit/86 prelinking/file3.c | 9 +++ test cases/unit/86 prelinking/file4.c | 9 +++ test cases/unit/86 prelinking/main.c | 10 +++ test cases/unit/86 prelinking/meson.build | 7 ++ test cases/unit/86 prelinking/private_header.h | 11 +++ test cases/unit/86 prelinking/public_header.h | 3 + test cases/unit/87 prelinking/file1.c | 14 ---- test cases/unit/87 prelinking/file2.c | 9 --- test cases/unit/87 prelinking/file3.c | 9 --- test cases/unit/87 prelinking/file4.c | 9 --- test cases/unit/87 prelinking/main.c | 10 --- test cases/unit/87 prelinking/meson.build | 7 -- test cases/unit/87 prelinking/private_header.h | 11 --- test cases/unit/87 prelinking/public_header.h | 3 - test cases/unit/87 run native test/main.c | 17 ++++ test cases/unit/87 run native test/meson.build | 6 ++ test cases/unit/88 multiple envvars/meson.build | 4 + test cases/unit/88 multiple envvars/prog.c | 18 +++++ test cases/unit/88 multiple envvars/prog.cpp | 18 +++++ test cases/unit/88 run native test/main.c | 17 ---- test cases/unit/88 run native test/meson.build | 6 -- test cases/unit/89 multiple envvars/meson.build | 4 - test cases/unit/89 multiple envvars/prog.c | 18 ----- test cases/unit/89 multiple envvars/prog.cpp | 18 ----- .../unit/89 pkgconfig build rpath order/dummy.pc | 7 ++ .../89 pkgconfig build rpath order/meson.build | 20 +++++ .../unit/89 pkgconfig build rpath order/prog.c | 5 ++ .../unit/89 pkgconfig build rpath order/prog.cc | 8 ++ .../89 pkgconfig build rpath order/sub/meson.build | 1 + .../89 pkgconfig build rpath order/sub/stuff.c | 3 + test cases/unit/90 devenv/main.c | 14 ++++ test cases/unit/90 devenv/meson.build | 17 ++++ test cases/unit/90 devenv/subprojects/sub/foo.c | 10 +++ .../unit/90 devenv/subprojects/sub/meson.build | 6 ++ test cases/unit/90 devenv/test-devenv.py | 8 ++ .../unit/90 pkgconfig build rpath order/dummy.pc | 7 -- .../90 pkgconfig build rpath order/meson.build | 20 ----- .../unit/90 pkgconfig build rpath order/prog.c | 5 -- .../unit/90 pkgconfig build rpath order/prog.cc | 8 -- .../90 pkgconfig build rpath order/sub/meson.build | 1 - .../90 pkgconfig build rpath order/sub/stuff.c | 3 - test cases/unit/91 devenv/main.c | 14 ---- test cases/unit/91 devenv/meson.build | 17 ---- test cases/unit/91 devenv/subprojects/sub/foo.c | 10 --- .../unit/91 devenv/subprojects/sub/meson.build | 6 -- test cases/unit/91 devenv/test-devenv.py | 8 -- 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 | 88 ++++++++++++++++++++ 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 | 88 -------------------- 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 | 90 ++++++++++----------- unittests/linuxcrosstests.py | 10 +-- unittests/linuxliketests.py | 52 ++++++------ unittests/machinefiletests.py | 22 ++--- unittests/platformagnostictests.py | 4 +- unittests/windowstests.py | 4 +- 1142 files changed, 4039 insertions(+), 4039 deletions(-) create mode 100644 test cases/failing/100 no glib-compile-resources/meson.build create mode 100644 test cases/failing/100 no glib-compile-resources/test.json create mode 100644 test cases/failing/100 no glib-compile-resources/trivial.gresource.xml delete mode 100644 test cases/failing/100 no lang/main.c delete mode 100644 test cases/failing/100 no lang/meson.build delete mode 100644 test cases/failing/100 no lang/test.json delete mode 100644 test cases/failing/101 no glib-compile-resources/meson.build delete mode 100644 test cases/failing/101 no glib-compile-resources/test.json delete mode 100644 test cases/failing/101 no glib-compile-resources/trivial.gresource.xml create mode 100644 test cases/failing/101 number in combo/meson.build create mode 100644 test cases/failing/101 number in combo/nativefile.ini create mode 100644 test cases/failing/101 number in combo/test.json create mode 100644 test cases/failing/102 bool in combo/meson.build create mode 100644 test cases/failing/102 bool in combo/meson_options.txt create mode 100644 test cases/failing/102 bool in combo/nativefile.ini create mode 100644 test cases/failing/102 bool in combo/test.json delete mode 100644 test cases/failing/102 number in combo/meson.build delete mode 100644 test cases/failing/102 number in combo/nativefile.ini delete mode 100644 test cases/failing/102 number in combo/test.json delete mode 100644 test cases/failing/103 bool in combo/meson.build delete mode 100644 test cases/failing/103 bool in combo/meson_options.txt delete mode 100644 test cases/failing/103 bool in combo/nativefile.ini delete mode 100644 test cases/failing/103 bool in combo/test.json create mode 100644 test cases/failing/103 compiler no lang/meson.build create mode 100644 test cases/failing/103 compiler no lang/test.json delete mode 100644 test cases/failing/104 compiler no lang/meson.build delete mode 100644 test cases/failing/104 compiler no lang/test.json create mode 100644 test cases/failing/104 no fallback/meson.build create mode 100644 test cases/failing/104 no fallback/subprojects/foob/meson.build create mode 100644 test cases/failing/104 no fallback/test.json create mode 100644 test cases/failing/105 feature require/meson.build create mode 100644 test cases/failing/105 feature require/meson_options.txt create mode 100644 test cases/failing/105 feature require/test.json delete mode 100644 test cases/failing/105 no fallback/meson.build delete mode 100644 test cases/failing/105 no fallback/subprojects/foob/meson.build delete mode 100644 test cases/failing/105 no fallback/test.json create mode 100644 test cases/failing/106 feature require.bis/meson.build create mode 100644 test cases/failing/106 feature require.bis/meson_options.txt create mode 100644 test cases/failing/106 feature require.bis/test.json delete mode 100644 test cases/failing/106 feature require/meson.build delete mode 100644 test cases/failing/106 feature require/meson_options.txt delete mode 100644 test cases/failing/106 feature require/test.json delete mode 100644 test cases/failing/107 feature require.bis/meson.build delete mode 100644 test cases/failing/107 feature require.bis/meson_options.txt delete mode 100644 test cases/failing/107 feature require.bis/test.json create mode 100644 test cases/failing/107 no build get_external_property/meson.build create mode 100644 test cases/failing/107 no build get_external_property/test.json create mode 100644 test cases/failing/108 enter subdir twice/meson.build create mode 100644 test cases/failing/108 enter subdir twice/sub/meson.build create mode 100644 test cases/failing/108 enter subdir twice/test.json delete mode 100644 test cases/failing/108 no build get_external_property/meson.build delete mode 100644 test cases/failing/108 no build get_external_property/test.json delete mode 100644 test cases/failing/109 enter subdir twice/meson.build delete mode 100644 test cases/failing/109 enter subdir twice/sub/meson.build delete mode 100644 test cases/failing/109 enter subdir twice/test.json create mode 100644 test cases/failing/109 invalid fstring/109 invalid fstring/meson.build create mode 100644 test cases/failing/109 invalid fstring/109 invalid fstring/test.json create mode 100644 test cases/failing/109 invalid fstring/meson.build create mode 100644 test cases/failing/109 invalid fstring/test.json create mode 100644 test cases/failing/110 compiler argument checking/meson.build create mode 100644 test cases/failing/110 compiler argument checking/test.json create mode 100644 test cases/failing/111 empty fallback/meson.build create mode 100644 test cases/failing/111 empty fallback/subprojects/foo/meson.build create mode 100644 test cases/failing/111 empty fallback/test.json delete mode 100644 test cases/failing/111 invalid fstring/109 invalid fstring/meson.build delete mode 100644 test cases/failing/111 invalid fstring/109 invalid fstring/test.json delete mode 100644 test cases/failing/111 invalid fstring/meson.build delete mode 100644 test cases/failing/111 invalid fstring/test.json create mode 100644 test cases/failing/112 cmake executable dependency/meson.build create mode 100644 test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt create mode 100644 test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c create mode 100644 test cases/failing/112 cmake executable dependency/test.json delete mode 100644 test cases/failing/112 compiler argument checking/meson.build delete mode 100644 test cases/failing/112 compiler argument checking/test.json create mode 100644 test cases/failing/113 allow_fallback with fallback/meson.build create mode 100644 test cases/failing/113 allow_fallback with fallback/test.json delete mode 100644 test cases/failing/113 empty fallback/meson.build delete mode 100644 test cases/failing/113 empty fallback/subprojects/foo/meson.build delete mode 100644 test cases/failing/113 empty fallback/test.json delete mode 100644 test cases/failing/114 cmake executable dependency/meson.build delete mode 100644 test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt delete mode 100644 test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c delete mode 100644 test cases/failing/114 cmake executable dependency/test.json create mode 100644 test cases/failing/114 nonsensical bindgen/meson.build create mode 100644 test cases/failing/114 nonsensical bindgen/src/header.h create mode 100644 test cases/failing/114 nonsensical bindgen/src/source.c create mode 100644 test cases/failing/114 nonsensical bindgen/test.json delete mode 100644 test cases/failing/115 allow_fallback with fallback/meson.build delete mode 100644 test cases/failing/115 allow_fallback with fallback/test.json create mode 100644 test cases/failing/115 run_target in test/meson.build create mode 100644 test cases/failing/115 run_target in test/test.json create mode 100644 test cases/failing/115 run_target in test/trivial.c delete mode 100644 test cases/failing/116 nonsensical bindgen/meson.build delete mode 100644 test cases/failing/116 nonsensical bindgen/src/header.h delete mode 100644 test cases/failing/116 nonsensical bindgen/src/source.c delete mode 100644 test cases/failing/116 nonsensical bindgen/test.json create mode 100644 test cases/failing/116 run_target in add_install_script/meson.build create mode 100644 test cases/failing/116 run_target in add_install_script/test.json create mode 100644 test cases/failing/116 run_target in add_install_script/trivial.c create mode 100644 test cases/failing/117 pathsep in install_symlink/meson.build create mode 100644 test cases/failing/117 pathsep in install_symlink/test.json delete mode 100644 test cases/failing/117 run_target in test/meson.build delete mode 100644 test cases/failing/117 run_target in test/test.json delete mode 100644 test cases/failing/117 run_target in test/trivial.c delete mode 100644 test cases/failing/118 run_target in add_install_script/meson.build delete mode 100644 test cases/failing/118 run_target in add_install_script/test.json delete mode 100644 test cases/failing/118 run_target in add_install_script/trivial.c create mode 100644 test cases/failing/118 subproject version conflict/meson.build create mode 100644 test cases/failing/118 subproject version conflict/subprojects/A/meson.build create mode 100644 test cases/failing/118 subproject version conflict/subprojects/B/meson.build create mode 100644 test cases/failing/118 subproject version conflict/test.json delete mode 100644 test cases/failing/119 pathsep in install_symlink/meson.build delete mode 100644 test cases/failing/119 pathsep in install_symlink/test.json create mode 100644 test cases/failing/119 structured source empty string/main.rs create mode 100644 test cases/failing/119 structured source empty string/meson.build create mode 100644 test cases/failing/119 structured source empty string/test.json create mode 100644 test cases/failing/120 structured_sources conflicts/main.rs create mode 100644 test cases/failing/120 structured_sources conflicts/meson.build create mode 100644 test cases/failing/120 structured_sources conflicts/test.json delete mode 100644 test cases/failing/120 subproject version conflict/meson.build delete mode 100644 test cases/failing/120 subproject version conflict/subprojects/A/meson.build delete mode 100644 test cases/failing/120 subproject version conflict/subprojects/B/meson.build delete mode 100644 test cases/failing/120 subproject version conflict/test.json create mode 100644 test cases/failing/121 missing compiler/meson.build create mode 100644 test cases/failing/121 missing compiler/subprojects/sub/main.c create mode 100644 test cases/failing/121 missing compiler/subprojects/sub/meson.build create mode 100644 test cases/failing/121 missing compiler/test.json delete mode 100644 test cases/failing/121 structured source empty string/main.rs delete mode 100644 test cases/failing/121 structured source empty string/meson.build delete mode 100644 test cases/failing/121 structured source empty string/test.json delete mode 100644 test cases/failing/122 structured_sources conflicts/main.rs delete mode 100644 test cases/failing/122 structured_sources conflicts/meson.build delete mode 100644 test cases/failing/122 structured_sources conflicts/test.json delete mode 100644 test cases/failing/123 missing compiler/meson.build delete mode 100644 test cases/failing/123 missing compiler/subprojects/sub/main.c delete mode 100644 test cases/failing/123 missing compiler/subprojects/sub/meson.build delete mode 100644 test cases/failing/123 missing compiler/test.json create mode 100644 test cases/failing/38 prefix absolute/meson.build create mode 100644 test cases/failing/38 prefix absolute/test.json create mode 100644 test cases/failing/39 kwarg assign/dummy.c create mode 100644 test cases/failing/39 kwarg assign/meson.build create mode 100644 test cases/failing/39 kwarg assign/prog.c create mode 100644 test cases/failing/39 kwarg assign/test.json delete mode 100644 test cases/failing/39 prefix absolute/meson.build delete mode 100644 test cases/failing/39 prefix absolute/test.json create mode 100644 test cases/failing/40 custom target plainname many inputs/1.txt create mode 100644 test cases/failing/40 custom target plainname many inputs/2.txt create mode 100644 test cases/failing/40 custom target plainname many inputs/catfiles.py create mode 100644 test cases/failing/40 custom target plainname many inputs/meson.build create mode 100644 test cases/failing/40 custom target plainname many inputs/test.json delete mode 100644 test cases/failing/40 kwarg assign/dummy.c delete mode 100644 test cases/failing/40 kwarg assign/meson.build delete mode 100644 test cases/failing/40 kwarg assign/prog.c delete mode 100644 test cases/failing/40 kwarg assign/test.json create mode 100755 test cases/failing/41 custom target outputs not matching install_dirs/generator.py create mode 100644 test cases/failing/41 custom target outputs not matching install_dirs/meson.build create mode 100644 test cases/failing/41 custom target outputs not matching install_dirs/test.json delete mode 100644 test cases/failing/41 custom target plainname many inputs/1.txt delete mode 100644 test cases/failing/41 custom target plainname many inputs/2.txt delete mode 100644 test cases/failing/41 custom target plainname many inputs/catfiles.py delete mode 100644 test cases/failing/41 custom target plainname many inputs/meson.build delete mode 100644 test cases/failing/41 custom target plainname many inputs/test.json delete mode 100755 test cases/failing/42 custom target outputs not matching install_dirs/generator.py delete mode 100644 test cases/failing/42 custom target outputs not matching install_dirs/meson.build delete mode 100644 test cases/failing/42 custom target outputs not matching install_dirs/test.json create mode 100644 test cases/failing/42 project name colon/meson.build create mode 100644 test cases/failing/42 project name colon/test.json create mode 100644 test cases/failing/43 abs subdir/bob/meson.build create mode 100644 test cases/failing/43 abs subdir/meson.build create mode 100644 test cases/failing/43 abs subdir/test.json delete mode 100644 test cases/failing/43 project name colon/meson.build delete mode 100644 test cases/failing/43 project name colon/test.json delete mode 100644 test cases/failing/44 abs subdir/bob/meson.build delete mode 100644 test cases/failing/44 abs subdir/meson.build delete mode 100644 test cases/failing/44 abs subdir/test.json create mode 100644 test cases/failing/44 abspath to srcdir/meson.build create mode 100644 test cases/failing/44 abspath to srcdir/test.json delete mode 100644 test cases/failing/45 abspath to srcdir/meson.build delete mode 100644 test cases/failing/45 abspath to srcdir/test.json create mode 100644 test cases/failing/45 pkgconfig variables reserved/meson.build create mode 100644 test cases/failing/45 pkgconfig variables reserved/simple.c create mode 100644 test cases/failing/45 pkgconfig variables reserved/simple.h create mode 100644 test cases/failing/45 pkgconfig variables reserved/test.json delete mode 100644 test cases/failing/46 pkgconfig variables reserved/meson.build delete mode 100644 test cases/failing/46 pkgconfig variables reserved/simple.c delete mode 100644 test cases/failing/46 pkgconfig variables reserved/simple.h delete mode 100644 test cases/failing/46 pkgconfig variables reserved/test.json create mode 100644 test cases/failing/46 pkgconfig variables zero length/meson.build create mode 100644 test cases/failing/46 pkgconfig variables zero length/simple.c create mode 100644 test cases/failing/46 pkgconfig variables zero length/simple.h create mode 100644 test cases/failing/46 pkgconfig variables zero length/test.json create mode 100644 test cases/failing/47 pkgconfig variables zero length value/meson.build create mode 100644 test cases/failing/47 pkgconfig variables zero length value/simple.c create mode 100644 test cases/failing/47 pkgconfig variables zero length value/simple.h create mode 100644 test cases/failing/47 pkgconfig variables zero length value/test.json delete mode 100644 test cases/failing/47 pkgconfig variables zero length/meson.build delete mode 100644 test cases/failing/47 pkgconfig variables zero length/simple.c delete mode 100644 test cases/failing/47 pkgconfig variables zero length/simple.h delete mode 100644 test cases/failing/47 pkgconfig variables zero length/test.json create mode 100644 test cases/failing/48 pkgconfig variables not key value/meson.build create mode 100644 test cases/failing/48 pkgconfig variables not key value/simple.c create mode 100644 test cases/failing/48 pkgconfig variables not key value/simple.h create mode 100644 test cases/failing/48 pkgconfig variables not key value/test.json delete mode 100644 test cases/failing/48 pkgconfig variables zero length value/meson.build delete mode 100644 test cases/failing/48 pkgconfig variables zero length value/simple.c delete mode 100644 test cases/failing/48 pkgconfig variables zero length value/simple.h delete mode 100644 test cases/failing/48 pkgconfig variables zero length value/test.json create mode 100644 test cases/failing/49 executable comparison/meson.build create mode 100644 test cases/failing/49 executable comparison/prog.c create mode 100644 test cases/failing/49 executable comparison/test.json delete mode 100644 test cases/failing/49 pkgconfig variables not key value/meson.build delete mode 100644 test cases/failing/49 pkgconfig variables not key value/simple.c delete mode 100644 test cases/failing/49 pkgconfig variables not key value/simple.h delete mode 100644 test cases/failing/49 pkgconfig variables not key value/test.json delete mode 100644 test cases/failing/50 executable comparison/meson.build delete mode 100644 test cases/failing/50 executable comparison/prog.c delete mode 100644 test cases/failing/50 executable comparison/test.json create mode 100644 test cases/failing/50 inconsistent comparison/meson.build create mode 100644 test cases/failing/50 inconsistent comparison/test.json delete mode 100644 test cases/failing/51 inconsistent comparison/meson.build delete mode 100644 test cases/failing/51 inconsistent comparison/test.json create mode 100644 test cases/failing/51 slashname/meson.build create mode 100644 test cases/failing/51 slashname/sub/meson.build create mode 100644 test cases/failing/51 slashname/sub/prog.c create mode 100644 test cases/failing/51 slashname/test.json create mode 100644 test cases/failing/52 reserved meson prefix/meson-foo/meson.build create mode 100644 test cases/failing/52 reserved meson prefix/meson.build create mode 100644 test cases/failing/52 reserved meson prefix/test.json delete mode 100644 test cases/failing/52 slashname/meson.build delete mode 100644 test cases/failing/52 slashname/sub/meson.build delete mode 100644 test cases/failing/52 slashname/sub/prog.c delete mode 100644 test cases/failing/52 slashname/test.json delete mode 100644 test cases/failing/53 reserved meson prefix/meson-foo/meson.build delete mode 100644 test cases/failing/53 reserved meson prefix/meson.build delete mode 100644 test cases/failing/53 reserved meson prefix/test.json create mode 100644 test cases/failing/53 wrong shared crate type/foo.rs create mode 100644 test cases/failing/53 wrong shared crate type/meson.build create mode 100644 test cases/failing/53 wrong shared crate type/test.json delete mode 100644 test cases/failing/54 wrong shared crate type/foo.rs delete mode 100644 test cases/failing/54 wrong shared crate type/meson.build delete mode 100644 test cases/failing/54 wrong shared crate type/test.json create mode 100644 test cases/failing/54 wrong static crate type/foo.rs create mode 100644 test cases/failing/54 wrong static crate type/meson.build create mode 100644 test cases/failing/54 wrong static crate type/test.json create mode 100644 test cases/failing/55 or on new line/meson.build create mode 100644 test cases/failing/55 or on new line/meson_options.txt create mode 100644 test cases/failing/55 or on new line/test.json delete mode 100644 test cases/failing/55 wrong static crate type/foo.rs delete mode 100644 test cases/failing/55 wrong static crate type/meson.build delete mode 100644 test cases/failing/55 wrong static crate type/test.json create mode 100644 test cases/failing/56 link with executable/meson.build create mode 100644 test cases/failing/56 link with executable/module.c create mode 100644 test cases/failing/56 link with executable/prog.c create mode 100644 test cases/failing/56 link with executable/test.json delete mode 100644 test cases/failing/56 or on new line/meson.build delete mode 100644 test cases/failing/56 or on new line/meson_options.txt delete mode 100644 test cases/failing/56 or on new line/test.json create mode 100644 test cases/failing/57 assign custom target index/meson.build create mode 100644 test cases/failing/57 assign custom target index/test.json delete mode 100644 test cases/failing/57 link with executable/meson.build delete mode 100644 test cases/failing/57 link with executable/module.c delete mode 100644 test cases/failing/57 link with executable/prog.c delete mode 100644 test cases/failing/57 link with executable/test.json delete mode 100644 test cases/failing/58 assign custom target index/meson.build delete mode 100644 test cases/failing/58 assign custom target index/test.json create mode 100644 test cases/failing/58 getoption prefix/meson.build create mode 100644 test cases/failing/58 getoption prefix/subprojects/abc/meson.build create mode 100644 test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt create mode 100644 test cases/failing/58 getoption prefix/test.json create mode 100644 test cases/failing/59 bad option argument/meson.build create mode 100644 test cases/failing/59 bad option argument/meson_options.txt create mode 100644 test cases/failing/59 bad option argument/test.json delete mode 100644 test cases/failing/59 getoption prefix/meson.build delete mode 100644 test cases/failing/59 getoption prefix/subprojects/abc/meson.build delete mode 100644 test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt delete mode 100644 test cases/failing/59 getoption prefix/test.json delete mode 100644 test cases/failing/60 bad option argument/meson.build delete mode 100644 test cases/failing/60 bad option argument/meson_options.txt delete mode 100644 test cases/failing/60 bad option argument/test.json create mode 100644 test cases/failing/60 subproj filegrab/meson.build create mode 100644 test cases/failing/60 subproj filegrab/prog.c create mode 100644 test cases/failing/60 subproj filegrab/subprojects/a/meson.build create mode 100644 test cases/failing/60 subproj filegrab/test.json create mode 100644 test cases/failing/61 grab subproj/meson.build create mode 100644 test cases/failing/61 grab subproj/subprojects/foo/meson.build create mode 100644 test cases/failing/61 grab subproj/subprojects/foo/sub.c create mode 100644 test cases/failing/61 grab subproj/test.json delete mode 100644 test cases/failing/61 subproj filegrab/meson.build delete mode 100644 test cases/failing/61 subproj filegrab/prog.c delete mode 100644 test cases/failing/61 subproj filegrab/subprojects/a/meson.build delete mode 100644 test cases/failing/61 subproj filegrab/test.json create mode 100644 test cases/failing/62 grab sibling/meson.build create mode 100644 test cases/failing/62 grab sibling/subprojects/a/meson.build create mode 100644 test cases/failing/62 grab sibling/subprojects/b/meson.build create mode 100644 test cases/failing/62 grab sibling/subprojects/b/sneaky.c create mode 100644 test cases/failing/62 grab sibling/test.json delete mode 100644 test cases/failing/62 grab subproj/meson.build delete mode 100644 test cases/failing/62 grab subproj/subprojects/foo/meson.build delete mode 100644 test cases/failing/62 grab subproj/subprojects/foo/sub.c delete mode 100644 test cases/failing/62 grab subproj/test.json delete mode 100644 test cases/failing/63 grab sibling/meson.build delete mode 100644 test cases/failing/63 grab sibling/subprojects/a/meson.build delete mode 100644 test cases/failing/63 grab sibling/subprojects/b/meson.build delete mode 100644 test cases/failing/63 grab sibling/subprojects/b/sneaky.c delete mode 100644 test cases/failing/63 grab sibling/test.json create mode 100644 test cases/failing/63 string as link target/meson.build create mode 100644 test cases/failing/63 string as link target/prog.c create mode 100644 test cases/failing/63 string as link target/test.json create mode 100644 test cases/failing/64 dependency not-found and required/meson.build create mode 100644 test cases/failing/64 dependency not-found and required/test.json delete mode 100644 test cases/failing/64 string as link target/meson.build delete mode 100644 test cases/failing/64 string as link target/prog.c delete mode 100644 test cases/failing/64 string as link target/test.json delete mode 100644 test cases/failing/65 dependency not-found and required/meson.build delete mode 100644 test cases/failing/65 dependency not-found and required/test.json create mode 100644 test cases/failing/65 subproj different versions/main.c create mode 100644 test cases/failing/65 subproj different versions/meson.build create mode 100644 test cases/failing/65 subproj different versions/subprojects/a/a.c create mode 100644 test cases/failing/65 subproj different versions/subprojects/a/a.h create mode 100644 test cases/failing/65 subproj different versions/subprojects/a/meson.build create mode 100644 test cases/failing/65 subproj different versions/subprojects/b/b.c create mode 100644 test cases/failing/65 subproj different versions/subprojects/b/b.h create mode 100644 test cases/failing/65 subproj different versions/subprojects/b/meson.build create mode 100644 test cases/failing/65 subproj different versions/subprojects/c/c.h create mode 100644 test cases/failing/65 subproj different versions/subprojects/c/meson.build create mode 100644 test cases/failing/65 subproj different versions/test.json delete mode 100644 test cases/failing/66 subproj different versions/main.c delete mode 100644 test cases/failing/66 subproj different versions/meson.build delete mode 100644 test cases/failing/66 subproj different versions/subprojects/a/a.c delete mode 100644 test cases/failing/66 subproj different versions/subprojects/a/a.h delete mode 100644 test cases/failing/66 subproj different versions/subprojects/a/meson.build delete mode 100644 test cases/failing/66 subproj different versions/subprojects/b/b.c delete mode 100644 test cases/failing/66 subproj different versions/subprojects/b/b.h delete mode 100644 test cases/failing/66 subproj different versions/subprojects/b/meson.build delete mode 100644 test cases/failing/66 subproj different versions/subprojects/c/c.h delete mode 100644 test cases/failing/66 subproj different versions/subprojects/c/meson.build delete mode 100644 test cases/failing/66 subproj different versions/test.json create mode 100644 test cases/failing/66 wrong boost module/meson.build create mode 100644 test cases/failing/66 wrong boost module/test.json create mode 100644 test cases/failing/67 install_data rename bad size/file1.txt create mode 100644 test cases/failing/67 install_data rename bad size/file2.txt create mode 100644 test cases/failing/67 install_data rename bad size/meson.build create mode 100644 test cases/failing/67 install_data rename bad size/test.json delete mode 100644 test cases/failing/67 wrong boost module/meson.build delete mode 100644 test cases/failing/67 wrong boost module/test.json delete mode 100644 test cases/failing/68 install_data rename bad size/file1.txt delete mode 100644 test cases/failing/68 install_data rename bad size/file2.txt delete mode 100644 test cases/failing/68 install_data rename bad size/meson.build delete mode 100644 test cases/failing/68 install_data rename bad size/test.json create mode 100644 test cases/failing/68 skip only subdir/meson.build create mode 100644 test cases/failing/68 skip only subdir/subdir/meson.build create mode 100644 test cases/failing/68 skip only subdir/test.json create mode 100644 test cases/failing/69 dual override/meson.build create mode 100644 test cases/failing/69 dual override/overrides.py create mode 100644 test cases/failing/69 dual override/test.json delete mode 100644 test cases/failing/69 skip only subdir/meson.build delete mode 100644 test cases/failing/69 skip only subdir/subdir/meson.build delete mode 100644 test cases/failing/69 skip only subdir/test.json delete mode 100644 test cases/failing/70 dual override/meson.build delete mode 100644 test cases/failing/70 dual override/overrides.py delete mode 100644 test cases/failing/70 dual override/test.json create mode 100644 test cases/failing/70 override used/meson.build create mode 100755 test cases/failing/70 override used/other.py create mode 100755 test cases/failing/70 override used/something.py create mode 100644 test cases/failing/70 override used/test.json delete mode 100644 test cases/failing/71 override used/meson.build delete mode 100755 test cases/failing/71 override used/other.py delete mode 100755 test cases/failing/71 override used/something.py delete mode 100644 test cases/failing/71 override used/test.json create mode 100644 test cases/failing/71 run_command unclean exit/meson.build create mode 100755 test cases/failing/71 run_command unclean exit/returncode.py create mode 100644 test cases/failing/71 run_command unclean exit/test.json create mode 100644 test cases/failing/72 int literal leading zero/meson.build create mode 100644 test cases/failing/72 int literal leading zero/test.json delete mode 100644 test cases/failing/72 run_command unclean exit/meson.build delete mode 100755 test cases/failing/72 run_command unclean exit/returncode.py delete mode 100644 test cases/failing/72 run_command unclean exit/test.json create mode 100644 test cases/failing/73 configuration immutable/input create mode 100644 test cases/failing/73 configuration immutable/meson.build create mode 100644 test cases/failing/73 configuration immutable/test.json delete mode 100644 test cases/failing/73 int literal leading zero/meson.build delete mode 100644 test cases/failing/73 int literal leading zero/test.json delete mode 100644 test cases/failing/74 configuration immutable/input delete mode 100644 test cases/failing/74 configuration immutable/meson.build delete mode 100644 test cases/failing/74 configuration immutable/test.json create mode 100644 test cases/failing/74 link with shared module on osx/meson.build create mode 100644 test cases/failing/74 link with shared module on osx/module.c create mode 100644 test cases/failing/74 link with shared module on osx/prog.c create mode 100644 test cases/failing/74 link with shared module on osx/test.json delete mode 100644 test cases/failing/75 link with shared module on osx/meson.build delete mode 100644 test cases/failing/75 link with shared module on osx/module.c delete mode 100644 test cases/failing/75 link with shared module on osx/prog.c delete mode 100644 test cases/failing/75 link with shared module on osx/test.json create mode 100644 test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in create mode 100644 test cases/failing/75 non ascii in ascii encoded configure file/meson.build create mode 100644 test cases/failing/75 non ascii in ascii encoded configure file/test.json delete mode 100644 test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in delete mode 100644 test cases/failing/76 non ascii in ascii encoded configure file/meson.build delete mode 100644 test cases/failing/76 non ascii in ascii encoded configure file/test.json create mode 100644 test cases/failing/76 subproj dependency not-found and required/meson.build create mode 100644 test cases/failing/76 subproj dependency not-found and required/test.json delete mode 100644 test cases/failing/77 subproj dependency not-found and required/meson.build delete mode 100644 test cases/failing/77 subproj dependency not-found and required/test.json create mode 100644 test cases/failing/77 unfound run/meson.build create mode 100644 test cases/failing/77 unfound run/test.json create mode 100644 test cases/failing/78 framework dependency with version/meson.build create mode 100644 test cases/failing/78 framework dependency with version/test.json delete mode 100644 test cases/failing/78 unfound run/meson.build delete mode 100644 test cases/failing/78 unfound run/test.json delete mode 100644 test cases/failing/79 framework dependency with version/meson.build delete mode 100644 test cases/failing/79 framework dependency with version/test.json create mode 100644 test cases/failing/79 override exe config/foo.c create mode 100644 test cases/failing/79 override exe config/meson.build create mode 100644 test cases/failing/79 override exe config/test.json create mode 100644 test cases/failing/80 gl dependency with version/meson.build create mode 100644 test cases/failing/80 gl dependency with version/test.json delete mode 100644 test cases/failing/80 override exe config/foo.c delete mode 100644 test cases/failing/80 override exe config/meson.build delete mode 100644 test cases/failing/80 override exe config/test.json delete mode 100644 test cases/failing/81 gl dependency with version/meson.build delete mode 100644 test cases/failing/81 gl dependency with version/test.json create mode 100644 test cases/failing/81 threads dependency with version/meson.build create mode 100644 test cases/failing/81 threads dependency with version/test.json create mode 100644 test cases/failing/82 gtest dependency with version/meson.build create mode 100644 test cases/failing/82 gtest dependency with version/test.json delete mode 100644 test cases/failing/82 threads dependency with version/meson.build delete mode 100644 test cases/failing/82 threads dependency with version/test.json create mode 100644 test cases/failing/83 dub libray/meson.build create mode 100644 test cases/failing/83 dub libray/test.json delete mode 100644 test cases/failing/83 gtest dependency with version/meson.build delete mode 100644 test cases/failing/83 gtest dependency with version/test.json create mode 100644 test cases/failing/84 dub executable/meson.build create mode 100644 test cases/failing/84 dub executable/test.json delete mode 100644 test cases/failing/84 dub libray/meson.build delete mode 100644 test cases/failing/84 dub libray/test.json create mode 100644 test cases/failing/85 dub compiler/meson.build create mode 100644 test cases/failing/85 dub compiler/test.json delete mode 100644 test cases/failing/85 dub executable/meson.build delete mode 100644 test cases/failing/85 dub executable/test.json delete mode 100644 test cases/failing/86 dub compiler/meson.build delete mode 100644 test cases/failing/86 dub compiler/test.json create mode 100644 test cases/failing/86 subproj not-found dep/meson.build create mode 100644 test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build create mode 100644 test cases/failing/86 subproj not-found dep/test.json create mode 100644 test cases/failing/87 invalid configure file/input create mode 100644 test cases/failing/87 invalid configure file/meson.build create mode 100644 test cases/failing/87 invalid configure file/test.json delete mode 100644 test cases/failing/87 subproj not-found dep/meson.build delete mode 100644 test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build delete mode 100644 test cases/failing/87 subproj not-found dep/test.json delete mode 100644 test cases/failing/88 invalid configure file/input delete mode 100644 test cases/failing/88 invalid configure file/meson.build delete mode 100644 test cases/failing/88 invalid configure file/test.json create mode 100644 test cases/failing/88 kwarg dupe/meson.build create mode 100644 test cases/failing/88 kwarg dupe/prog.c create mode 100644 test cases/failing/88 kwarg dupe/test.json delete mode 100644 test cases/failing/89 kwarg dupe/meson.build delete mode 100644 test cases/failing/89 kwarg dupe/prog.c delete mode 100644 test cases/failing/89 kwarg dupe/test.json create mode 100644 test cases/failing/89 missing pch file/meson.build create mode 100644 test cases/failing/89 missing pch file/prog.c create mode 100644 test cases/failing/89 missing pch file/test.json delete mode 100644 test cases/failing/90 missing pch file/meson.build delete mode 100644 test cases/failing/90 missing pch file/prog.c delete mode 100644 test cases/failing/90 missing pch file/test.json create mode 100644 test cases/failing/90 pch source different folder/include/pch.h create mode 100644 test cases/failing/90 pch source different folder/meson.build create mode 100644 test cases/failing/90 pch source different folder/prog.c create mode 100644 test cases/failing/90 pch source different folder/src/pch.c create mode 100644 test cases/failing/90 pch source different folder/test.json delete mode 100644 test cases/failing/91 pch source different folder/include/pch.h delete mode 100644 test cases/failing/91 pch source different folder/meson.build delete mode 100644 test cases/failing/91 pch source different folder/prog.c delete mode 100644 test cases/failing/91 pch source different folder/src/pch.c delete mode 100644 test cases/failing/91 pch source different folder/test.json create mode 100644 test cases/failing/91 unknown config tool/meson.build create mode 100644 test cases/failing/91 unknown config tool/test.json create mode 100644 test cases/failing/92 custom target install data/Info.plist.cpp create mode 100644 test cases/failing/92 custom target install data/meson.build create mode 100644 test cases/failing/92 custom target install data/preproc.py create mode 100644 test cases/failing/92 custom target install data/test.json delete mode 100644 test cases/failing/92 unknown config tool/meson.build delete mode 100644 test cases/failing/92 unknown config tool/test.json create mode 100644 test cases/failing/93 add dict non string key/meson.build create mode 100644 test cases/failing/93 add dict non string key/test.json delete mode 100644 test cases/failing/93 custom target install data/Info.plist.cpp delete mode 100644 test cases/failing/93 custom target install data/meson.build delete mode 100644 test cases/failing/93 custom target install data/preproc.py delete mode 100644 test cases/failing/93 custom target install data/test.json create mode 100644 test cases/failing/94 add dict duplicate keys/meson.build create mode 100644 test cases/failing/94 add dict duplicate keys/test.json delete mode 100644 test cases/failing/94 add dict non string key/meson.build delete mode 100644 test cases/failing/94 add dict non string key/test.json delete mode 100644 test cases/failing/95 add dict duplicate keys/meson.build delete mode 100644 test cases/failing/95 add dict duplicate keys/test.json create mode 100644 test cases/failing/95 no host get_external_property/meson.build create mode 100644 test cases/failing/95 no host get_external_property/test.json delete mode 100644 test cases/failing/96 no host get_external_property/meson.build delete mode 100644 test cases/failing/96 no host get_external_property/test.json create mode 100644 test cases/failing/96 no native compiler/main.c create mode 100644 test cases/failing/96 no native compiler/meson.build create mode 100644 test cases/failing/96 no native compiler/test.json delete mode 100644 test cases/failing/97 no native compiler/main.c delete mode 100644 test cases/failing/97 no native compiler/meson.build delete mode 100644 test cases/failing/97 no native compiler/test.json create mode 100644 test cases/failing/97 subdir parse error/meson.build create mode 100644 test cases/failing/97 subdir parse error/subdir/meson.build create mode 100644 test cases/failing/97 subdir parse error/test.json create mode 100644 test cases/failing/98 invalid option file/meson.build create mode 100644 test cases/failing/98 invalid option file/meson_options.txt create mode 100644 test cases/failing/98 invalid option file/test.json delete mode 100644 test cases/failing/98 subdir parse error/meson.build delete mode 100644 test cases/failing/98 subdir parse error/subdir/meson.build delete mode 100644 test cases/failing/98 subdir parse error/test.json delete mode 100644 test cases/failing/99 invalid option file/meson.build delete mode 100644 test cases/failing/99 invalid option file/meson_options.txt delete mode 100644 test cases/failing/99 invalid option file/test.json create mode 100644 test cases/failing/99 no lang/main.c create mode 100644 test cases/failing/99 no lang/meson.build create mode 100644 test cases/failing/99 no lang/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 delete mode 100644 test cases/unit/104 strip/lib.c delete mode 100644 test cases/unit/104 strip/meson.build create mode 100644 test cases/unit/39 external, internal library rpath/built library/bar.c create mode 100644 test cases/unit/39 external, internal library rpath/built library/meson.build create mode 100644 test cases/unit/39 external, internal library rpath/built library/meson_options.txt create mode 100644 test cases/unit/39 external, internal library rpath/built library/prog.c create mode 100644 test cases/unit/39 external, internal library rpath/external library/bar.c create mode 100644 test cases/unit/39 external, internal library rpath/external library/faa.c create mode 100644 test cases/unit/39 external, internal library rpath/external library/foo.c create mode 100644 test cases/unit/39 external, internal library rpath/external library/meson.build delete mode 100644 test cases/unit/40 external, internal library rpath/built library/bar.c delete mode 100644 test cases/unit/40 external, internal library rpath/built library/meson.build delete mode 100644 test cases/unit/40 external, internal library rpath/built library/meson_options.txt delete mode 100644 test cases/unit/40 external, internal library rpath/built library/prog.c delete mode 100644 test cases/unit/40 external, internal library rpath/external library/bar.c delete mode 100644 test cases/unit/40 external, internal library rpath/external library/faa.c delete mode 100644 test cases/unit/40 external, internal library rpath/external library/foo.c delete mode 100644 test cases/unit/40 external, internal library rpath/external library/meson.build create mode 100644 test cases/unit/40 featurenew subprojects/meson.build create mode 100644 test cases/unit/40 featurenew subprojects/subprojects/bar/meson.build create mode 100644 test cases/unit/40 featurenew subprojects/subprojects/baz/meson.build create mode 100644 test cases/unit/40 featurenew subprojects/subprojects/foo/meson.build delete mode 100644 test cases/unit/41 featurenew subprojects/meson.build delete mode 100644 test cases/unit/41 featurenew subprojects/subprojects/bar/meson.build delete mode 100644 test cases/unit/41 featurenew subprojects/subprojects/baz/meson.build delete mode 100644 test cases/unit/41 featurenew subprojects/subprojects/foo/meson.build create mode 100644 test cases/unit/41 rpath order/meson.build create mode 100644 test cases/unit/41 rpath order/myexe.c create mode 100644 test cases/unit/41 rpath order/subprojects/sub1/lib.c create mode 100644 test cases/unit/41 rpath order/subprojects/sub1/meson.build create mode 100644 test cases/unit/41 rpath order/subprojects/sub2/lib.c create mode 100644 test cases/unit/41 rpath order/subprojects/sub2/meson.build create mode 100644 test cases/unit/42 dep order/lib1.c create mode 100644 test cases/unit/42 dep order/lib2.c create mode 100644 test cases/unit/42 dep order/meson.build create mode 100644 test cases/unit/42 dep order/myexe.c delete mode 100644 test cases/unit/42 rpath order/meson.build delete mode 100644 test cases/unit/42 rpath order/myexe.c delete mode 100644 test cases/unit/42 rpath order/subprojects/sub1/lib.c delete mode 100644 test cases/unit/42 rpath order/subprojects/sub1/meson.build delete mode 100644 test cases/unit/42 rpath order/subprojects/sub2/lib.c delete mode 100644 test cases/unit/42 rpath order/subprojects/sub2/meson.build delete mode 100644 test cases/unit/43 dep order/lib1.c delete mode 100644 test cases/unit/43 dep order/lib2.c delete mode 100644 test cases/unit/43 dep order/meson.build delete mode 100644 test cases/unit/43 dep order/myexe.c create mode 100644 test cases/unit/43 promote wrap/meson.build create mode 100644 test cases/unit/43 promote wrap/subprojects/s1/meson.build create mode 100644 test cases/unit/43 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build create mode 100644 test cases/unit/43 promote wrap/subprojects/s2/meson.build create mode 100644 test cases/unit/43 promote wrap/subprojects/s2/subprojects/ambiguous.wrap delete mode 100644 test cases/unit/44 promote wrap/meson.build delete mode 100644 test cases/unit/44 promote wrap/subprojects/s1/meson.build delete mode 100644 test cases/unit/44 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build delete mode 100644 test cases/unit/44 promote wrap/subprojects/s2/meson.build delete mode 100644 test cases/unit/44 promote wrap/subprojects/s2/subprojects/ambiguous.wrap create mode 100644 test cases/unit/44 vscpp17/main.cpp create mode 100644 test cases/unit/44 vscpp17/meson.build create mode 100755 test cases/unit/45 native dep pkgconfig var/cross_pkgconfig.py create mode 100644 test cases/unit/45 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc create mode 100644 test cases/unit/45 native dep pkgconfig var/meson.build create mode 100644 test cases/unit/45 native dep pkgconfig var/meson_options.txt create mode 100644 test cases/unit/45 native dep pkgconfig var/native_pkgconfig/dep_tester.pc delete mode 100644 test cases/unit/45 vscpp17/main.cpp delete mode 100644 test cases/unit/45 vscpp17/meson.build delete mode 100755 test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py delete mode 100644 test cases/unit/46 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc delete mode 100644 test cases/unit/46 native dep pkgconfig var/meson.build delete mode 100644 test cases/unit/46 native dep pkgconfig var/meson_options.txt delete mode 100644 test cases/unit/46 native dep pkgconfig var/native_pkgconfig/dep_tester.pc create mode 100644 test cases/unit/46 native file binary/meson.build create mode 100644 test cases/unit/46 native file binary/meson_options.txt delete mode 100644 test cases/unit/47 native file binary/meson.build delete mode 100644 test cases/unit/47 native file binary/meson_options.txt create mode 100644 test cases/unit/47 reconfigure/main.c create mode 100644 test cases/unit/47 reconfigure/meson.build create mode 100644 test cases/unit/47 reconfigure/meson_options.txt create mode 100644 test cases/unit/47 reconfigure/subprojects/sub1/meson.build delete mode 100644 test cases/unit/48 reconfigure/main.c delete mode 100644 test cases/unit/48 reconfigure/meson.build delete mode 100644 test cases/unit/48 reconfigure/meson_options.txt delete mode 100644 test cases/unit/48 reconfigure/subprojects/sub1/meson.build create mode 100644 test cases/unit/48 testsetup default/envcheck.py create mode 100644 test cases/unit/48 testsetup default/meson.build create mode 100644 test cases/unit/49 pkgconfig csharp library/meson.build create mode 100644 test cases/unit/49 pkgconfig csharp library/somelib.cs delete mode 100644 test cases/unit/49 testsetup default/envcheck.py delete mode 100644 test cases/unit/49 testsetup default/meson.build create mode 100644 test cases/unit/50 noncross options/meson.build create mode 100644 test cases/unit/50 noncross options/prog.c create mode 100644 test cases/unit/50 noncross options/ylib.pc delete mode 100644 test cases/unit/50 pkgconfig csharp library/meson.build delete mode 100644 test cases/unit/50 pkgconfig csharp library/somelib.cs create mode 100644 test cases/unit/51 ldflagdedup/bob.c create mode 100644 test cases/unit/51 ldflagdedup/meson.build create mode 100644 test cases/unit/51 ldflagdedup/prog.c delete mode 100644 test cases/unit/51 noncross options/meson.build delete mode 100644 test cases/unit/51 noncross options/prog.c delete mode 100644 test cases/unit/51 noncross options/ylib.pc delete mode 100644 test cases/unit/52 ldflagdedup/bob.c delete mode 100644 test cases/unit/52 ldflagdedup/meson.build delete mode 100644 test cases/unit/52 ldflagdedup/prog.c create mode 100644 test cases/unit/52 pkgconfig static link order/meson.build create mode 100644 test cases/unit/53 clang-format/.clang-format create mode 100644 test cases/unit/53 clang-format/dummydir.h/dummy.dat create mode 100644 test cases/unit/53 clang-format/header_expected_h create mode 100644 test cases/unit/53 clang-format/header_orig_h create mode 100644 test cases/unit/53 clang-format/meson.build create mode 100644 test cases/unit/53 clang-format/prog_expected_c create mode 100644 test cases/unit/53 clang-format/prog_orig_c delete mode 100644 test cases/unit/53 pkgconfig static link order/meson.build delete mode 100644 test cases/unit/54 clang-format/.clang-format delete mode 100644 test cases/unit/54 clang-format/dummydir.h/dummy.dat delete mode 100644 test cases/unit/54 clang-format/header_expected_h delete mode 100644 test cases/unit/54 clang-format/header_orig_h delete mode 100644 test cases/unit/54 clang-format/meson.build delete mode 100644 test cases/unit/54 clang-format/prog_expected_c delete mode 100644 test cases/unit/54 clang-format/prog_orig_c create mode 100644 test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson.build create mode 100644 test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson_options.txt create mode 100644 test cases/unit/55 dedup compiler libs/app/app.c create mode 100644 test cases/unit/55 dedup compiler libs/app/meson.build create mode 100644 test cases/unit/55 dedup compiler libs/liba/liba.c create mode 100644 test cases/unit/55 dedup compiler libs/liba/liba.h create mode 100644 test cases/unit/55 dedup compiler libs/liba/meson.build create mode 100644 test cases/unit/55 dedup compiler libs/libb/libb.c create mode 100644 test cases/unit/55 dedup compiler libs/libb/libb.h create mode 100644 test cases/unit/55 dedup compiler libs/libb/meson.build create mode 100644 test cases/unit/55 dedup compiler libs/meson.build delete mode 100644 test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson.build delete mode 100644 test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson_options.txt delete mode 100644 test cases/unit/56 dedup compiler libs/app/app.c delete mode 100644 test cases/unit/56 dedup compiler libs/app/meson.build delete mode 100644 test cases/unit/56 dedup compiler libs/liba/liba.c delete mode 100644 test cases/unit/56 dedup compiler libs/liba/liba.h delete mode 100644 test cases/unit/56 dedup compiler libs/liba/meson.build delete mode 100644 test cases/unit/56 dedup compiler libs/libb/libb.c delete mode 100644 test cases/unit/56 dedup compiler libs/libb/libb.h delete mode 100644 test cases/unit/56 dedup compiler libs/libb/meson.build delete mode 100644 test cases/unit/56 dedup compiler libs/meson.build create mode 100644 test cases/unit/56 introspection/cp.py create mode 100644 test cases/unit/56 introspection/meson.build create mode 100644 test cases/unit/56 introspection/meson_options.txt create mode 100644 test cases/unit/56 introspection/sharedlib/meson.build create mode 100644 test cases/unit/56 introspection/sharedlib/shared.cpp create mode 100644 test cases/unit/56 introspection/sharedlib/shared.hpp create mode 100644 test cases/unit/56 introspection/staticlib/meson.build create mode 100644 test cases/unit/56 introspection/staticlib/static.c create mode 100644 test cases/unit/56 introspection/staticlib/static.h create mode 100644 test cases/unit/56 introspection/t1.cpp create mode 100644 test cases/unit/56 introspection/t2.cpp create mode 100644 test cases/unit/56 introspection/t3.cpp delete mode 100644 test cases/unit/57 introspection/cp.py delete mode 100644 test cases/unit/57 introspection/meson.build delete mode 100644 test cases/unit/57 introspection/meson_options.txt delete mode 100644 test cases/unit/57 introspection/sharedlib/meson.build delete mode 100644 test cases/unit/57 introspection/sharedlib/shared.cpp delete mode 100644 test cases/unit/57 introspection/sharedlib/shared.hpp delete mode 100644 test cases/unit/57 introspection/staticlib/meson.build delete mode 100644 test cases/unit/57 introspection/staticlib/static.c delete mode 100644 test cases/unit/57 introspection/staticlib/static.h delete mode 100644 test cases/unit/57 introspection/t1.cpp delete mode 100644 test cases/unit/57 introspection/t2.cpp delete mode 100644 test cases/unit/57 introspection/t3.cpp create mode 100644 test cases/unit/57 pkg_config_path option/build_extra_path/totally_made_up_dep.pc create mode 100644 test cases/unit/57 pkg_config_path option/host_extra_path/totally_made_up_dep.pc create mode 100644 test cases/unit/57 pkg_config_path option/meson.build create mode 100644 test cases/unit/58 introspect buildoptions/c_compiler.py create mode 100644 test cases/unit/58 introspect buildoptions/main.c create mode 100644 test cases/unit/58 introspect buildoptions/meson.build create mode 100644 test cases/unit/58 introspect buildoptions/meson_options.txt create mode 100644 test cases/unit/58 introspect buildoptions/subprojects/evilFile.txt create mode 100644 test cases/unit/58 introspect buildoptions/subprojects/projectA/meson.build create mode 100644 test cases/unit/58 introspect buildoptions/subprojects/projectA/meson_options.txt create mode 100644 test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson.build create mode 100644 test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson_options.txt delete mode 100644 test cases/unit/58 pkg_config_path option/build_extra_path/totally_made_up_dep.pc delete mode 100644 test cases/unit/58 pkg_config_path option/host_extra_path/totally_made_up_dep.pc delete mode 100644 test cases/unit/58 pkg_config_path option/meson.build delete mode 100644 test cases/unit/59 introspect buildoptions/c_compiler.py delete mode 100644 test cases/unit/59 introspect buildoptions/main.c delete mode 100644 test cases/unit/59 introspect buildoptions/meson.build delete mode 100644 test cases/unit/59 introspect buildoptions/meson_options.txt delete mode 100644 test cases/unit/59 introspect buildoptions/subprojects/evilFile.txt delete mode 100644 test cases/unit/59 introspect buildoptions/subprojects/projectA/meson.build delete mode 100644 test cases/unit/59 introspect buildoptions/subprojects/projectA/meson_options.txt delete mode 100644 test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson.build delete mode 100644 test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson_options.txt create mode 100644 test cases/unit/59 native file override/crossfile create mode 100644 test cases/unit/59 native file override/crossfile2 create mode 100644 test cases/unit/59 native file override/meson.build create mode 100644 test cases/unit/59 native file override/meson_options.txt create mode 100644 test cases/unit/59 native file override/nativefile create mode 100755 test cases/unit/60 identity cross/build_wrapper.py create mode 100755 test cases/unit/60 identity cross/host_wrapper.py create mode 100644 test cases/unit/60 identity cross/meson.build create mode 100644 test cases/unit/60 identity cross/stuff.h delete mode 100644 test cases/unit/60 native file override/crossfile delete mode 100644 test cases/unit/60 native file override/crossfile2 delete mode 100644 test cases/unit/60 native file override/meson.build delete mode 100644 test cases/unit/60 native file override/meson_options.txt delete mode 100644 test cases/unit/60 native file override/nativefile delete mode 100755 test cases/unit/61 identity cross/build_wrapper.py delete mode 100755 test cases/unit/61 identity cross/host_wrapper.py delete mode 100644 test cases/unit/61 identity cross/meson.build delete mode 100644 test cases/unit/61 identity cross/stuff.h create mode 100644 test cases/unit/61 pkgconfig relative paths/pkgconfig/librelativepath.pc create mode 100644 test cases/unit/62 cmake_prefix_path/meson.build create mode 100644 test cases/unit/62 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake delete mode 100644 test cases/unit/62 pkgconfig relative paths/pkgconfig/librelativepath.pc create mode 100644 test cases/unit/63 cmake parser/meson.build create mode 100644 test cases/unit/63 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake delete mode 100644 test cases/unit/63 cmake_prefix_path/meson.build delete mode 100644 test cases/unit/63 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake create mode 100644 test cases/unit/64 alias target/main.c create mode 100644 test cases/unit/64 alias target/meson.build create mode 100644 test cases/unit/64 alias target/subdir/meson.build delete mode 100644 test cases/unit/64 cmake parser/meson.build delete mode 100644 test cases/unit/64 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake delete mode 100644 test cases/unit/65 alias target/main.c delete mode 100644 test cases/unit/65 alias target/meson.build delete mode 100644 test cases/unit/65 alias target/subdir/meson.build create mode 100644 test cases/unit/65 static archive stripping/app/appA.c create mode 100644 test cases/unit/65 static archive stripping/app/appB.c create mode 100644 test cases/unit/65 static archive stripping/app/meson.build create mode 100644 test cases/unit/65 static archive stripping/lib/libA.c create mode 100644 test cases/unit/65 static archive stripping/lib/libA.h create mode 100644 test cases/unit/65 static archive stripping/lib/libB.c create mode 100644 test cases/unit/65 static archive stripping/lib/libB.h create mode 100644 test cases/unit/65 static archive stripping/lib/meson.build delete mode 100644 test cases/unit/66 static archive stripping/app/appA.c delete mode 100644 test cases/unit/66 static archive stripping/app/appB.c delete mode 100644 test cases/unit/66 static archive stripping/app/meson.build delete mode 100644 test cases/unit/66 static archive stripping/lib/libA.c delete mode 100644 test cases/unit/66 static archive stripping/lib/libA.h delete mode 100644 test cases/unit/66 static archive stripping/lib/libB.c delete mode 100644 test cases/unit/66 static archive stripping/lib/libB.h delete mode 100644 test cases/unit/66 static archive stripping/lib/meson.build create mode 100644 test cases/unit/66 static link/lib/func1.c create mode 100644 test cases/unit/66 static link/lib/func10.c create mode 100644 test cases/unit/66 static link/lib/func11.c create mode 100644 test cases/unit/66 static link/lib/func12.c create mode 100644 test cases/unit/66 static link/lib/func14.c create mode 100644 test cases/unit/66 static link/lib/func15.c create mode 100644 test cases/unit/66 static link/lib/func16.c create mode 100644 test cases/unit/66 static link/lib/func17.c create mode 100644 test cases/unit/66 static link/lib/func18.c create mode 100644 test cases/unit/66 static link/lib/func19.c create mode 100644 test cases/unit/66 static link/lib/func2.c create mode 100644 test cases/unit/66 static link/lib/func3.c create mode 100644 test cases/unit/66 static link/lib/func4.c create mode 100644 test cases/unit/66 static link/lib/func5.c create mode 100644 test cases/unit/66 static link/lib/func6.c create mode 100644 test cases/unit/66 static link/lib/func7.c create mode 100644 test cases/unit/66 static link/lib/func8.c create mode 100644 test cases/unit/66 static link/lib/func9.c create mode 100644 test cases/unit/66 static link/lib/meson.build create mode 100644 test cases/unit/66 static link/meson.build create mode 100644 test cases/unit/66 static link/test1.c create mode 100644 test cases/unit/66 static link/test2.c create mode 100644 test cases/unit/66 static link/test3.c create mode 100644 test cases/unit/66 static link/test4.c create mode 100644 test cases/unit/66 static link/test5.c delete mode 100644 test cases/unit/67 static link/lib/func1.c delete mode 100644 test cases/unit/67 static link/lib/func10.c delete mode 100644 test cases/unit/67 static link/lib/func11.c delete mode 100644 test cases/unit/67 static link/lib/func12.c delete mode 100644 test cases/unit/67 static link/lib/func14.c delete mode 100644 test cases/unit/67 static link/lib/func15.c delete mode 100644 test cases/unit/67 static link/lib/func16.c delete mode 100644 test cases/unit/67 static link/lib/func17.c delete mode 100644 test cases/unit/67 static link/lib/func18.c delete mode 100644 test cases/unit/67 static link/lib/func19.c delete mode 100644 test cases/unit/67 static link/lib/func2.c delete mode 100644 test cases/unit/67 static link/lib/func3.c delete mode 100644 test cases/unit/67 static link/lib/func4.c delete mode 100644 test cases/unit/67 static link/lib/func5.c delete mode 100644 test cases/unit/67 static link/lib/func6.c delete mode 100644 test cases/unit/67 static link/lib/func7.c delete mode 100644 test cases/unit/67 static link/lib/func8.c delete mode 100644 test cases/unit/67 static link/lib/func9.c delete mode 100644 test cases/unit/67 static link/lib/meson.build delete mode 100644 test cases/unit/67 static link/meson.build delete mode 100644 test cases/unit/67 static link/test1.c delete mode 100644 test cases/unit/67 static link/test2.c delete mode 100644 test cases/unit/67 static link/test3.c delete mode 100644 test cases/unit/67 static link/test4.c delete mode 100644 test cases/unit/67 static link/test5.c create mode 100644 test cases/unit/67 test env value/meson.build create mode 100755 test cases/unit/67 test env value/test.py create mode 100644 test cases/unit/68 clang-tidy/.clang-tidy create mode 100644 test cases/unit/68 clang-tidy/cttest.cpp create mode 100644 test cases/unit/68 clang-tidy/dummydir.h/dummy.dat create mode 100644 test cases/unit/68 clang-tidy/meson.build delete mode 100644 test cases/unit/68 test env value/meson.build delete mode 100755 test cases/unit/68 test env value/test.py delete mode 100644 test cases/unit/69 clang-tidy/.clang-tidy delete mode 100644 test cases/unit/69 clang-tidy/cttest.cpp delete mode 100644 test cases/unit/69 clang-tidy/dummydir.h/dummy.dat delete mode 100644 test cases/unit/69 clang-tidy/meson.build create mode 100644 test cases/unit/69 cross/crossfile.in create mode 100644 test cases/unit/69 cross/meson.build create mode 100644 test cases/unit/69 cross/meson_options.txt create mode 100755 test cases/unit/70 cross test passed/exewrapper.py create mode 100644 test cases/unit/70 cross test passed/meson.build create mode 100644 test cases/unit/70 cross test passed/meson_options.txt create mode 100644 test cases/unit/70 cross test passed/script.py create mode 100644 test cases/unit/70 cross test passed/src/main.c delete mode 100644 test cases/unit/70 cross/crossfile.in delete mode 100644 test cases/unit/70 cross/meson.build delete mode 100644 test cases/unit/70 cross/meson_options.txt delete mode 100755 test cases/unit/71 cross test passed/exewrapper.py delete mode 100644 test cases/unit/71 cross test passed/meson.build delete mode 100644 test cases/unit/71 cross test passed/meson_options.txt delete mode 100644 test cases/unit/71 cross test passed/script.py delete mode 100644 test cases/unit/71 cross test passed/src/main.c create mode 100644 test cases/unit/71 summary/meson.build create mode 100644 test cases/unit/71 summary/meson_options.txt create mode 100644 test cases/unit/71 summary/subprojects/sub/meson.build create mode 100644 test cases/unit/71 summary/subprojects/sub2/meson.build create mode 100644 test cases/unit/71 summary/subprojects/sub2/subprojects/subsub/meson.build delete mode 100644 test cases/unit/72 summary/meson.build delete mode 100644 test cases/unit/72 summary/meson_options.txt delete mode 100644 test cases/unit/72 summary/subprojects/sub/meson.build delete mode 100644 test cases/unit/72 summary/subprojects/sub2/meson.build delete mode 100644 test cases/unit/72 summary/subprojects/sub2/subprojects/subsub/meson.build create mode 100644 test cases/unit/72 wrap file url/meson.build create mode 100644 test cases/unit/72 wrap file url/subprojects/foo-patch.tar.xz create mode 100644 test cases/unit/72 wrap file url/subprojects/foo.tar.xz create mode 100644 test cases/unit/73 dep files/foo.c create mode 100644 test cases/unit/73 dep files/meson.build delete mode 100644 test cases/unit/73 wrap file url/meson.build delete mode 100644 test cases/unit/73 wrap file url/subprojects/foo-patch.tar.xz delete mode 100644 test cases/unit/73 wrap file url/subprojects/foo.tar.xz delete mode 100644 test cases/unit/74 dep files/foo.c delete mode 100644 test cases/unit/74 dep files/meson.build create mode 100644 test cases/unit/74 pkgconfig prefixes/client/client.c create mode 100644 test cases/unit/74 pkgconfig prefixes/client/meson.build create mode 100644 test cases/unit/74 pkgconfig prefixes/val1/meson.build create mode 100644 test cases/unit/74 pkgconfig prefixes/val1/val1.c create mode 100644 test cases/unit/74 pkgconfig prefixes/val1/val1.h create mode 100644 test cases/unit/74 pkgconfig prefixes/val2/meson.build create mode 100644 test cases/unit/74 pkgconfig prefixes/val2/val2.c create mode 100644 test cases/unit/74 pkgconfig prefixes/val2/val2.h delete mode 100644 test cases/unit/75 pkgconfig prefixes/client/client.c delete mode 100644 test cases/unit/75 pkgconfig prefixes/client/meson.build delete mode 100644 test cases/unit/75 pkgconfig prefixes/val1/meson.build delete mode 100644 test cases/unit/75 pkgconfig prefixes/val1/val1.c delete mode 100644 test cases/unit/75 pkgconfig prefixes/val1/val1.h delete mode 100644 test cases/unit/75 pkgconfig prefixes/val2/meson.build delete mode 100644 test cases/unit/75 pkgconfig prefixes/val2/val2.c delete mode 100644 test cases/unit/75 pkgconfig prefixes/val2/val2.h create mode 100644 test cases/unit/75 subdir libdir/meson.build create mode 100644 test cases/unit/75 subdir libdir/subprojects/flub/meson.build create mode 100644 test cases/unit/76 as link whole/bar.c create mode 100644 test cases/unit/76 as link whole/foo.c create mode 100644 test cases/unit/76 as link whole/meson.build delete mode 100644 test cases/unit/76 subdir libdir/meson.build delete mode 100644 test cases/unit/76 subdir libdir/subprojects/flub/meson.build delete mode 100644 test cases/unit/77 as link whole/bar.c delete mode 100644 test cases/unit/77 as link whole/foo.c delete mode 100644 test cases/unit/77 as link whole/meson.build create mode 100644 test cases/unit/77 nostdlib/meson.build create mode 100644 test cases/unit/77 nostdlib/prog.c create mode 100644 test cases/unit/77 nostdlib/subprojects/mylibc/libc.c create mode 100644 test cases/unit/77 nostdlib/subprojects/mylibc/meson.build create mode 100644 test cases/unit/77 nostdlib/subprojects/mylibc/stdio.h create mode 100644 test cases/unit/77 nostdlib/subprojects/mylibc/stubstart.s delete mode 100644 test cases/unit/78 nostdlib/meson.build delete mode 100644 test cases/unit/78 nostdlib/prog.c delete mode 100644 test cases/unit/78 nostdlib/subprojects/mylibc/libc.c delete mode 100644 test cases/unit/78 nostdlib/subprojects/mylibc/meson.build delete mode 100644 test cases/unit/78 nostdlib/subprojects/mylibc/stdio.h delete mode 100644 test cases/unit/78 nostdlib/subprojects/mylibc/stubstart.s create mode 100644 test cases/unit/78 user options for subproject/.gitignore create mode 100644 test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore create mode 100644 test cases/unit/78 user options for subproject/75 user options for subproject/meson.build create mode 100644 test cases/unit/79 global-rpath/meson.build create mode 100644 test cases/unit/79 global-rpath/rpathified.cpp create mode 100644 test cases/unit/79 global-rpath/yonder/meson.build create mode 100644 test cases/unit/79 global-rpath/yonder/yonder.cpp create mode 100644 test cases/unit/79 global-rpath/yonder/yonder.h delete mode 100644 test cases/unit/79 user options for subproject/.gitignore delete mode 100644 test cases/unit/79 user options for subproject/75 user options for subproject/.gitignore delete mode 100644 test cases/unit/79 user options for subproject/75 user options for subproject/meson.build delete mode 100644 test cases/unit/80 global-rpath/meson.build delete mode 100644 test cases/unit/80 global-rpath/rpathified.cpp delete mode 100644 test cases/unit/80 global-rpath/yonder/meson.build delete mode 100644 test cases/unit/80 global-rpath/yonder/yonder.cpp delete mode 100644 test cases/unit/80 global-rpath/yonder/yonder.h create mode 100644 test cases/unit/80 wrap-git/meson.build create mode 100644 test cases/unit/80 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build create mode 100644 test cases/unit/80 wrap-git/subprojects/wrap_git_upstream/main.c create mode 100644 test cases/unit/81 meson version compare/meson.build create mode 100644 test cases/unit/81 meson version compare/subprojects/foo/meson.build delete mode 100644 test cases/unit/81 wrap-git/meson.build delete mode 100644 test cases/unit/81 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build delete mode 100644 test cases/unit/81 wrap-git/subprojects/wrap_git_upstream/main.c create mode 100644 test cases/unit/82 cross only introspect/meson.build delete mode 100644 test cases/unit/82 meson version compare/meson.build delete mode 100644 test cases/unit/82 meson version compare/subprojects/foo/meson.build create mode 100644 test cases/unit/83 change option choices/meson.build create mode 100644 test cases/unit/83 change option choices/meson_options.1.txt create mode 100644 test cases/unit/83 change option choices/meson_options.2.txt delete mode 100644 test cases/unit/83 cross only introspect/meson.build delete mode 100644 test cases/unit/84 change option choices/meson.build delete mode 100644 test cases/unit/84 change option choices/meson_options.1.txt delete mode 100644 test cases/unit/84 change option choices/meson_options.2.txt create mode 100644 test cases/unit/84 nested subproject regenerate depends/main.c create mode 100644 test cases/unit/84 nested subproject regenerate depends/meson.build create mode 100644 test cases/unit/84 nested subproject regenerate depends/subprojects/sub1/meson.build create mode 100644 test cases/unit/84 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt create mode 100644 test cases/unit/85 cpp modules/main.cpp create mode 100644 test cases/unit/85 cpp modules/meson.build create mode 100644 test cases/unit/85 cpp modules/src0.ixx create mode 100644 test cases/unit/85 cpp modules/src1.ixx create mode 100644 test cases/unit/85 cpp modules/src2.ixx create mode 100644 test cases/unit/85 cpp modules/src3.ixx create mode 100644 test cases/unit/85 cpp modules/src4.ixx create mode 100644 test cases/unit/85 cpp modules/src5.ixx create mode 100644 test cases/unit/85 cpp modules/src6.ixx create mode 100644 test cases/unit/85 cpp modules/src7.ixx create mode 100644 test cases/unit/85 cpp modules/src8.ixx create mode 100644 test cases/unit/85 cpp modules/src9.ixx delete mode 100644 test cases/unit/85 nested subproject regenerate depends/main.c delete mode 100644 test cases/unit/85 nested subproject regenerate depends/meson.build delete mode 100644 test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build delete mode 100644 test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt delete mode 100644 test cases/unit/86 cpp modules/main.cpp delete mode 100644 test cases/unit/86 cpp modules/meson.build delete mode 100644 test cases/unit/86 cpp modules/src0.ixx delete mode 100644 test cases/unit/86 cpp modules/src1.ixx delete mode 100644 test cases/unit/86 cpp modules/src2.ixx delete mode 100644 test cases/unit/86 cpp modules/src3.ixx delete mode 100644 test cases/unit/86 cpp modules/src4.ixx delete mode 100644 test cases/unit/86 cpp modules/src5.ixx delete mode 100644 test cases/unit/86 cpp modules/src6.ixx delete mode 100644 test cases/unit/86 cpp modules/src7.ixx delete mode 100644 test cases/unit/86 cpp modules/src8.ixx delete mode 100644 test cases/unit/86 cpp modules/src9.ixx create mode 100644 test cases/unit/86 prelinking/file1.c create mode 100644 test cases/unit/86 prelinking/file2.c create mode 100644 test cases/unit/86 prelinking/file3.c create mode 100644 test cases/unit/86 prelinking/file4.c create mode 100644 test cases/unit/86 prelinking/main.c create mode 100644 test cases/unit/86 prelinking/meson.build create mode 100644 test cases/unit/86 prelinking/private_header.h create mode 100644 test cases/unit/86 prelinking/public_header.h delete mode 100644 test cases/unit/87 prelinking/file1.c delete mode 100644 test cases/unit/87 prelinking/file2.c delete mode 100644 test cases/unit/87 prelinking/file3.c delete mode 100644 test cases/unit/87 prelinking/file4.c delete mode 100644 test cases/unit/87 prelinking/main.c delete mode 100644 test cases/unit/87 prelinking/meson.build delete mode 100644 test cases/unit/87 prelinking/private_header.h delete mode 100644 test cases/unit/87 prelinking/public_header.h create mode 100644 test cases/unit/87 run native test/main.c create mode 100644 test cases/unit/87 run native test/meson.build create mode 100644 test cases/unit/88 multiple envvars/meson.build create mode 100644 test cases/unit/88 multiple envvars/prog.c create mode 100644 test cases/unit/88 multiple envvars/prog.cpp delete mode 100644 test cases/unit/88 run native test/main.c delete mode 100644 test cases/unit/88 run native test/meson.build delete mode 100644 test cases/unit/89 multiple envvars/meson.build delete mode 100644 test cases/unit/89 multiple envvars/prog.c delete mode 100644 test cases/unit/89 multiple envvars/prog.cpp create mode 100644 test cases/unit/89 pkgconfig build rpath order/dummy.pc create mode 100644 test cases/unit/89 pkgconfig build rpath order/meson.build create mode 100644 test cases/unit/89 pkgconfig build rpath order/prog.c create mode 100644 test cases/unit/89 pkgconfig build rpath order/prog.cc create mode 100644 test cases/unit/89 pkgconfig build rpath order/sub/meson.build create mode 100644 test cases/unit/89 pkgconfig build rpath order/sub/stuff.c create mode 100644 test cases/unit/90 devenv/main.c create mode 100644 test cases/unit/90 devenv/meson.build create mode 100644 test cases/unit/90 devenv/subprojects/sub/foo.c create mode 100644 test cases/unit/90 devenv/subprojects/sub/meson.build create mode 100755 test cases/unit/90 devenv/test-devenv.py delete mode 100644 test cases/unit/90 pkgconfig build rpath order/dummy.pc delete mode 100644 test cases/unit/90 pkgconfig build rpath order/meson.build delete mode 100644 test cases/unit/90 pkgconfig build rpath order/prog.c delete mode 100644 test cases/unit/90 pkgconfig build rpath order/prog.cc delete mode 100644 test cases/unit/90 pkgconfig build rpath order/sub/meson.build delete mode 100644 test cases/unit/90 pkgconfig build rpath order/sub/stuff.c delete mode 100644 test cases/unit/91 devenv/main.c delete mode 100644 test cases/unit/91 devenv/meson.build delete mode 100644 test cases/unit/91 devenv/subprojects/sub/foo.c delete mode 100644 test cases/unit/91 devenv/subprojects/sub/meson.build delete mode 100755 test cases/unit/91 devenv/test-devenv.py 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/failing/100 no glib-compile-resources/meson.build b/test cases/failing/100 no glib-compile-resources/meson.build new file mode 100644 index 0000000..aae0569 --- /dev/null +++ b/test cases/failing/100 no glib-compile-resources/meson.build @@ -0,0 +1,8 @@ +project('no glib-compile-resources') + +if find_program('glib-compile-resources', required: false).found() + error('MESON_SKIP_TEST test only applicable when glib-compile-resources is missing.') +endif + +gnome = import('gnome') +res = gnome.compile_resources('resources', 'trivial.gresource.xml') diff --git a/test cases/failing/100 no glib-compile-resources/test.json b/test cases/failing/100 no glib-compile-resources/test.json new file mode 100644 index 0000000..ad9ba29 --- /dev/null +++ b/test cases/failing/100 no glib-compile-resources/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/100 no glib-compile-resources/meson.build:8:0: ERROR: Program 'glib-compile-resources' not found or not executable" + } + ] +} diff --git a/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml b/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml new file mode 100644 index 0000000..1447b98 --- /dev/null +++ b/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml @@ -0,0 +1,3 @@ + + + diff --git a/test cases/failing/100 no lang/main.c b/test cases/failing/100 no lang/main.c deleted file mode 100644 index 9b6bdc2..0000000 --- a/test cases/failing/100 no lang/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/failing/100 no lang/meson.build b/test cases/failing/100 no lang/meson.build deleted file mode 100644 index 85c5db8..0000000 --- a/test cases/failing/100 no lang/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('target without lang') -executable('main', 'main.c') diff --git a/test cases/failing/100 no lang/test.json b/test cases/failing/100 no lang/test.json deleted file mode 100644 index a74adaf..0000000 --- a/test cases/failing/100 no lang/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/100 no lang/meson.build:2:0: ERROR: No host machine compiler for 'main.c'" - } - ] -} diff --git a/test cases/failing/101 no glib-compile-resources/meson.build b/test cases/failing/101 no glib-compile-resources/meson.build deleted file mode 100644 index aae0569..0000000 --- a/test cases/failing/101 no glib-compile-resources/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('no glib-compile-resources') - -if find_program('glib-compile-resources', required: false).found() - error('MESON_SKIP_TEST test only applicable when glib-compile-resources is missing.') -endif - -gnome = import('gnome') -res = gnome.compile_resources('resources', 'trivial.gresource.xml') diff --git a/test cases/failing/101 no glib-compile-resources/test.json b/test cases/failing/101 no glib-compile-resources/test.json deleted file mode 100644 index 7f0c02c..0000000 --- a/test cases/failing/101 no glib-compile-resources/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/101 no glib-compile-resources/meson.build:8:0: ERROR: Program 'glib-compile-resources' not found or not executable" - } - ] -} diff --git a/test cases/failing/101 no glib-compile-resources/trivial.gresource.xml b/test cases/failing/101 no glib-compile-resources/trivial.gresource.xml deleted file mode 100644 index 1447b98..0000000 --- a/test cases/failing/101 no glib-compile-resources/trivial.gresource.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/test cases/failing/101 number in combo/meson.build b/test cases/failing/101 number in combo/meson.build new file mode 100644 index 0000000..1a647df --- /dev/null +++ b/test cases/failing/101 number in combo/meson.build @@ -0,0 +1 @@ +project('number in combo') diff --git a/test cases/failing/101 number in combo/nativefile.ini b/test cases/failing/101 number in combo/nativefile.ini new file mode 100644 index 0000000..55f10fc --- /dev/null +++ b/test cases/failing/101 number in combo/nativefile.ini @@ -0,0 +1,2 @@ +[built-in options] +optimization = 1 diff --git a/test cases/failing/101 number in combo/test.json b/test cases/failing/101 number in combo/test.json new file mode 100644 index 0000000..5d37df1 --- /dev/null +++ b/test cases/failing/101 number in combo/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "test cases/failing/101 number in combo/meson.build:1:0: ERROR: Value \"1\" (of type \"number\") for combo option \"Optimization level\" is not one of the choices. Possible choices are (as string): \"0\", \"g\", \"1\", \"2\", \"3\", \"s\"." } + ] +} diff --git a/test cases/failing/102 bool in combo/meson.build b/test cases/failing/102 bool in combo/meson.build new file mode 100644 index 0000000..c5efd67 --- /dev/null +++ b/test cases/failing/102 bool in combo/meson.build @@ -0,0 +1 @@ +project('bool in combo') diff --git a/test cases/failing/102 bool in combo/meson_options.txt b/test cases/failing/102 bool in combo/meson_options.txt new file mode 100644 index 0000000..0c8f5de --- /dev/null +++ b/test cases/failing/102 bool in combo/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'opt', + type : 'combo', + choices : ['true', 'false'] +) diff --git a/test cases/failing/102 bool in combo/nativefile.ini b/test cases/failing/102 bool in combo/nativefile.ini new file mode 100644 index 0000000..b423957 --- /dev/null +++ b/test cases/failing/102 bool in combo/nativefile.ini @@ -0,0 +1,2 @@ +[project options] +opt = true diff --git a/test cases/failing/102 bool in combo/test.json b/test cases/failing/102 bool in combo/test.json new file mode 100644 index 0000000..c0041af --- /dev/null +++ b/test cases/failing/102 bool in combo/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "test cases/failing/102 bool in combo/meson.build:1:0: ERROR: Value \"True\" (of type \"boolean\") for combo option \"opt\" is not one of the choices. Possible choices are (as string): \"true\", \"false\"." } + ] +} diff --git a/test cases/failing/102 number in combo/meson.build b/test cases/failing/102 number in combo/meson.build deleted file mode 100644 index 1a647df..0000000 --- a/test cases/failing/102 number in combo/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('number in combo') diff --git a/test cases/failing/102 number in combo/nativefile.ini b/test cases/failing/102 number in combo/nativefile.ini deleted file mode 100644 index 55f10fc..0000000 --- a/test cases/failing/102 number in combo/nativefile.ini +++ /dev/null @@ -1,2 +0,0 @@ -[built-in options] -optimization = 1 diff --git a/test cases/failing/102 number in combo/test.json b/test cases/failing/102 number in combo/test.json deleted file mode 100644 index 8e70a60..0000000 --- a/test cases/failing/102 number in combo/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "stdout": [ - { "line": "test cases/failing/102 number in combo/meson.build:1:0: ERROR: Value \"1\" (of type \"number\") for combo option \"Optimization level\" is not one of the choices. Possible choices are (as string): \"0\", \"g\", \"1\", \"2\", \"3\", \"s\"." } - ] -} diff --git a/test cases/failing/103 bool in combo/meson.build b/test cases/failing/103 bool in combo/meson.build deleted file mode 100644 index c5efd67..0000000 --- a/test cases/failing/103 bool in combo/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('bool in combo') diff --git a/test cases/failing/103 bool in combo/meson_options.txt b/test cases/failing/103 bool in combo/meson_options.txt deleted file mode 100644 index 0c8f5de..0000000 --- a/test cases/failing/103 bool in combo/meson_options.txt +++ /dev/null @@ -1,5 +0,0 @@ -option( - 'opt', - type : 'combo', - choices : ['true', 'false'] -) diff --git a/test cases/failing/103 bool in combo/nativefile.ini b/test cases/failing/103 bool in combo/nativefile.ini deleted file mode 100644 index b423957..0000000 --- a/test cases/failing/103 bool in combo/nativefile.ini +++ /dev/null @@ -1,2 +0,0 @@ -[project options] -opt = true diff --git a/test cases/failing/103 bool in combo/test.json b/test cases/failing/103 bool in combo/test.json deleted file mode 100644 index 48d4cc3..0000000 --- a/test cases/failing/103 bool in combo/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "stdout": [ - { "line": "test cases/failing/103 bool in combo/meson.build:1:0: ERROR: Value \"True\" (of type \"boolean\") for combo option \"opt\" is not one of the choices. Possible choices are (as string): \"true\", \"false\"." } - ] -} diff --git a/test cases/failing/103 compiler no lang/meson.build b/test cases/failing/103 compiler no lang/meson.build new file mode 100644 index 0000000..366bbdd --- /dev/null +++ b/test cases/failing/103 compiler no lang/meson.build @@ -0,0 +1,2 @@ +project('compiler without lang') +meson.get_compiler('c') diff --git a/test cases/failing/103 compiler no lang/test.json b/test cases/failing/103 compiler no lang/test.json new file mode 100644 index 0000000..123dcb9 --- /dev/null +++ b/test cases/failing/103 compiler no lang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/103 compiler no lang/meson.build:2:6: ERROR: Tried to access compiler for language \"c\", not specified for host machine." + } + ] +} diff --git a/test cases/failing/104 compiler no lang/meson.build b/test cases/failing/104 compiler no lang/meson.build deleted file mode 100644 index 366bbdd..0000000 --- a/test cases/failing/104 compiler no lang/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('compiler without lang') -meson.get_compiler('c') diff --git a/test cases/failing/104 compiler no lang/test.json b/test cases/failing/104 compiler no lang/test.json deleted file mode 100644 index d8cc96e..0000000 --- a/test cases/failing/104 compiler no lang/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/104 compiler no lang/meson.build:2:6: ERROR: Tried to access compiler for language \"c\", not specified for host machine." - } - ] -} diff --git a/test cases/failing/104 no fallback/meson.build b/test cases/failing/104 no fallback/meson.build new file mode 100644 index 0000000..0101bb8 --- /dev/null +++ b/test cases/failing/104 no fallback/meson.build @@ -0,0 +1,2 @@ +project('no fallback', 'c') +foob_dep = dependency('foob', allow_fallback: false, required: true) diff --git a/test cases/failing/104 no fallback/subprojects/foob/meson.build b/test cases/failing/104 no fallback/subprojects/foob/meson.build new file mode 100644 index 0000000..b2c4814 --- /dev/null +++ b/test cases/failing/104 no fallback/subprojects/foob/meson.build @@ -0,0 +1,2 @@ +project('foob', 'c') +meson.override_dependency('foob', declare_dependency()) diff --git a/test cases/failing/104 no fallback/test.json b/test cases/failing/104 no fallback/test.json new file mode 100644 index 0000000..e034061 --- /dev/null +++ b/test cases/failing/104 no fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:0: ERROR: (Pkg-config binary for machine MachineChoice\\.HOST not found\\. Giving up\\.|Dependency \"foob\" not found, tried .*)" + } + ] +} diff --git a/test cases/failing/105 feature require/meson.build b/test cases/failing/105 feature require/meson.build new file mode 100644 index 0000000..d976ae8 --- /dev/null +++ b/test cases/failing/105 feature require/meson.build @@ -0,0 +1,2 @@ +project('no fallback', 'c') +foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available') diff --git a/test cases/failing/105 feature require/meson_options.txt b/test cases/failing/105 feature require/meson_options.txt new file mode 100644 index 0000000..5910a87 --- /dev/null +++ b/test cases/failing/105 feature require/meson_options.txt @@ -0,0 +1 @@ +option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/105 feature require/test.json b/test cases/failing/105 feature require/test.json new file mode 100644 index 0000000..7c4640d --- /dev/null +++ b/test cases/failing/105 feature require/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled: frobnicator not available" + } + ] +} diff --git a/test cases/failing/105 no fallback/meson.build b/test cases/failing/105 no fallback/meson.build deleted file mode 100644 index 0101bb8..0000000 --- a/test cases/failing/105 no fallback/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback', 'c') -foob_dep = dependency('foob', allow_fallback: false, required: true) diff --git a/test cases/failing/105 no fallback/subprojects/foob/meson.build b/test cases/failing/105 no fallback/subprojects/foob/meson.build deleted file mode 100644 index b2c4814..0000000 --- a/test cases/failing/105 no fallback/subprojects/foob/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('foob', 'c') -meson.override_dependency('foob', declare_dependency()) diff --git a/test cases/failing/105 no fallback/test.json b/test cases/failing/105 no fallback/test.json deleted file mode 100644 index e034061..0000000 --- a/test cases/failing/105 no fallback/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:0: ERROR: (Pkg-config binary for machine MachineChoice\\.HOST not found\\. Giving up\\.|Dependency \"foob\" not found, tried .*)" - } - ] -} diff --git a/test cases/failing/106 feature require.bis/meson.build b/test cases/failing/106 feature require.bis/meson.build new file mode 100644 index 0000000..08c099c --- /dev/null +++ b/test cases/failing/106 feature require.bis/meson.build @@ -0,0 +1,2 @@ +project('no fallback', 'c') +foo = get_option('reqfeature').require(false) diff --git a/test cases/failing/106 feature require.bis/meson_options.txt b/test cases/failing/106 feature require.bis/meson_options.txt new file mode 100644 index 0000000..5910a87 --- /dev/null +++ b/test cases/failing/106 feature require.bis/meson_options.txt @@ -0,0 +1 @@ +option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/106 feature require.bis/test.json b/test cases/failing/106 feature require.bis/test.json new file mode 100644 index 0000000..2583990 --- /dev/null +++ b/test cases/failing/106 feature require.bis/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled" + } + ] +} diff --git a/test cases/failing/106 feature require/meson.build b/test cases/failing/106 feature require/meson.build deleted file mode 100644 index d976ae8..0000000 --- a/test cases/failing/106 feature require/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback', 'c') -foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available') diff --git a/test cases/failing/106 feature require/meson_options.txt b/test cases/failing/106 feature require/meson_options.txt deleted file mode 100644 index 5910a87..0000000 --- a/test cases/failing/106 feature require/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/106 feature require/test.json b/test cases/failing/106 feature require/test.json deleted file mode 100644 index 7c4640d..0000000 --- a/test cases/failing/106 feature require/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled: frobnicator not available" - } - ] -} diff --git a/test cases/failing/107 feature require.bis/meson.build b/test cases/failing/107 feature require.bis/meson.build deleted file mode 100644 index 08c099c..0000000 --- a/test cases/failing/107 feature require.bis/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback', 'c') -foo = get_option('reqfeature').require(false) diff --git a/test cases/failing/107 feature require.bis/meson_options.txt b/test cases/failing/107 feature require.bis/meson_options.txt deleted file mode 100644 index 5910a87..0000000 --- a/test cases/failing/107 feature require.bis/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/107 feature require.bis/test.json b/test cases/failing/107 feature require.bis/test.json deleted file mode 100644 index 2583990..0000000 --- a/test cases/failing/107 feature require.bis/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:0: ERROR: Feature reqfeature cannot be enabled" - } - ] -} diff --git a/test cases/failing/107 no build get_external_property/meson.build b/test cases/failing/107 no build get_external_property/meson.build new file mode 100644 index 0000000..8a4215c --- /dev/null +++ b/test cases/failing/107 no build get_external_property/meson.build @@ -0,0 +1,3 @@ +project('missing property') + +message(meson.get_external_property('nonexisting', native : true)) diff --git a/test cases/failing/107 no build get_external_property/test.json b/test cases/failing/107 no build get_external_property/test.json new file mode 100644 index 0000000..b95427e --- /dev/null +++ b/test cases/failing/107 no build get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/107 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting" + } + ] +} diff --git a/test cases/failing/108 enter subdir twice/meson.build b/test cases/failing/108 enter subdir twice/meson.build new file mode 100644 index 0000000..9343233 --- /dev/null +++ b/test cases/failing/108 enter subdir twice/meson.build @@ -0,0 +1,3 @@ +project('subdir2', 'c') +subdir('sub') +subdir('sub') diff --git a/test cases/failing/108 enter subdir twice/sub/meson.build b/test cases/failing/108 enter subdir twice/sub/meson.build new file mode 100644 index 0000000..d036a3f --- /dev/null +++ b/test cases/failing/108 enter subdir twice/sub/meson.build @@ -0,0 +1 @@ +message('Now in subdir') diff --git a/test cases/failing/108 enter subdir twice/test.json b/test cases/failing/108 enter subdir twice/test.json new file mode 100644 index 0000000..0a8e127 --- /dev/null +++ b/test cases/failing/108 enter subdir twice/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/108 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." + } + ] +} diff --git a/test cases/failing/108 no build get_external_property/meson.build b/test cases/failing/108 no build get_external_property/meson.build deleted file mode 100644 index 8a4215c..0000000 --- a/test cases/failing/108 no build get_external_property/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('missing property') - -message(meson.get_external_property('nonexisting', native : true)) diff --git a/test cases/failing/108 no build get_external_property/test.json b/test cases/failing/108 no build get_external_property/test.json deleted file mode 100644 index d2827f4..0000000 --- a/test cases/failing/108 no build get_external_property/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/108 no build get_external_property/meson.build:3:0: ERROR: Unknown property for build machine: nonexisting" - } - ] -} diff --git a/test cases/failing/109 enter subdir twice/meson.build b/test cases/failing/109 enter subdir twice/meson.build deleted file mode 100644 index 9343233..0000000 --- a/test cases/failing/109 enter subdir twice/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('subdir2', 'c') -subdir('sub') -subdir('sub') diff --git a/test cases/failing/109 enter subdir twice/sub/meson.build b/test cases/failing/109 enter subdir twice/sub/meson.build deleted file mode 100644 index d036a3f..0000000 --- a/test cases/failing/109 enter subdir twice/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -message('Now in subdir') diff --git a/test cases/failing/109 enter subdir twice/test.json b/test cases/failing/109 enter subdir twice/test.json deleted file mode 100644 index f7a526c..0000000 --- a/test cases/failing/109 enter subdir twice/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/109 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." - } - ] -} diff --git a/test cases/failing/109 invalid fstring/109 invalid fstring/meson.build b/test cases/failing/109 invalid fstring/109 invalid fstring/meson.build new file mode 100644 index 0000000..dd22f56 --- /dev/null +++ b/test cases/failing/109 invalid fstring/109 invalid fstring/meson.build @@ -0,0 +1,4 @@ +project('invalid-fstring', 'c') + +dict = {'key': true} +s = f'invalid fstring: @dict@' diff --git a/test cases/failing/109 invalid fstring/109 invalid fstring/test.json b/test cases/failing/109 invalid fstring/109 invalid fstring/test.json new file mode 100644 index 0000000..71d8f59 --- /dev/null +++ b/test cases/failing/109 invalid fstring/109 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/109 invalid fstring/meson.build:4:0: ERROR: Identifier \"dict\" does not name a formattable variable (has to be an integer, a string, a floating point number or a boolean)." + } + ] +} diff --git a/test cases/failing/109 invalid fstring/meson.build b/test cases/failing/109 invalid fstring/meson.build new file mode 100644 index 0000000..973df30 --- /dev/null +++ b/test cases/failing/109 invalid fstring/meson.build @@ -0,0 +1,3 @@ +project('invalid-fstring', 'c') + +z = f'invalid fstring: @foo@' diff --git a/test cases/failing/109 invalid fstring/test.json b/test cases/failing/109 invalid fstring/test.json new file mode 100644 index 0000000..a095d62 --- /dev/null +++ b/test cases/failing/109 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/109 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." + } + ] +} diff --git a/test cases/failing/110 compiler argument checking/meson.build b/test cases/failing/110 compiler argument checking/meson.build new file mode 100644 index 0000000..bb1f447 --- /dev/null +++ b/test cases/failing/110 compiler argument checking/meson.build @@ -0,0 +1,4 @@ +project('compiler argument checking test', 'c') + +cc = meson.get_compiler('c') +add_project_arguments(cc.get_supported_arguments('-meson-goober-arg-for-testing', checked : 'require'), language : 'c') diff --git a/test cases/failing/110 compiler argument checking/test.json b/test cases/failing/110 compiler argument checking/test.json new file mode 100644 index 0000000..3de6acb --- /dev/null +++ b/test cases/failing/110 compiler argument checking/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/110 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" + } + ] +} diff --git a/test cases/failing/111 empty fallback/meson.build b/test cases/failing/111 empty fallback/meson.build new file mode 100644 index 0000000..f4eb5fe --- /dev/null +++ b/test cases/failing/111 empty fallback/meson.build @@ -0,0 +1,6 @@ +project('empty fallback') + +# There is a subproject named 'foo' that overrides that dependency, +# but `fallback: []` should not allow to use it. Same behaviour than with +# `allow_fallback: false` +dependency('foo', fallback: []) diff --git a/test cases/failing/111 empty fallback/subprojects/foo/meson.build b/test cases/failing/111 empty fallback/subprojects/foo/meson.build new file mode 100644 index 0000000..c9e134b --- /dev/null +++ b/test cases/failing/111 empty fallback/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo') + +meson.override_dependency('foo', declare_dependency()) diff --git a/test cases/failing/111 empty fallback/test.json b/test cases/failing/111 empty fallback/test.json new file mode 100644 index 0000000..02db40b --- /dev/null +++ b/test cases/failing/111 empty fallback/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/111 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake" + } + ] +} diff --git a/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build b/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build deleted file mode 100644 index dd22f56..0000000 --- a/test cases/failing/111 invalid fstring/109 invalid fstring/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('invalid-fstring', 'c') - -dict = {'key': true} -s = f'invalid fstring: @dict@' diff --git a/test cases/failing/111 invalid fstring/109 invalid fstring/test.json b/test cases/failing/111 invalid fstring/109 invalid fstring/test.json deleted file mode 100644 index 71d8f59..0000000 --- a/test cases/failing/111 invalid fstring/109 invalid fstring/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/109 invalid fstring/meson.build:4:0: ERROR: Identifier \"dict\" does not name a formattable variable (has to be an integer, a string, a floating point number or a boolean)." - } - ] -} diff --git a/test cases/failing/111 invalid fstring/meson.build b/test cases/failing/111 invalid fstring/meson.build deleted file mode 100644 index 973df30..0000000 --- a/test cases/failing/111 invalid fstring/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('invalid-fstring', 'c') - -z = f'invalid fstring: @foo@' diff --git a/test cases/failing/111 invalid fstring/test.json b/test cases/failing/111 invalid fstring/test.json deleted file mode 100644 index 89ec40c..0000000 --- a/test cases/failing/111 invalid fstring/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/111 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." - } - ] -} diff --git a/test cases/failing/112 cmake executable dependency/meson.build b/test cases/failing/112 cmake executable dependency/meson.build new file mode 100644 index 0000000..bfb03ef --- /dev/null +++ b/test cases/failing/112 cmake executable dependency/meson.build @@ -0,0 +1,9 @@ +project('cmake-executable-dependency', ['c', 'cpp']) + +if not find_program('cmake', required: false).found() + error('MESON_SKIP_TEST CMake is not installed') +endif + +cmake = import('cmake') +cmlib = cmake.subproject('cmlib') +maind = cmlib.dependency('main') diff --git a/test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt new file mode 100644 index 0000000..0067879 --- /dev/null +++ b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.5) + +project(cmlib) + +add_executable(main main.c) diff --git a/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/112 cmake executable dependency/test.json b/test cases/failing/112 cmake executable dependency/test.json new file mode 100644 index 0000000..c1ccf6c --- /dev/null +++ b/test cases/failing/112 cmake executable dependency/test.json @@ -0,0 +1,10 @@ +{ + "stdout": [ + { + "line": "test cases/failing/112 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead." + } + ], + "tools": { + "cmake": ">=3.14" + } +} diff --git a/test cases/failing/112 compiler argument checking/meson.build b/test cases/failing/112 compiler argument checking/meson.build deleted file mode 100644 index bb1f447..0000000 --- a/test cases/failing/112 compiler argument checking/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('compiler argument checking test', 'c') - -cc = meson.get_compiler('c') -add_project_arguments(cc.get_supported_arguments('-meson-goober-arg-for-testing', checked : 'require'), language : 'c') diff --git a/test cases/failing/112 compiler argument checking/test.json b/test cases/failing/112 compiler argument checking/test.json deleted file mode 100644 index f4728db..0000000 --- a/test cases/failing/112 compiler argument checking/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/112 compiler argument checking/meson.build:4:0: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" - } - ] -} diff --git a/test cases/failing/113 allow_fallback with fallback/meson.build b/test cases/failing/113 allow_fallback with fallback/meson.build new file mode 100644 index 0000000..2874e42 --- /dev/null +++ b/test cases/failing/113 allow_fallback with fallback/meson.build @@ -0,0 +1,3 @@ +project('fallback and allow_fallback') + +dependency('foo', fallback: 'foo', allow_fallback: false) diff --git a/test cases/failing/113 allow_fallback with fallback/test.json b/test cases/failing/113 allow_fallback with fallback/test.json new file mode 100644 index 0000000..58ed475 --- /dev/null +++ b/test cases/failing/113 allow_fallback with fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/113 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive" + } + ] +} + diff --git a/test cases/failing/113 empty fallback/meson.build b/test cases/failing/113 empty fallback/meson.build deleted file mode 100644 index f4eb5fe..0000000 --- a/test cases/failing/113 empty fallback/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('empty fallback') - -# There is a subproject named 'foo' that overrides that dependency, -# but `fallback: []` should not allow to use it. Same behaviour than with -# `allow_fallback: false` -dependency('foo', fallback: []) diff --git a/test cases/failing/113 empty fallback/subprojects/foo/meson.build b/test cases/failing/113 empty fallback/subprojects/foo/meson.build deleted file mode 100644 index c9e134b..0000000 --- a/test cases/failing/113 empty fallback/subprojects/foo/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('foo') - -meson.override_dependency('foo', declare_dependency()) diff --git a/test cases/failing/113 empty fallback/test.json b/test cases/failing/113 empty fallback/test.json deleted file mode 100644 index c8ed212..0000000 --- a/test cases/failing/113 empty fallback/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/113 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found, tried pkgconfig and cmake" - } - ] -} diff --git a/test cases/failing/114 cmake executable dependency/meson.build b/test cases/failing/114 cmake executable dependency/meson.build deleted file mode 100644 index bfb03ef..0000000 --- a/test cases/failing/114 cmake executable dependency/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('cmake-executable-dependency', ['c', 'cpp']) - -if not find_program('cmake', required: false).found() - error('MESON_SKIP_TEST CMake is not installed') -endif - -cmake = import('cmake') -cmlib = cmake.subproject('cmlib') -maind = cmlib.dependency('main') diff --git a/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt deleted file mode 100644 index 0067879..0000000 --- a/test cases/failing/114 cmake executable dependency/subprojects/cmlib/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(cmlib) - -add_executable(main main.c) diff --git a/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c deleted file mode 100644 index 9b6bdc2..0000000 --- a/test cases/failing/114 cmake executable dependency/subprojects/cmlib/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/failing/114 cmake executable dependency/test.json b/test cases/failing/114 cmake executable dependency/test.json deleted file mode 100644 index 951f2e7..0000000 --- a/test cases/failing/114 cmake executable dependency/test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/114 cmake executable dependency/meson.build:9:0: ERROR: main is an executable and does not support the dependency() method. Use target() instead." - } - ], - "tools": { - "cmake": ">=3.14" - } -} diff --git a/test cases/failing/114 nonsensical bindgen/meson.build b/test cases/failing/114 nonsensical bindgen/meson.build new file mode 100644 index 0000000..6995f67 --- /dev/null +++ b/test cases/failing/114 nonsensical bindgen/meson.build @@ -0,0 +1,20 @@ +# SPDX-license-identifer: Apache-2.0 +# Copyright © 2021 Intel Corporation + +project('rustmod bindgen', 'c') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif + +prog_bindgen = find_program('bindgen', required : false) +if not prog_bindgen.found() + error('MESON_SKIP_TEST bindgen not found') +endif + +c_lib = static_library('clib', 'src/source.c') + +import('unstable-rust').bindgen( + input : c_lib, + output : 'header.rs', +) diff --git a/test cases/failing/114 nonsensical bindgen/src/header.h b/test cases/failing/114 nonsensical bindgen/src/header.h new file mode 100644 index 0000000..750621f --- /dev/null +++ b/test cases/failing/114 nonsensical bindgen/src/header.h @@ -0,0 +1,8 @@ +// SPDX-license-identifer: Apache-2.0 +// Copyright © 2021 Intel Corporation + +#pragma once + +#include + +int32_t add(const int32_t, const int32_t); diff --git a/test cases/failing/114 nonsensical bindgen/src/source.c b/test cases/failing/114 nonsensical bindgen/src/source.c new file mode 100644 index 0000000..d652d28 --- /dev/null +++ b/test cases/failing/114 nonsensical bindgen/src/source.c @@ -0,0 +1,8 @@ +// SPDX-license-identifer: Apache-2.0 +// Copyright © 2021 Intel Corporation + +#include "header.h" + +int32_t add(const int32_t first, const int32_t second) { + return first + second; +} diff --git a/test cases/failing/114 nonsensical bindgen/test.json b/test cases/failing/114 nonsensical bindgen/test.json new file mode 100644 index 0000000..bc85311 --- /dev/null +++ b/test cases/failing/114 nonsensical bindgen/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/114 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target" + } + ] +} + diff --git a/test cases/failing/115 allow_fallback with fallback/meson.build b/test cases/failing/115 allow_fallback with fallback/meson.build deleted file mode 100644 index 2874e42..0000000 --- a/test cases/failing/115 allow_fallback with fallback/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('fallback and allow_fallback') - -dependency('foo', fallback: 'foo', allow_fallback: false) diff --git a/test cases/failing/115 allow_fallback with fallback/test.json b/test cases/failing/115 allow_fallback with fallback/test.json deleted file mode 100644 index 6bdcc51..0000000 --- a/test cases/failing/115 allow_fallback with fallback/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/115 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive" - } - ] -} - diff --git a/test cases/failing/115 run_target in test/meson.build b/test cases/failing/115 run_target in test/meson.build new file mode 100644 index 0000000..db7cb30 --- /dev/null +++ b/test cases/failing/115 run_target in test/meson.build @@ -0,0 +1,4 @@ +project('trivial test', 'c') +exe = executable('trivialprog', 'trivial.c') +runt = run_target('invalid', command: ['echo', 'run_target']) +test('runtest', exe, args: runt) diff --git a/test cases/failing/115 run_target in test/test.json b/test cases/failing/115 run_target in test/test.json new file mode 100644 index 0000000..fce0c47 --- /dev/null +++ b/test cases/failing/115 run_target in test/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/115 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]" + } + ] +} + diff --git a/test cases/failing/115 run_target in test/trivial.c b/test cases/failing/115 run_target in test/trivial.c new file mode 100644 index 0000000..96612d4 --- /dev/null +++ b/test cases/failing/115 run_target in test/trivial.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("Trivial test is working.\n"); + return 0; +} diff --git a/test cases/failing/116 nonsensical bindgen/meson.build b/test cases/failing/116 nonsensical bindgen/meson.build deleted file mode 100644 index 6995f67..0000000 --- a/test cases/failing/116 nonsensical bindgen/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-license-identifer: Apache-2.0 -# Copyright © 2021 Intel Corporation - -project('rustmod bindgen', 'c') - -if not add_languages('rust', required: false) - error('MESON_SKIP_TEST test requires rust compiler') -endif - -prog_bindgen = find_program('bindgen', required : false) -if not prog_bindgen.found() - error('MESON_SKIP_TEST bindgen not found') -endif - -c_lib = static_library('clib', 'src/source.c') - -import('unstable-rust').bindgen( - input : c_lib, - output : 'header.rs', -) diff --git a/test cases/failing/116 nonsensical bindgen/src/header.h b/test cases/failing/116 nonsensical bindgen/src/header.h deleted file mode 100644 index 750621f..0000000 --- a/test cases/failing/116 nonsensical bindgen/src/header.h +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-license-identifer: Apache-2.0 -// Copyright © 2021 Intel Corporation - -#pragma once - -#include - -int32_t add(const int32_t, const int32_t); diff --git a/test cases/failing/116 nonsensical bindgen/src/source.c b/test cases/failing/116 nonsensical bindgen/src/source.c deleted file mode 100644 index d652d28..0000000 --- a/test cases/failing/116 nonsensical bindgen/src/source.c +++ /dev/null @@ -1,8 +0,0 @@ -// SPDX-license-identifer: Apache-2.0 -// Copyright © 2021 Intel Corporation - -#include "header.h" - -int32_t add(const int32_t first, const int32_t second) { - return first + second; -} diff --git a/test cases/failing/116 nonsensical bindgen/test.json b/test cases/failing/116 nonsensical bindgen/test.json deleted file mode 100644 index b0a38e8..0000000 --- a/test cases/failing/116 nonsensical bindgen/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/116 nonsensical bindgen/meson.build:17:24: ERROR: bindgen source file must be a C header, not an object or build target" - } - ] -} - diff --git a/test cases/failing/116 run_target in add_install_script/meson.build b/test cases/failing/116 run_target in add_install_script/meson.build new file mode 100644 index 0000000..9d37a39 --- /dev/null +++ b/test cases/failing/116 run_target in add_install_script/meson.build @@ -0,0 +1,4 @@ +project('trivial test', 'c') +exe = executable('trivialprog', 'trivial.c') +runt = run_target('invalid', command: ['echo', 'run_target']) +meson.add_install_script(exe, runt) diff --git a/test cases/failing/116 run_target in add_install_script/test.json b/test cases/failing/116 run_target in add_install_script/test.json new file mode 100644 index 0000000..621d510 --- /dev/null +++ b/test cases/failing/116 run_target in add_install_script/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/116 run_target in add_install_script/meson.build:4:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\"" + } + ] +} + diff --git a/test cases/failing/116 run_target in add_install_script/trivial.c b/test cases/failing/116 run_target in add_install_script/trivial.c new file mode 100644 index 0000000..1b14571 --- /dev/null +++ b/test cases/failing/116 run_target in add_install_script/trivial.c @@ -0,0 +1,11 @@ +#include + +int main(int argc, char **argv) { + FILE *fp = fopen(argv[1], "r"); + if (fp == NULL) { + perror("fopen"); + return 1; + } else { + return 0; + } +} diff --git a/test cases/failing/117 pathsep in install_symlink/meson.build b/test cases/failing/117 pathsep in install_symlink/meson.build new file mode 100644 index 0000000..cce82c2 --- /dev/null +++ b/test cases/failing/117 pathsep in install_symlink/meson.build @@ -0,0 +1,3 @@ +project('symlink_pathsep') + +install_symlink('foo/bar', pointing_to: '/usr/baz/bar', install_dir: '/usr') diff --git a/test cases/failing/117 pathsep in install_symlink/test.json b/test cases/failing/117 pathsep in install_symlink/test.json new file mode 100644 index 0000000..aa35619 --- /dev/null +++ b/test cases/failing/117 pathsep in install_symlink/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/117 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir." + } + ] +} diff --git a/test cases/failing/117 run_target in test/meson.build b/test cases/failing/117 run_target in test/meson.build deleted file mode 100644 index db7cb30..0000000 --- a/test cases/failing/117 run_target in test/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('trivial test', 'c') -exe = executable('trivialprog', 'trivial.c') -runt = run_target('invalid', command: ['echo', 'run_target']) -test('runtest', exe, args: runt) diff --git a/test cases/failing/117 run_target in test/test.json b/test cases/failing/117 run_target in test/test.json deleted file mode 100644 index ad24367..0000000 --- a/test cases/failing/117 run_target in test/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/117 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type array[RunTarget] but should have been array[str | File | BuildTarget | CustomTarget | CustomTargetIndex]" - } - ] -} - diff --git a/test cases/failing/117 run_target in test/trivial.c b/test cases/failing/117 run_target in test/trivial.c deleted file mode 100644 index 96612d4..0000000 --- a/test cases/failing/117 run_target in test/trivial.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("Trivial test is working.\n"); - return 0; -} diff --git a/test cases/failing/118 run_target in add_install_script/meson.build b/test cases/failing/118 run_target in add_install_script/meson.build deleted file mode 100644 index 9d37a39..0000000 --- a/test cases/failing/118 run_target in add_install_script/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('trivial test', 'c') -exe = executable('trivialprog', 'trivial.c') -runt = run_target('invalid', command: ['echo', 'run_target']) -meson.add_install_script(exe, runt) diff --git a/test cases/failing/118 run_target in add_install_script/test.json b/test cases/failing/118 run_target in add_install_script/test.json deleted file mode 100644 index a09b1a3..0000000 --- a/test cases/failing/118 run_target in add_install_script/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/118 run_target in add_install_script/meson.build:4:6: ERROR: meson.add_install_script argument 2 was of type \"RunTarget\" but should have been one of: \"str\", \"File\", \"BuildTarget\", \"CustomTarget\", \"CustomTargetIndex\", \"ExternalProgram\"" - } - ] -} - diff --git a/test cases/failing/118 run_target in add_install_script/trivial.c b/test cases/failing/118 run_target in add_install_script/trivial.c deleted file mode 100644 index 1b14571..0000000 --- a/test cases/failing/118 run_target in add_install_script/trivial.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -int main(int argc, char **argv) { - FILE *fp = fopen(argv[1], "r"); - if (fp == NULL) { - perror("fopen"); - return 1; - } else { - return 0; - } -} diff --git a/test cases/failing/118 subproject version conflict/meson.build b/test cases/failing/118 subproject version conflict/meson.build new file mode 100644 index 0000000..ffbcc13 --- /dev/null +++ b/test cases/failing/118 subproject version conflict/meson.build @@ -0,0 +1,4 @@ +project('120 subproject version conflict') + +A_dep = subproject('A').get_variable('A_dep') +B_dep = subproject('B', version: '1').get_variable('B_dep') diff --git a/test cases/failing/118 subproject version conflict/subprojects/A/meson.build b/test cases/failing/118 subproject version conflict/subprojects/A/meson.build new file mode 100644 index 0000000..7da4df0 --- /dev/null +++ b/test cases/failing/118 subproject version conflict/subprojects/A/meson.build @@ -0,0 +1,4 @@ +project('A') + +B_dep = subproject('B').get_variable('B_dep') +A_dep = declare_dependency(dependencies: B_dep) diff --git a/test cases/failing/118 subproject version conflict/subprojects/B/meson.build b/test cases/failing/118 subproject version conflict/subprojects/B/meson.build new file mode 100644 index 0000000..0ead934 --- /dev/null +++ b/test cases/failing/118 subproject version conflict/subprojects/B/meson.build @@ -0,0 +1,3 @@ +project('B', version: '100') + +B_dep = declare_dependency() diff --git a/test cases/failing/118 subproject version conflict/test.json b/test cases/failing/118 subproject version conflict/test.json new file mode 100644 index 0000000..a31511c --- /dev/null +++ b/test cases/failing/118 subproject version conflict/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/118 subproject version conflict/meson.build:4:0: ERROR: Subproject B version is 100 but ['1'] required." + } + ] +} diff --git a/test cases/failing/119 pathsep in install_symlink/meson.build b/test cases/failing/119 pathsep in install_symlink/meson.build deleted file mode 100644 index cce82c2..0000000 --- a/test cases/failing/119 pathsep in install_symlink/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('symlink_pathsep') - -install_symlink('foo/bar', pointing_to: '/usr/baz/bar', install_dir: '/usr') diff --git a/test cases/failing/119 pathsep in install_symlink/test.json b/test cases/failing/119 pathsep in install_symlink/test.json deleted file mode 100644 index 9df546a..0000000 --- a/test cases/failing/119 pathsep in install_symlink/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/119 pathsep in install_symlink/meson.build:3:0: ERROR: Link name is \"foo/bar\", but link names cannot contain path separators. The dir part should be in install_dir." - } - ] -} diff --git a/test cases/failing/119 structured source empty string/main.rs b/test cases/failing/119 structured source empty string/main.rs new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/119 structured source empty string/meson.build b/test cases/failing/119 structured source empty string/meson.build new file mode 100644 index 0000000..0715991 --- /dev/null +++ b/test cases/failing/119 structured source empty string/meson.build @@ -0,0 +1,13 @@ +project('structured_source with empty string key') + +if not add_languages(['rust'], required : false, native : false) + error('MESON_SKIP_TEST: Rust is required but not found.') +endif + +executable( + 'main', + structured_sources( + 'main.rs', + {'' : 'main.rs'}, + ) +) diff --git a/test cases/failing/119 structured source empty string/test.json b/test cases/failing/119 structured source empty string/test.json new file mode 100644 index 0000000..3d41fc2 --- /dev/null +++ b/test cases/failing/119 structured source empty string/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/119 structured source empty string/meson.build:7:0: ERROR: structured_sources: keys to dictionary argument may not be an empty string." + } + ] +} diff --git a/test cases/failing/120 structured_sources conflicts/main.rs b/test cases/failing/120 structured_sources conflicts/main.rs new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/120 structured_sources conflicts/meson.build b/test cases/failing/120 structured_sources conflicts/meson.build new file mode 100644 index 0000000..561ad86 --- /dev/null +++ b/test cases/failing/120 structured_sources conflicts/meson.build @@ -0,0 +1,17 @@ +project('structured_source with empty string key') + +if not add_languages(['rust'], required : false, native : false) + error('MESON_SKIP_TEST: Rust is required but not found.') +endif + +executable( + 'main', + [ + structured_sources( + 'main.rs', + ), + structured_sources( + 'main.rs', + ), + ], +) diff --git a/test cases/failing/120 structured_sources conflicts/test.json b/test cases/failing/120 structured_sources conflicts/test.json new file mode 100644 index 0000000..2f3d1ef --- /dev/null +++ b/test cases/failing/120 structured_sources conflicts/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/120 structured_sources conflicts/meson.build:7:0: ERROR: Conflicting sources in structured sources: main.rs" + } + ] +} diff --git a/test cases/failing/120 subproject version conflict/meson.build b/test cases/failing/120 subproject version conflict/meson.build deleted file mode 100644 index ffbcc13..0000000 --- a/test cases/failing/120 subproject version conflict/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('120 subproject version conflict') - -A_dep = subproject('A').get_variable('A_dep') -B_dep = subproject('B', version: '1').get_variable('B_dep') diff --git a/test cases/failing/120 subproject version conflict/subprojects/A/meson.build b/test cases/failing/120 subproject version conflict/subprojects/A/meson.build deleted file mode 100644 index 7da4df0..0000000 --- a/test cases/failing/120 subproject version conflict/subprojects/A/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('A') - -B_dep = subproject('B').get_variable('B_dep') -A_dep = declare_dependency(dependencies: B_dep) diff --git a/test cases/failing/120 subproject version conflict/subprojects/B/meson.build b/test cases/failing/120 subproject version conflict/subprojects/B/meson.build deleted file mode 100644 index 0ead934..0000000 --- a/test cases/failing/120 subproject version conflict/subprojects/B/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('B', version: '100') - -B_dep = declare_dependency() diff --git a/test cases/failing/120 subproject version conflict/test.json b/test cases/failing/120 subproject version conflict/test.json deleted file mode 100644 index 7807d68..0000000 --- a/test cases/failing/120 subproject version conflict/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/120 subproject version conflict/meson.build:4:0: ERROR: Subproject B version is 100 but ['1'] required." - } - ] -} diff --git a/test cases/failing/121 missing compiler/meson.build b/test cases/failing/121 missing compiler/meson.build new file mode 100644 index 0000000..19bdd0c --- /dev/null +++ b/test cases/failing/121 missing compiler/meson.build @@ -0,0 +1,3 @@ +project('main project', 'c') + +subproject('sub') diff --git a/test cases/failing/121 missing compiler/subprojects/sub/main.c b/test cases/failing/121 missing compiler/subprojects/sub/main.c new file mode 100644 index 0000000..44e82e2 --- /dev/null +++ b/test cases/failing/121 missing compiler/subprojects/sub/main.c @@ -0,0 +1 @@ +int main(int argc, char *argv[]) { return 0; } diff --git a/test cases/failing/121 missing compiler/subprojects/sub/meson.build b/test cases/failing/121 missing compiler/subprojects/sub/meson.build new file mode 100644 index 0000000..b60850c --- /dev/null +++ b/test cases/failing/121 missing compiler/subprojects/sub/meson.build @@ -0,0 +1,4 @@ +project('sub') + +# Should fail because we did not add C language, even if parent project did. +executable('app', 'main.c') diff --git a/test cases/failing/121 missing compiler/test.json b/test cases/failing/121 missing compiler/test.json new file mode 100644 index 0000000..442e331 --- /dev/null +++ b/test cases/failing/121 missing compiler/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/121 missing compiler/subprojects/sub/meson.build:4:0: ERROR: No host machine compiler for 'subprojects/sub/main.c'" + } + ] +} diff --git a/test cases/failing/121 structured source empty string/main.rs b/test cases/failing/121 structured source empty string/main.rs deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/121 structured source empty string/meson.build b/test cases/failing/121 structured source empty string/meson.build deleted file mode 100644 index 0715991..0000000 --- a/test cases/failing/121 structured source empty string/meson.build +++ /dev/null @@ -1,13 +0,0 @@ -project('structured_source with empty string key') - -if not add_languages(['rust'], required : false, native : false) - error('MESON_SKIP_TEST: Rust is required but not found.') -endif - -executable( - 'main', - structured_sources( - 'main.rs', - {'' : 'main.rs'}, - ) -) diff --git a/test cases/failing/121 structured source empty string/test.json b/test cases/failing/121 structured source empty string/test.json deleted file mode 100644 index feb2af9..0000000 --- a/test cases/failing/121 structured source empty string/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/121 structured source empty string/meson.build:7:0: ERROR: structured_sources: keys to dictionary argument may not be an empty string." - } - ] -} diff --git a/test cases/failing/122 structured_sources conflicts/main.rs b/test cases/failing/122 structured_sources conflicts/main.rs deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/122 structured_sources conflicts/meson.build b/test cases/failing/122 structured_sources conflicts/meson.build deleted file mode 100644 index 561ad86..0000000 --- a/test cases/failing/122 structured_sources conflicts/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -project('structured_source with empty string key') - -if not add_languages(['rust'], required : false, native : false) - error('MESON_SKIP_TEST: Rust is required but not found.') -endif - -executable( - 'main', - [ - structured_sources( - 'main.rs', - ), - structured_sources( - 'main.rs', - ), - ], -) diff --git a/test cases/failing/122 structured_sources conflicts/test.json b/test cases/failing/122 structured_sources conflicts/test.json deleted file mode 100644 index 4833f86..0000000 --- a/test cases/failing/122 structured_sources conflicts/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/122 structured_sources conflicts/meson.build:7:0: ERROR: Conflicting sources in structured sources: main.rs" - } - ] -} diff --git a/test cases/failing/123 missing compiler/meson.build b/test cases/failing/123 missing compiler/meson.build deleted file mode 100644 index 19bdd0c..0000000 --- a/test cases/failing/123 missing compiler/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('main project', 'c') - -subproject('sub') diff --git a/test cases/failing/123 missing compiler/subprojects/sub/main.c b/test cases/failing/123 missing compiler/subprojects/sub/main.c deleted file mode 100644 index 44e82e2..0000000 --- a/test cases/failing/123 missing compiler/subprojects/sub/main.c +++ /dev/null @@ -1 +0,0 @@ -int main(int argc, char *argv[]) { return 0; } diff --git a/test cases/failing/123 missing compiler/subprojects/sub/meson.build b/test cases/failing/123 missing compiler/subprojects/sub/meson.build deleted file mode 100644 index b60850c..0000000 --- a/test cases/failing/123 missing compiler/subprojects/sub/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('sub') - -# Should fail because we did not add C language, even if parent project did. -executable('app', 'main.c') diff --git a/test cases/failing/123 missing compiler/test.json b/test cases/failing/123 missing compiler/test.json deleted file mode 100644 index 915df16..0000000 --- a/test cases/failing/123 missing compiler/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/123 missing compiler/subprojects/sub/meson.build:4:0: ERROR: No host machine compiler for 'subprojects/sub/main.c'" - } - ] -} diff --git a/test cases/failing/38 prefix absolute/meson.build b/test cases/failing/38 prefix absolute/meson.build new file mode 100644 index 0000000..e2863e7 --- /dev/null +++ b/test cases/failing/38 prefix absolute/meson.build @@ -0,0 +1,2 @@ +project('prefix-abs', 'c', + default_options : ['prefix=some/path/notabs']) diff --git a/test cases/failing/38 prefix absolute/test.json b/test cases/failing/38 prefix absolute/test.json new file mode 100644 index 0000000..859906c --- /dev/null +++ b/test cases/failing/38 prefix absolute/test.json @@ -0,0 +1,11 @@ +{ + "do_not_set_opts": [ + "prefix" + ], + "stdout": [ + { + "comment": "literal 'some/path/notabs' appears in output, irrespective of os.path.sep, as that's the prefix", + "line": "test cases/failing/38 prefix absolute/meson.build:1:0: ERROR: prefix value 'some/path/notabs' must be an absolute path" + } + ] +} diff --git a/test cases/failing/39 kwarg assign/dummy.c b/test cases/failing/39 kwarg assign/dummy.c new file mode 100644 index 0000000..16fcdd9 --- /dev/null +++ b/test cases/failing/39 kwarg assign/dummy.c @@ -0,0 +1,3 @@ +const char* dummy() { + return "I do nothing."; +} diff --git a/test cases/failing/39 kwarg assign/meson.build b/test cases/failing/39 kwarg assign/meson.build new file mode 100644 index 0000000..7d42521 --- /dev/null +++ b/test cases/failing/39 kwarg assign/meson.build @@ -0,0 +1,3 @@ +project('assign in kwarg', 'c') + +executable('prog', 'dummy.c', args = 'prog.c') diff --git a/test cases/failing/39 kwarg assign/prog.c b/test cases/failing/39 kwarg assign/prog.c new file mode 100644 index 0000000..11b7fad --- /dev/null +++ b/test cases/failing/39 kwarg assign/prog.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/test cases/failing/39 kwarg assign/test.json b/test cases/failing/39 kwarg assign/test.json new file mode 100644 index 0000000..8fd9d0f --- /dev/null +++ b/test cases/failing/39 kwarg assign/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/39 kwarg assign/meson.build:3:0: ERROR: Tried to assign values inside an argument list." + } + ] +} diff --git a/test cases/failing/39 prefix absolute/meson.build b/test cases/failing/39 prefix absolute/meson.build deleted file mode 100644 index e2863e7..0000000 --- a/test cases/failing/39 prefix absolute/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('prefix-abs', 'c', - default_options : ['prefix=some/path/notabs']) diff --git a/test cases/failing/39 prefix absolute/test.json b/test cases/failing/39 prefix absolute/test.json deleted file mode 100644 index 2770243..0000000 --- a/test cases/failing/39 prefix absolute/test.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "do_not_set_opts": [ - "prefix" - ], - "stdout": [ - { - "comment": "literal 'some/path/notabs' appears in output, irrespective of os.path.sep, as that's the prefix", - "line": "test cases/failing/39 prefix absolute/meson.build:1:0: ERROR: prefix value 'some/path/notabs' must be an absolute path" - } - ] -} diff --git a/test cases/failing/40 custom target plainname many inputs/1.txt b/test cases/failing/40 custom target plainname many inputs/1.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/test cases/failing/40 custom target plainname many inputs/1.txt @@ -0,0 +1 @@ +1 diff --git a/test cases/failing/40 custom target plainname many inputs/2.txt b/test cases/failing/40 custom target plainname many inputs/2.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/test cases/failing/40 custom target plainname many inputs/2.txt @@ -0,0 +1 @@ +2 diff --git a/test cases/failing/40 custom target plainname many inputs/catfiles.py b/test cases/failing/40 custom target plainname many inputs/catfiles.py new file mode 100644 index 0000000..1c53e24 --- /dev/null +++ b/test cases/failing/40 custom target plainname many inputs/catfiles.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python3 + +import sys + +out = sys.argv[-1] +with open(out, 'wb') as o: + for infile in sys.argv[1:-1]: + with open(infile, 'rb') as f: + o.write(f.read()) diff --git a/test cases/failing/40 custom target plainname many inputs/meson.build b/test cases/failing/40 custom target plainname many inputs/meson.build new file mode 100644 index 0000000..1bcfc06 --- /dev/null +++ b/test cases/failing/40 custom target plainname many inputs/meson.build @@ -0,0 +1,8 @@ +project('plain name many inputs', 'c') + +catfiles = find_program('catfiles.py') + +custom_target('plainname-inputs', + input : ['1.txt', '2.txt'], + output : '@PLAINNAME@.dat', + command : [catfiles, '@INPUT@', '@OUTPUT@']) diff --git a/test cases/failing/40 custom target plainname many inputs/test.json b/test cases/failing/40 custom target plainname many inputs/test.json new file mode 100644 index 0000000..05f4d49 --- /dev/null +++ b/test cases/failing/40 custom target plainname many inputs/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/40 custom target plainname many inputs/meson.build:5:0: ERROR: custom_target: output cannot containe \"@PLAINNAME@\" or \"@BASENAME@\" when there is more than one input (we can't know which to use)" + } + ] +} diff --git a/test cases/failing/40 kwarg assign/dummy.c b/test cases/failing/40 kwarg assign/dummy.c deleted file mode 100644 index 16fcdd9..0000000 --- a/test cases/failing/40 kwarg assign/dummy.c +++ /dev/null @@ -1,3 +0,0 @@ -const char* dummy() { - return "I do nothing."; -} diff --git a/test cases/failing/40 kwarg assign/meson.build b/test cases/failing/40 kwarg assign/meson.build deleted file mode 100644 index 7d42521..0000000 --- a/test cases/failing/40 kwarg assign/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('assign in kwarg', 'c') - -executable('prog', 'dummy.c', args = 'prog.c') diff --git a/test cases/failing/40 kwarg assign/prog.c b/test cases/failing/40 kwarg assign/prog.c deleted file mode 100644 index 11b7fad..0000000 --- a/test cases/failing/40 kwarg assign/prog.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char **argv) { - return 0; -} diff --git a/test cases/failing/40 kwarg assign/test.json b/test cases/failing/40 kwarg assign/test.json deleted file mode 100644 index 671eb3f..0000000 --- a/test cases/failing/40 kwarg assign/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/40 kwarg assign/meson.build:3:0: ERROR: Tried to assign values inside an argument list." - } - ] -} diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/generator.py b/test cases/failing/41 custom target outputs not matching install_dirs/generator.py new file mode 100755 index 0000000..4ac6179 --- /dev/null +++ b/test cases/failing/41 custom target outputs not matching install_dirs/generator.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import sys, os + +if len(sys.argv) != 3: + print(sys.argv[0], '', '') + +name = sys.argv[1] +odir = sys.argv[2] + +with open(os.path.join(odir, name + '.h'), 'w') as f: + f.write('int func();\n') +with open(os.path.join(odir, name + '.c'), 'w') as f: + f.write('int main(int argc, char *argv[]) { return 0; }') +with open(os.path.join(odir, name + '.sh'), 'w') as f: + f.write('#!/bin/bash') diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/meson.build b/test cases/failing/41 custom target outputs not matching install_dirs/meson.build new file mode 100644 index 0000000..765e237 --- /dev/null +++ b/test cases/failing/41 custom target outputs not matching install_dirs/meson.build @@ -0,0 +1,13 @@ +project('outputs not matching install_dirs', 'c') + +gen = find_program('generator.py') + +if meson.backend() != 'ninja' + error('MESON_SKIP_TEST test is only for the ninja backend') +endif + +custom_target('too-few-install-dirs', + output : ['toofew.h', 'toofew.c', 'toofew.sh'], + command : [gen, 'toofew', '@OUTDIR@'], + install : true, + install_dir : [join_paths(get_option('prefix'), get_option('includedir')), false]) diff --git a/test cases/failing/41 custom target outputs not matching install_dirs/test.json b/test cases/failing/41 custom target outputs not matching install_dirs/test.json new file mode 100644 index 0000000..f9e2ba7 --- /dev/null +++ b/test cases/failing/41 custom target outputs not matching install_dirs/test.json @@ -0,0 +1,33 @@ +{ + "installed": [ + { + "type": "file", + "file": "usr/include/diff.h" + }, + { + "type": "file", + "file": "usr/include/first.h" + }, + { + "type": "file", + "file": "usr/bin/diff.sh" + }, + { + "type": "file", + "file": "usr/bin/second.sh" + }, + { + "type": "file", + "file": "opt/same.h" + }, + { + "type": "file", + "file": "opt/same.sh" + } + ], + "stdout": [ + { + "line": "ERROR: Target 'too-few-install-dirs' has 3 outputs: ['toofew.h', 'toofew.c', 'toofew.sh'], but only 2 \"install_dir\"s were found." + } + ] +} diff --git a/test cases/failing/41 custom target plainname many inputs/1.txt b/test cases/failing/41 custom target plainname many inputs/1.txt deleted file mode 100644 index d00491f..0000000 --- a/test cases/failing/41 custom target plainname many inputs/1.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/test cases/failing/41 custom target plainname many inputs/2.txt b/test cases/failing/41 custom target plainname many inputs/2.txt deleted file mode 100644 index 0cfbf08..0000000 --- a/test cases/failing/41 custom target plainname many inputs/2.txt +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/test cases/failing/41 custom target plainname many inputs/catfiles.py b/test cases/failing/41 custom target plainname many inputs/catfiles.py deleted file mode 100644 index 1c53e24..0000000 --- a/test cases/failing/41 custom target plainname many inputs/catfiles.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -out = sys.argv[-1] -with open(out, 'wb') as o: - for infile in sys.argv[1:-1]: - with open(infile, 'rb') as f: - o.write(f.read()) diff --git a/test cases/failing/41 custom target plainname many inputs/meson.build b/test cases/failing/41 custom target plainname many inputs/meson.build deleted file mode 100644 index 1bcfc06..0000000 --- a/test cases/failing/41 custom target plainname many inputs/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('plain name many inputs', 'c') - -catfiles = find_program('catfiles.py') - -custom_target('plainname-inputs', - input : ['1.txt', '2.txt'], - output : '@PLAINNAME@.dat', - command : [catfiles, '@INPUT@', '@OUTPUT@']) diff --git a/test cases/failing/41 custom target plainname many inputs/test.json b/test cases/failing/41 custom target plainname many inputs/test.json deleted file mode 100644 index 66a56f6..0000000 --- a/test cases/failing/41 custom target plainname many inputs/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/41 custom target plainname many inputs/meson.build:5:0: ERROR: custom_target: output cannot containe \"@PLAINNAME@\" or \"@BASENAME@\" when there is more than one input (we can't know which to use)" - } - ] -} diff --git a/test cases/failing/42 custom target outputs not matching install_dirs/generator.py b/test cases/failing/42 custom target outputs not matching install_dirs/generator.py deleted file mode 100755 index 4ac6179..0000000 --- a/test cases/failing/42 custom target outputs not matching install_dirs/generator.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python3 - -import sys, os - -if len(sys.argv) != 3: - print(sys.argv[0], '', '') - -name = sys.argv[1] -odir = sys.argv[2] - -with open(os.path.join(odir, name + '.h'), 'w') as f: - f.write('int func();\n') -with open(os.path.join(odir, name + '.c'), 'w') as f: - f.write('int main(int argc, char *argv[]) { return 0; }') -with open(os.path.join(odir, name + '.sh'), 'w') as f: - f.write('#!/bin/bash') diff --git a/test cases/failing/42 custom target outputs not matching install_dirs/meson.build b/test cases/failing/42 custom target outputs not matching install_dirs/meson.build deleted file mode 100644 index 765e237..0000000 --- a/test cases/failing/42 custom target outputs not matching install_dirs/meson.build +++ /dev/null @@ -1,13 +0,0 @@ -project('outputs not matching install_dirs', 'c') - -gen = find_program('generator.py') - -if meson.backend() != 'ninja' - error('MESON_SKIP_TEST test is only for the ninja backend') -endif - -custom_target('too-few-install-dirs', - output : ['toofew.h', 'toofew.c', 'toofew.sh'], - command : [gen, 'toofew', '@OUTDIR@'], - install : true, - install_dir : [join_paths(get_option('prefix'), get_option('includedir')), false]) diff --git a/test cases/failing/42 custom target outputs not matching install_dirs/test.json b/test cases/failing/42 custom target outputs not matching install_dirs/test.json deleted file mode 100644 index f9e2ba7..0000000 --- a/test cases/failing/42 custom target outputs not matching install_dirs/test.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "installed": [ - { - "type": "file", - "file": "usr/include/diff.h" - }, - { - "type": "file", - "file": "usr/include/first.h" - }, - { - "type": "file", - "file": "usr/bin/diff.sh" - }, - { - "type": "file", - "file": "usr/bin/second.sh" - }, - { - "type": "file", - "file": "opt/same.h" - }, - { - "type": "file", - "file": "opt/same.sh" - } - ], - "stdout": [ - { - "line": "ERROR: Target 'too-few-install-dirs' has 3 outputs: ['toofew.h', 'toofew.c', 'toofew.sh'], but only 2 \"install_dir\"s were found." - } - ] -} diff --git a/test cases/failing/42 project name colon/meson.build b/test cases/failing/42 project name colon/meson.build new file mode 100644 index 0000000..53e947e --- /dev/null +++ b/test cases/failing/42 project name colon/meson.build @@ -0,0 +1 @@ +project('name with :') diff --git a/test cases/failing/42 project name colon/test.json b/test cases/failing/42 project name colon/test.json new file mode 100644 index 0000000..c3b880e --- /dev/null +++ b/test cases/failing/42 project name colon/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/42 project name colon/meson.build:1:0: ERROR: Project name 'name with :' must not contain ':'" + } + ] +} diff --git a/test cases/failing/43 abs subdir/bob/meson.build b/test cases/failing/43 abs subdir/bob/meson.build new file mode 100644 index 0000000..7bbf4b2 --- /dev/null +++ b/test cases/failing/43 abs subdir/bob/meson.build @@ -0,0 +1,2 @@ +# This file is never reached. +x = 3 diff --git a/test cases/failing/43 abs subdir/meson.build b/test cases/failing/43 abs subdir/meson.build new file mode 100644 index 0000000..5425245 --- /dev/null +++ b/test cases/failing/43 abs subdir/meson.build @@ -0,0 +1,5 @@ +project('abs subdir', 'c') + +# For some reason people insist on doing this, probably +# because Make has taught them to never rely on anything. +subdir(join_paths(meson.source_root(), 'bob')) diff --git a/test cases/failing/43 abs subdir/test.json b/test cases/failing/43 abs subdir/test.json new file mode 100644 index 0000000..201ed44 --- /dev/null +++ b/test cases/failing/43 abs subdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/43 abs subdir/meson.build:5:0: ERROR: Subdir argument must be a relative path." + } + ] +} diff --git a/test cases/failing/43 project name colon/meson.build b/test cases/failing/43 project name colon/meson.build deleted file mode 100644 index 53e947e..0000000 --- a/test cases/failing/43 project name colon/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('name with :') diff --git a/test cases/failing/43 project name colon/test.json b/test cases/failing/43 project name colon/test.json deleted file mode 100644 index 7a55574..0000000 --- a/test cases/failing/43 project name colon/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/43 project name colon/meson.build:1:0: ERROR: Project name 'name with :' must not contain ':'" - } - ] -} diff --git a/test cases/failing/44 abs subdir/bob/meson.build b/test cases/failing/44 abs subdir/bob/meson.build deleted file mode 100644 index 7bbf4b2..0000000 --- a/test cases/failing/44 abs subdir/bob/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -# This file is never reached. -x = 3 diff --git a/test cases/failing/44 abs subdir/meson.build b/test cases/failing/44 abs subdir/meson.build deleted file mode 100644 index 5425245..0000000 --- a/test cases/failing/44 abs subdir/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('abs subdir', 'c') - -# For some reason people insist on doing this, probably -# because Make has taught them to never rely on anything. -subdir(join_paths(meson.source_root(), 'bob')) diff --git a/test cases/failing/44 abs subdir/test.json b/test cases/failing/44 abs subdir/test.json deleted file mode 100644 index 0aa56f6..0000000 --- a/test cases/failing/44 abs subdir/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/44 abs subdir/meson.build:5:0: ERROR: Subdir argument must be a relative path." - } - ] -} diff --git a/test cases/failing/44 abspath to srcdir/meson.build b/test cases/failing/44 abspath to srcdir/meson.build new file mode 100644 index 0000000..964a19b --- /dev/null +++ b/test cases/failing/44 abspath to srcdir/meson.build @@ -0,0 +1,3 @@ +project('meson', 'c') + +include_directories(meson.current_source_dir()) diff --git a/test cases/failing/44 abspath to srcdir/test.json b/test cases/failing/44 abspath to srcdir/test.json new file mode 100644 index 0000000..2cc2980 --- /dev/null +++ b/test cases/failing/44 abspath to srcdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/44 abspath to srcdir/meson.build:3:0: ERROR: Tried to form an absolute path to a source dir." + } + ] +} diff --git a/test cases/failing/45 abspath to srcdir/meson.build b/test cases/failing/45 abspath to srcdir/meson.build deleted file mode 100644 index 964a19b..0000000 --- a/test cases/failing/45 abspath to srcdir/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('meson', 'c') - -include_directories(meson.current_source_dir()) diff --git a/test cases/failing/45 abspath to srcdir/test.json b/test cases/failing/45 abspath to srcdir/test.json deleted file mode 100644 index 177bac1..0000000 --- a/test cases/failing/45 abspath to srcdir/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/45 abspath to srcdir/meson.build:3:0: ERROR: Tried to form an absolute path to a source dir." - } - ] -} diff --git a/test cases/failing/45 pkgconfig variables reserved/meson.build b/test cases/failing/45 pkgconfig variables reserved/meson.build new file mode 100644 index 0000000..82ae995 --- /dev/null +++ b/test cases/failing/45 pkgconfig variables reserved/meson.build @@ -0,0 +1,16 @@ +project('variables-reserved-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ 'prefix=/tmp/' ] +) diff --git a/test cases/failing/45 pkgconfig variables reserved/simple.c b/test cases/failing/45 pkgconfig variables reserved/simple.c new file mode 100644 index 0000000..e8a6d83 --- /dev/null +++ b/test cases/failing/45 pkgconfig variables reserved/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/test cases/failing/45 pkgconfig variables reserved/simple.h b/test cases/failing/45 pkgconfig variables reserved/simple.h new file mode 100644 index 0000000..bb52e6d --- /dev/null +++ b/test cases/failing/45 pkgconfig variables reserved/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/test cases/failing/45 pkgconfig variables reserved/test.json b/test cases/failing/45 pkgconfig variables reserved/test.json new file mode 100644 index 0000000..853eb82 --- /dev/null +++ b/test cases/failing/45 pkgconfig variables reserved/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/45 pkgconfig variables reserved/meson.build:8:5: ERROR: Variable \"prefix\" is reserved" + } + ] +} diff --git a/test cases/failing/46 pkgconfig variables reserved/meson.build b/test cases/failing/46 pkgconfig variables reserved/meson.build deleted file mode 100644 index 82ae995..0000000 --- a/test cases/failing/46 pkgconfig variables reserved/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('variables-reserved-test', 'c', version : '1.0') - -pkgg = import('pkgconfig') -lib = shared_library('simple', 'simple.c') -libver = '1.0' -h = install_headers('simple.h') - -pkgg.generate( - libraries : [lib, '-lz'], - subdirs : '.', - version : libver, - name : 'libsimple', - filebase : 'simple', - description : 'A simple demo library.', - variables : [ 'prefix=/tmp/' ] -) diff --git a/test cases/failing/46 pkgconfig variables reserved/simple.c b/test cases/failing/46 pkgconfig variables reserved/simple.c deleted file mode 100644 index e8a6d83..0000000 --- a/test cases/failing/46 pkgconfig variables reserved/simple.c +++ /dev/null @@ -1,5 +0,0 @@ -#include"simple.h" - -int simple_function() { - return 42; -} diff --git a/test cases/failing/46 pkgconfig variables reserved/simple.h b/test cases/failing/46 pkgconfig variables reserved/simple.h deleted file mode 100644 index bb52e6d..0000000 --- a/test cases/failing/46 pkgconfig variables reserved/simple.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SIMPLE_H_ -#define SIMPLE_H_ - -int simple_function(); - -#endif diff --git a/test cases/failing/46 pkgconfig variables reserved/test.json b/test cases/failing/46 pkgconfig variables reserved/test.json deleted file mode 100644 index b92ee17..0000000 --- a/test cases/failing/46 pkgconfig variables reserved/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/46 pkgconfig variables reserved/meson.build:8:5: ERROR: Variable \"prefix\" is reserved" - } - ] -} diff --git a/test cases/failing/46 pkgconfig variables zero length/meson.build b/test cases/failing/46 pkgconfig variables zero length/meson.build new file mode 100644 index 0000000..65d3344 --- /dev/null +++ b/test cases/failing/46 pkgconfig variables zero length/meson.build @@ -0,0 +1,16 @@ +project('variables-zero-length-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ '=value' ] +) diff --git a/test cases/failing/46 pkgconfig variables zero length/simple.c b/test cases/failing/46 pkgconfig variables zero length/simple.c new file mode 100644 index 0000000..e8a6d83 --- /dev/null +++ b/test cases/failing/46 pkgconfig variables zero length/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/test cases/failing/46 pkgconfig variables zero length/simple.h b/test cases/failing/46 pkgconfig variables zero length/simple.h new file mode 100644 index 0000000..bb52e6d --- /dev/null +++ b/test cases/failing/46 pkgconfig variables zero length/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/test cases/failing/46 pkgconfig variables zero length/test.json b/test cases/failing/46 pkgconfig variables zero length/test.json new file mode 100644 index 0000000..ae8ba2b --- /dev/null +++ b/test cases/failing/46 pkgconfig variables zero length/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/46 pkgconfig variables zero length/meson.build:8:5: ERROR: Empty variable name or value" + } + ] +} diff --git a/test cases/failing/47 pkgconfig variables zero length value/meson.build b/test cases/failing/47 pkgconfig variables zero length value/meson.build new file mode 100644 index 0000000..33977b2 --- /dev/null +++ b/test cases/failing/47 pkgconfig variables zero length value/meson.build @@ -0,0 +1,16 @@ +project('variables-zero-length-value-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ 'key=' ] +) diff --git a/test cases/failing/47 pkgconfig variables zero length value/simple.c b/test cases/failing/47 pkgconfig variables zero length value/simple.c new file mode 100644 index 0000000..e8a6d83 --- /dev/null +++ b/test cases/failing/47 pkgconfig variables zero length value/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/test cases/failing/47 pkgconfig variables zero length value/simple.h b/test cases/failing/47 pkgconfig variables zero length value/simple.h new file mode 100644 index 0000000..bb52e6d --- /dev/null +++ b/test cases/failing/47 pkgconfig variables zero length value/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/test cases/failing/47 pkgconfig variables zero length value/test.json b/test cases/failing/47 pkgconfig variables zero length value/test.json new file mode 100644 index 0000000..e963830 --- /dev/null +++ b/test cases/failing/47 pkgconfig variables zero length value/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/47 pkgconfig variables zero length value/meson.build:8:5: ERROR: Empty variable name or value" + } + ] +} diff --git a/test cases/failing/47 pkgconfig variables zero length/meson.build b/test cases/failing/47 pkgconfig variables zero length/meson.build deleted file mode 100644 index 65d3344..0000000 --- a/test cases/failing/47 pkgconfig variables zero length/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('variables-zero-length-test', 'c', version : '1.0') - -pkgg = import('pkgconfig') -lib = shared_library('simple', 'simple.c') -libver = '1.0' -h = install_headers('simple.h') - -pkgg.generate( - libraries : [lib, '-lz'], - subdirs : '.', - version : libver, - name : 'libsimple', - filebase : 'simple', - description : 'A simple demo library.', - variables : [ '=value' ] -) diff --git a/test cases/failing/47 pkgconfig variables zero length/simple.c b/test cases/failing/47 pkgconfig variables zero length/simple.c deleted file mode 100644 index e8a6d83..0000000 --- a/test cases/failing/47 pkgconfig variables zero length/simple.c +++ /dev/null @@ -1,5 +0,0 @@ -#include"simple.h" - -int simple_function() { - return 42; -} diff --git a/test cases/failing/47 pkgconfig variables zero length/simple.h b/test cases/failing/47 pkgconfig variables zero length/simple.h deleted file mode 100644 index bb52e6d..0000000 --- a/test cases/failing/47 pkgconfig variables zero length/simple.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SIMPLE_H_ -#define SIMPLE_H_ - -int simple_function(); - -#endif diff --git a/test cases/failing/47 pkgconfig variables zero length/test.json b/test cases/failing/47 pkgconfig variables zero length/test.json deleted file mode 100644 index 39ffde4..0000000 --- a/test cases/failing/47 pkgconfig variables zero length/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/47 pkgconfig variables zero length/meson.build:8:5: ERROR: Empty variable name or value" - } - ] -} diff --git a/test cases/failing/48 pkgconfig variables not key value/meson.build b/test cases/failing/48 pkgconfig variables not key value/meson.build new file mode 100644 index 0000000..02fa737 --- /dev/null +++ b/test cases/failing/48 pkgconfig variables not key value/meson.build @@ -0,0 +1,16 @@ +project('variables-not-key-value-test', 'c', version : '1.0') + +pkgg = import('pkgconfig') +lib = shared_library('simple', 'simple.c') +libver = '1.0' +h = install_headers('simple.h') + +pkgg.generate( + libraries : [lib, '-lz'], + subdirs : '.', + version : libver, + name : 'libsimple', + filebase : 'simple', + description : 'A simple demo library.', + variables : [ 'this_should_be_key_value' ] +) diff --git a/test cases/failing/48 pkgconfig variables not key value/simple.c b/test cases/failing/48 pkgconfig variables not key value/simple.c new file mode 100644 index 0000000..e8a6d83 --- /dev/null +++ b/test cases/failing/48 pkgconfig variables not key value/simple.c @@ -0,0 +1,5 @@ +#include"simple.h" + +int simple_function() { + return 42; +} diff --git a/test cases/failing/48 pkgconfig variables not key value/simple.h b/test cases/failing/48 pkgconfig variables not key value/simple.h new file mode 100644 index 0000000..bb52e6d --- /dev/null +++ b/test cases/failing/48 pkgconfig variables not key value/simple.h @@ -0,0 +1,6 @@ +#ifndef SIMPLE_H_ +#define SIMPLE_H_ + +int simple_function(); + +#endif diff --git a/test cases/failing/48 pkgconfig variables not key value/test.json b/test cases/failing/48 pkgconfig variables not key value/test.json new file mode 100644 index 0000000..decbe71 --- /dev/null +++ b/test cases/failing/48 pkgconfig variables not key value/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/48 pkgconfig variables not key value/meson.build:8:5: ERROR: Variable 'this_should_be_key_value' must have a value separated by equals sign." + } + ] +} diff --git a/test cases/failing/48 pkgconfig variables zero length value/meson.build b/test cases/failing/48 pkgconfig variables zero length value/meson.build deleted file mode 100644 index 33977b2..0000000 --- a/test cases/failing/48 pkgconfig variables zero length value/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('variables-zero-length-value-test', 'c', version : '1.0') - -pkgg = import('pkgconfig') -lib = shared_library('simple', 'simple.c') -libver = '1.0' -h = install_headers('simple.h') - -pkgg.generate( - libraries : [lib, '-lz'], - subdirs : '.', - version : libver, - name : 'libsimple', - filebase : 'simple', - description : 'A simple demo library.', - variables : [ 'key=' ] -) diff --git a/test cases/failing/48 pkgconfig variables zero length value/simple.c b/test cases/failing/48 pkgconfig variables zero length value/simple.c deleted file mode 100644 index e8a6d83..0000000 --- a/test cases/failing/48 pkgconfig variables zero length value/simple.c +++ /dev/null @@ -1,5 +0,0 @@ -#include"simple.h" - -int simple_function() { - return 42; -} diff --git a/test cases/failing/48 pkgconfig variables zero length value/simple.h b/test cases/failing/48 pkgconfig variables zero length value/simple.h deleted file mode 100644 index bb52e6d..0000000 --- a/test cases/failing/48 pkgconfig variables zero length value/simple.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SIMPLE_H_ -#define SIMPLE_H_ - -int simple_function(); - -#endif diff --git a/test cases/failing/48 pkgconfig variables zero length value/test.json b/test cases/failing/48 pkgconfig variables zero length value/test.json deleted file mode 100644 index 8aa1bc5..0000000 --- a/test cases/failing/48 pkgconfig variables zero length value/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/48 pkgconfig variables zero length value/meson.build:8:5: ERROR: Empty variable name or value" - } - ] -} diff --git a/test cases/failing/49 executable comparison/meson.build b/test cases/failing/49 executable comparison/meson.build new file mode 100644 index 0000000..041bcf3 --- /dev/null +++ b/test cases/failing/49 executable comparison/meson.build @@ -0,0 +1,6 @@ +project('executable comparison', 'c') + +exe1 = executable('prog1', sources : 'prog.c') +exe2 = executable('prog2', sources : 'prog.c') + +assert(exe1 < exe2, 'should fail') diff --git a/test cases/failing/49 executable comparison/prog.c b/test cases/failing/49 executable comparison/prog.c new file mode 100644 index 0000000..0314ff1 --- /dev/null +++ b/test cases/failing/49 executable comparison/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/49 executable comparison/test.json b/test cases/failing/49 executable comparison/test.json new file mode 100644 index 0000000..a37002e --- /dev/null +++ b/test cases/failing/49 executable comparison/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/49 executable comparison/meson.build:6:0: ERROR: Object of type Executable does not support the `<` operator." + } + ] +} diff --git a/test cases/failing/49 pkgconfig variables not key value/meson.build b/test cases/failing/49 pkgconfig variables not key value/meson.build deleted file mode 100644 index 02fa737..0000000 --- a/test cases/failing/49 pkgconfig variables not key value/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('variables-not-key-value-test', 'c', version : '1.0') - -pkgg = import('pkgconfig') -lib = shared_library('simple', 'simple.c') -libver = '1.0' -h = install_headers('simple.h') - -pkgg.generate( - libraries : [lib, '-lz'], - subdirs : '.', - version : libver, - name : 'libsimple', - filebase : 'simple', - description : 'A simple demo library.', - variables : [ 'this_should_be_key_value' ] -) diff --git a/test cases/failing/49 pkgconfig variables not key value/simple.c b/test cases/failing/49 pkgconfig variables not key value/simple.c deleted file mode 100644 index e8a6d83..0000000 --- a/test cases/failing/49 pkgconfig variables not key value/simple.c +++ /dev/null @@ -1,5 +0,0 @@ -#include"simple.h" - -int simple_function() { - return 42; -} diff --git a/test cases/failing/49 pkgconfig variables not key value/simple.h b/test cases/failing/49 pkgconfig variables not key value/simple.h deleted file mode 100644 index bb52e6d..0000000 --- a/test cases/failing/49 pkgconfig variables not key value/simple.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef SIMPLE_H_ -#define SIMPLE_H_ - -int simple_function(); - -#endif diff --git a/test cases/failing/49 pkgconfig variables not key value/test.json b/test cases/failing/49 pkgconfig variables not key value/test.json deleted file mode 100644 index 082bd79..0000000 --- a/test cases/failing/49 pkgconfig variables not key value/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/49 pkgconfig variables not key value/meson.build:8:5: ERROR: Variable 'this_should_be_key_value' must have a value separated by equals sign." - } - ] -} diff --git a/test cases/failing/50 executable comparison/meson.build b/test cases/failing/50 executable comparison/meson.build deleted file mode 100644 index 041bcf3..0000000 --- a/test cases/failing/50 executable comparison/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('executable comparison', 'c') - -exe1 = executable('prog1', sources : 'prog.c') -exe2 = executable('prog2', sources : 'prog.c') - -assert(exe1 < exe2, 'should fail') diff --git a/test cases/failing/50 executable comparison/prog.c b/test cases/failing/50 executable comparison/prog.c deleted file mode 100644 index 0314ff1..0000000 --- a/test cases/failing/50 executable comparison/prog.c +++ /dev/null @@ -1 +0,0 @@ -int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/50 executable comparison/test.json b/test cases/failing/50 executable comparison/test.json deleted file mode 100644 index 7f6bd3b..0000000 --- a/test cases/failing/50 executable comparison/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": "test cases/failing/50 executable comparison/meson.build:6:0: ERROR: Object of type Executable does not support the `<` operator." - } - ] -} diff --git a/test cases/failing/50 inconsistent comparison/meson.build b/test cases/failing/50 inconsistent comparison/meson.build new file mode 100644 index 0000000..7694c2c --- /dev/null +++ b/test cases/failing/50 inconsistent comparison/meson.build @@ -0,0 +1,7 @@ +project('kwarg before arg', 'c') + +# All of these should fail, though only the first one will error out if +# everything's working correctly. +assert([] < 'st', 'should fail') +assert([] < 1, 'should fail') +assert(2 < 'st', 'should fail') diff --git a/test cases/failing/50 inconsistent comparison/test.json b/test cases/failing/50 inconsistent comparison/test.json new file mode 100644 index 0000000..171bfa6 --- /dev/null +++ b/test cases/failing/50 inconsistent comparison/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/50 inconsistent comparison/meson.build:5:0: ERROR: Object <[ArrayHolder] holds [list]: []> of type array does not support the `<` operator." + } + ] +} diff --git a/test cases/failing/51 inconsistent comparison/meson.build b/test cases/failing/51 inconsistent comparison/meson.build deleted file mode 100644 index 7694c2c..0000000 --- a/test cases/failing/51 inconsistent comparison/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('kwarg before arg', 'c') - -# All of these should fail, though only the first one will error out if -# everything's working correctly. -assert([] < 'st', 'should fail') -assert([] < 1, 'should fail') -assert(2 < 'st', 'should fail') diff --git a/test cases/failing/51 inconsistent comparison/test.json b/test cases/failing/51 inconsistent comparison/test.json deleted file mode 100644 index bd26554..0000000 --- a/test cases/failing/51 inconsistent comparison/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/51 inconsistent comparison/meson.build:5:0: ERROR: Object <[ArrayHolder] holds [list]: []> of type array does not support the `<` operator." - } - ] -} diff --git a/test cases/failing/51 slashname/meson.build b/test cases/failing/51 slashname/meson.build new file mode 100644 index 0000000..29fe1fc --- /dev/null +++ b/test cases/failing/51 slashname/meson.build @@ -0,0 +1,11 @@ +project('slashname', 'c') + +# Traverse this subdir so the corresponding dir +# is created inside the build dir. +subdir('sub') + +# Try to create an executable that would go in the "sub" dir +# inside the build dir. This is prohibited. +executable('sub/prog', pf) + +error('Re-enable me once slash in name is finally prohibited.') diff --git a/test cases/failing/51 slashname/sub/meson.build b/test cases/failing/51 slashname/sub/meson.build new file mode 100644 index 0000000..3baacf6 --- /dev/null +++ b/test cases/failing/51 slashname/sub/meson.build @@ -0,0 +1 @@ +pf = files('prog.c') diff --git a/test cases/failing/51 slashname/sub/prog.c b/test cases/failing/51 slashname/sub/prog.c new file mode 100644 index 0000000..722de0a --- /dev/null +++ b/test cases/failing/51 slashname/sub/prog.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + printf("I should not be run ever.\n"); + return 1; +} diff --git a/test cases/failing/51 slashname/test.json b/test cases/failing/51 slashname/test.json new file mode 100644 index 0000000..39346a9 --- /dev/null +++ b/test cases/failing/51 slashname/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/51 slashname/meson.build:9:0: ERROR: Target \"sub/prog\" has a path segment pointing to directory \"sub\". This is an error." + } + ] +} diff --git a/test cases/failing/52 reserved meson prefix/meson-foo/meson.build b/test cases/failing/52 reserved meson prefix/meson-foo/meson.build new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/52 reserved meson prefix/meson.build b/test cases/failing/52 reserved meson prefix/meson.build new file mode 100644 index 0000000..1339035 --- /dev/null +++ b/test cases/failing/52 reserved meson prefix/meson.build @@ -0,0 +1,3 @@ +project('test') + +subdir('meson-foo') diff --git a/test cases/failing/52 reserved meson prefix/test.json b/test cases/failing/52 reserved meson prefix/test.json new file mode 100644 index 0000000..707cd73 --- /dev/null +++ b/test cases/failing/52 reserved meson prefix/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/52 reserved meson prefix/meson.build:3:0: ERROR: The \"meson-\" prefix is reserved and cannot be used for top-level subdir()." + } + ] +} diff --git a/test cases/failing/52 slashname/meson.build b/test cases/failing/52 slashname/meson.build deleted file mode 100644 index 29fe1fc..0000000 --- a/test cases/failing/52 slashname/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('slashname', 'c') - -# Traverse this subdir so the corresponding dir -# is created inside the build dir. -subdir('sub') - -# Try to create an executable that would go in the "sub" dir -# inside the build dir. This is prohibited. -executable('sub/prog', pf) - -error('Re-enable me once slash in name is finally prohibited.') diff --git a/test cases/failing/52 slashname/sub/meson.build b/test cases/failing/52 slashname/sub/meson.build deleted file mode 100644 index 3baacf6..0000000 --- a/test cases/failing/52 slashname/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -pf = files('prog.c') diff --git a/test cases/failing/52 slashname/sub/prog.c b/test cases/failing/52 slashname/sub/prog.c deleted file mode 100644 index 722de0a..0000000 --- a/test cases/failing/52 slashname/sub/prog.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - printf("I should not be run ever.\n"); - return 1; -} diff --git a/test cases/failing/52 slashname/test.json b/test cases/failing/52 slashname/test.json deleted file mode 100644 index eb50e1b..0000000 --- a/test cases/failing/52 slashname/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/52 slashname/meson.build:9:0: ERROR: Target \"sub/prog\" has a path segment pointing to directory \"sub\". This is an error." - } - ] -} diff --git a/test cases/failing/53 reserved meson prefix/meson-foo/meson.build b/test cases/failing/53 reserved meson prefix/meson-foo/meson.build deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/53 reserved meson prefix/meson.build b/test cases/failing/53 reserved meson prefix/meson.build deleted file mode 100644 index 1339035..0000000 --- a/test cases/failing/53 reserved meson prefix/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('test') - -subdir('meson-foo') diff --git a/test cases/failing/53 reserved meson prefix/test.json b/test cases/failing/53 reserved meson prefix/test.json deleted file mode 100644 index 502d96a..0000000 --- a/test cases/failing/53 reserved meson prefix/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/53 reserved meson prefix/meson.build:3:0: ERROR: The \"meson-\" prefix is reserved and cannot be used for top-level subdir()." - } - ] -} diff --git a/test cases/failing/53 wrong shared crate type/foo.rs b/test cases/failing/53 wrong shared crate type/foo.rs new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/53 wrong shared crate type/meson.build b/test cases/failing/53 wrong shared crate type/meson.build new file mode 100644 index 0000000..90020fa --- /dev/null +++ b/test cases/failing/53 wrong shared crate type/meson.build @@ -0,0 +1,7 @@ +project('test') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif + +shared_library('mytest', 'foo.rs', rust_crate_type : 'staticlib') diff --git a/test cases/failing/53 wrong shared crate type/test.json b/test cases/failing/53 wrong shared crate type/test.json new file mode 100644 index 0000000..5faaece --- /dev/null +++ b/test cases/failing/53 wrong shared crate type/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/53 wrong shared crate type/meson.build:7:0: ERROR: Crate type \"staticlib\" invalid for dynamic libraries; must be \"dylib\", \"cdylib\", or \"proc-macro\"" + } + ] +} diff --git a/test cases/failing/54 wrong shared crate type/foo.rs b/test cases/failing/54 wrong shared crate type/foo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/54 wrong shared crate type/meson.build b/test cases/failing/54 wrong shared crate type/meson.build deleted file mode 100644 index 90020fa..0000000 --- a/test cases/failing/54 wrong shared crate type/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('test') - -if not add_languages('rust', required: false) - error('MESON_SKIP_TEST test requires rust compiler') -endif - -shared_library('mytest', 'foo.rs', rust_crate_type : 'staticlib') diff --git a/test cases/failing/54 wrong shared crate type/test.json b/test cases/failing/54 wrong shared crate type/test.json deleted file mode 100644 index a5b7961..0000000 --- a/test cases/failing/54 wrong shared crate type/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/54 wrong shared crate type/meson.build:7:0: ERROR: Crate type \"staticlib\" invalid for dynamic libraries; must be \"dylib\", \"cdylib\", or \"proc-macro\"" - } - ] -} diff --git a/test cases/failing/54 wrong static crate type/foo.rs b/test cases/failing/54 wrong static crate type/foo.rs new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/54 wrong static crate type/meson.build b/test cases/failing/54 wrong static crate type/meson.build new file mode 100644 index 0000000..179d7cd --- /dev/null +++ b/test cases/failing/54 wrong static crate type/meson.build @@ -0,0 +1,7 @@ +project('test') + +if not add_languages('rust', required: false) + error('MESON_SKIP_TEST test requires rust compiler') +endif + +static_library('mytest', 'foo.rs', rust_crate_type : 'cdylib') diff --git a/test cases/failing/54 wrong static crate type/test.json b/test cases/failing/54 wrong static crate type/test.json new file mode 100644 index 0000000..83ae5e1 --- /dev/null +++ b/test cases/failing/54 wrong static crate type/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/54 wrong static crate type/meson.build:7:0: ERROR: Crate type \"cdylib\" invalid for static libraries; must be \"rlib\" or \"staticlib\"" + } + ] +} diff --git a/test cases/failing/55 or on new line/meson.build b/test cases/failing/55 or on new line/meson.build new file mode 100644 index 0000000..12f2705 --- /dev/null +++ b/test cases/failing/55 or on new line/meson.build @@ -0,0 +1,7 @@ +project('silent_or', 'c') + +if get_option('foo') == 'true' + or get_option('foo') == 'auto' +else + message('If this message is printed then something is wrong. The or above should give a syntax error.') +endif diff --git a/test cases/failing/55 or on new line/meson_options.txt b/test cases/failing/55 or on new line/meson_options.txt new file mode 100644 index 0000000..3302cf4 --- /dev/null +++ b/test cases/failing/55 or on new line/meson_options.txt @@ -0,0 +1 @@ +option('foo', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto') diff --git a/test cases/failing/55 or on new line/test.json b/test cases/failing/55 or on new line/test.json new file mode 100644 index 0000000..f1b8a67 --- /dev/null +++ b/test cases/failing/55 or on new line/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/55 or on new line/meson.build:4:8: ERROR: Invalid or clause." + } + ] +} diff --git a/test cases/failing/55 wrong static crate type/foo.rs b/test cases/failing/55 wrong static crate type/foo.rs deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/55 wrong static crate type/meson.build b/test cases/failing/55 wrong static crate type/meson.build deleted file mode 100644 index 179d7cd..0000000 --- a/test cases/failing/55 wrong static crate type/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('test') - -if not add_languages('rust', required: false) - error('MESON_SKIP_TEST test requires rust compiler') -endif - -static_library('mytest', 'foo.rs', rust_crate_type : 'cdylib') diff --git a/test cases/failing/55 wrong static crate type/test.json b/test cases/failing/55 wrong static crate type/test.json deleted file mode 100644 index 7073f7b..0000000 --- a/test cases/failing/55 wrong static crate type/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/55 wrong static crate type/meson.build:7:0: ERROR: Crate type \"cdylib\" invalid for static libraries; must be \"rlib\" or \"staticlib\"" - } - ] -} diff --git a/test cases/failing/56 link with executable/meson.build b/test cases/failing/56 link with executable/meson.build new file mode 100644 index 0000000..186b3e5 --- /dev/null +++ b/test cases/failing/56 link with executable/meson.build @@ -0,0 +1,4 @@ +project('link with exe', 'c') + +e = executable('prog', 'prog.c') +m = shared_module('module', 'module.c', link_with: e) diff --git a/test cases/failing/56 link with executable/module.c b/test cases/failing/56 link with executable/module.c new file mode 100644 index 0000000..dc0124a --- /dev/null +++ b/test cases/failing/56 link with executable/module.c @@ -0,0 +1,4 @@ + +int func(void) { + return 42; +} diff --git a/test cases/failing/56 link with executable/prog.c b/test cases/failing/56 link with executable/prog.c new file mode 100644 index 0000000..f3836d7 --- /dev/null +++ b/test cases/failing/56 link with executable/prog.c @@ -0,0 +1,5 @@ +int +main (int argc, char **argv) +{ + return 0; +} diff --git a/test cases/failing/56 link with executable/test.json b/test cases/failing/56 link with executable/test.json new file mode 100644 index 0000000..2288783 --- /dev/null +++ b/test cases/failing/56 link with executable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/56 link with executable/meson.build:4:0: ERROR: Link target 'prog' is not linkable." + } + ] +} diff --git a/test cases/failing/56 or on new line/meson.build b/test cases/failing/56 or on new line/meson.build deleted file mode 100644 index 12f2705..0000000 --- a/test cases/failing/56 or on new line/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('silent_or', 'c') - -if get_option('foo') == 'true' - or get_option('foo') == 'auto' -else - message('If this message is printed then something is wrong. The or above should give a syntax error.') -endif diff --git a/test cases/failing/56 or on new line/meson_options.txt b/test cases/failing/56 or on new line/meson_options.txt deleted file mode 100644 index 3302cf4..0000000 --- a/test cases/failing/56 or on new line/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('foo', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto') diff --git a/test cases/failing/56 or on new line/test.json b/test cases/failing/56 or on new line/test.json deleted file mode 100644 index c55cee6..0000000 --- a/test cases/failing/56 or on new line/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/56 or on new line/meson.build:4:8: ERROR: Invalid or clause." - } - ] -} diff --git a/test cases/failing/57 assign custom target index/meson.build b/test cases/failing/57 assign custom target index/meson.build new file mode 100644 index 0000000..7f2a820 --- /dev/null +++ b/test cases/failing/57 assign custom target index/meson.build @@ -0,0 +1,24 @@ +# Copyright © 2017 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +prog_python = import('python3').find_python() + +target = custom_target( + 'target', + output : ['1', '2'], + command : [prog_python, '-c', + 'with open("1", "w") as f: f.write("foo"); with open("2", "w") as f: f.write("foo")'], +) + +target[0] = 'foo' diff --git a/test cases/failing/57 assign custom target index/test.json b/test cases/failing/57 assign custom target index/test.json new file mode 100644 index 0000000..392137a --- /dev/null +++ b/test cases/failing/57 assign custom target index/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/57 assign custom target index/meson.build:24:0: ERROR: Assignment target must be an id." + } + ] +} diff --git a/test cases/failing/57 link with executable/meson.build b/test cases/failing/57 link with executable/meson.build deleted file mode 100644 index 186b3e5..0000000 --- a/test cases/failing/57 link with executable/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('link with exe', 'c') - -e = executable('prog', 'prog.c') -m = shared_module('module', 'module.c', link_with: e) diff --git a/test cases/failing/57 link with executable/module.c b/test cases/failing/57 link with executable/module.c deleted file mode 100644 index dc0124a..0000000 --- a/test cases/failing/57 link with executable/module.c +++ /dev/null @@ -1,4 +0,0 @@ - -int func(void) { - return 42; -} diff --git a/test cases/failing/57 link with executable/prog.c b/test cases/failing/57 link with executable/prog.c deleted file mode 100644 index f3836d7..0000000 --- a/test cases/failing/57 link with executable/prog.c +++ /dev/null @@ -1,5 +0,0 @@ -int -main (int argc, char **argv) -{ - return 0; -} diff --git a/test cases/failing/57 link with executable/test.json b/test cases/failing/57 link with executable/test.json deleted file mode 100644 index c835a90..0000000 --- a/test cases/failing/57 link with executable/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/57 link with executable/meson.build:4:0: ERROR: Link target 'prog' is not linkable." - } - ] -} diff --git a/test cases/failing/58 assign custom target index/meson.build b/test cases/failing/58 assign custom target index/meson.build deleted file mode 100644 index 7f2a820..0000000 --- a/test cases/failing/58 assign custom target index/meson.build +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright © 2017 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -prog_python = import('python3').find_python() - -target = custom_target( - 'target', - output : ['1', '2'], - command : [prog_python, '-c', - 'with open("1", "w") as f: f.write("foo"); with open("2", "w") as f: f.write("foo")'], -) - -target[0] = 'foo' diff --git a/test cases/failing/58 assign custom target index/test.json b/test cases/failing/58 assign custom target index/test.json deleted file mode 100644 index b5aa326..0000000 --- a/test cases/failing/58 assign custom target index/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/58 assign custom target index/meson.build:24:0: ERROR: Assignment target must be an id." - } - ] -} diff --git a/test cases/failing/58 getoption prefix/meson.build b/test cases/failing/58 getoption prefix/meson.build new file mode 100644 index 0000000..8f85cff --- /dev/null +++ b/test cases/failing/58 getoption prefix/meson.build @@ -0,0 +1,5 @@ +project('getopt prefix') + +subproject('abc') + +get_option('abc:foo') diff --git a/test cases/failing/58 getoption prefix/subprojects/abc/meson.build b/test cases/failing/58 getoption prefix/subprojects/abc/meson.build new file mode 100644 index 0000000..aa9c3df --- /dev/null +++ b/test cases/failing/58 getoption prefix/subprojects/abc/meson.build @@ -0,0 +1 @@ +project('abc', 'c') diff --git a/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt b/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt new file mode 100644 index 0000000..89e624e --- /dev/null +++ b/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt @@ -0,0 +1 @@ +option('foo', type : 'boolean') diff --git a/test cases/failing/58 getoption prefix/test.json b/test cases/failing/58 getoption prefix/test.json new file mode 100644 index 0000000..630dcd9 --- /dev/null +++ b/test cases/failing/58 getoption prefix/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/58 getoption prefix/meson.build:5:0: ERROR: Having a colon in option name is forbidden, projects are not allowed to directly access options of other subprojects." + } + ] +} diff --git a/test cases/failing/59 bad option argument/meson.build b/test cases/failing/59 bad option argument/meson.build new file mode 100644 index 0000000..5219cfb --- /dev/null +++ b/test cases/failing/59 bad option argument/meson.build @@ -0,0 +1,3 @@ +project('bad option') + +get_option('name') diff --git a/test cases/failing/59 bad option argument/meson_options.txt b/test cases/failing/59 bad option argument/meson_options.txt new file mode 100644 index 0000000..de1fff6 --- /dev/null +++ b/test cases/failing/59 bad option argument/meson_options.txt @@ -0,0 +1 @@ +option('name', type : 'string', vaule : 'foo') diff --git a/test cases/failing/59 bad option argument/test.json b/test cases/failing/59 bad option argument/test.json new file mode 100644 index 0000000..3c5df1b --- /dev/null +++ b/test cases/failing/59 bad option argument/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/59 bad option argument/meson_options.txt:1:0: ERROR: option got unknown keyword arguments \"vaule\"" + } + ] +} diff --git a/test cases/failing/59 getoption prefix/meson.build b/test cases/failing/59 getoption prefix/meson.build deleted file mode 100644 index 8f85cff..0000000 --- a/test cases/failing/59 getoption prefix/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('getopt prefix') - -subproject('abc') - -get_option('abc:foo') diff --git a/test cases/failing/59 getoption prefix/subprojects/abc/meson.build b/test cases/failing/59 getoption prefix/subprojects/abc/meson.build deleted file mode 100644 index aa9c3df..0000000 --- a/test cases/failing/59 getoption prefix/subprojects/abc/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('abc', 'c') diff --git a/test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt b/test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt deleted file mode 100644 index 89e624e..0000000 --- a/test cases/failing/59 getoption prefix/subprojects/abc/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('foo', type : 'boolean') diff --git a/test cases/failing/59 getoption prefix/test.json b/test cases/failing/59 getoption prefix/test.json deleted file mode 100644 index 4485e04..0000000 --- a/test cases/failing/59 getoption prefix/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/59 getoption prefix/meson.build:5:0: ERROR: Having a colon in option name is forbidden, projects are not allowed to directly access options of other subprojects." - } - ] -} diff --git a/test cases/failing/60 bad option argument/meson.build b/test cases/failing/60 bad option argument/meson.build deleted file mode 100644 index 5219cfb..0000000 --- a/test cases/failing/60 bad option argument/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('bad option') - -get_option('name') diff --git a/test cases/failing/60 bad option argument/meson_options.txt b/test cases/failing/60 bad option argument/meson_options.txt deleted file mode 100644 index de1fff6..0000000 --- a/test cases/failing/60 bad option argument/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('name', type : 'string', vaule : 'foo') diff --git a/test cases/failing/60 bad option argument/test.json b/test cases/failing/60 bad option argument/test.json deleted file mode 100644 index 38712b6..0000000 --- a/test cases/failing/60 bad option argument/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/60 bad option argument/meson_options.txt:1:0: ERROR: option got unknown keyword arguments \"vaule\"" - } - ] -} diff --git a/test cases/failing/60 subproj filegrab/meson.build b/test cases/failing/60 subproj filegrab/meson.build new file mode 100644 index 0000000..f38d6c7 --- /dev/null +++ b/test cases/failing/60 subproj filegrab/meson.build @@ -0,0 +1,5 @@ +project('mainproj', 'c') + +# Try to grab a file from a parent project. + +subproject('a') diff --git a/test cases/failing/60 subproj filegrab/prog.c b/test cases/failing/60 subproj filegrab/prog.c new file mode 100644 index 0000000..0314ff1 --- /dev/null +++ b/test cases/failing/60 subproj filegrab/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/60 subproj filegrab/subprojects/a/meson.build b/test cases/failing/60 subproj filegrab/subprojects/a/meson.build new file mode 100644 index 0000000..80b9888 --- /dev/null +++ b/test cases/failing/60 subproj filegrab/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +executable('prog', '../../prog.c') diff --git a/test cases/failing/60 subproj filegrab/test.json b/test cases/failing/60 subproj filegrab/test.json new file mode 100644 index 0000000..04a6dbb --- /dev/null +++ b/test cases/failing/60 subproj filegrab/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/60 subproj filegrab/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file prog.c outside current (sub)project." + } + ] +} diff --git a/test cases/failing/61 grab subproj/meson.build b/test cases/failing/61 grab subproj/meson.build new file mode 100644 index 0000000..30fc690 --- /dev/null +++ b/test cases/failing/61 grab subproj/meson.build @@ -0,0 +1,7 @@ +project('grabber', 'c') + +# Try to grab a file from a child subproject. + +subproject('foo') + +executable('foo', 'subprojects/foo/sub.c') diff --git a/test cases/failing/61 grab subproj/subprojects/foo/meson.build b/test cases/failing/61 grab subproj/subprojects/foo/meson.build new file mode 100644 index 0000000..b346f6d --- /dev/null +++ b/test cases/failing/61 grab subproj/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo', 'c') + +message('I do nothing.') diff --git a/test cases/failing/61 grab subproj/subprojects/foo/sub.c b/test cases/failing/61 grab subproj/subprojects/foo/sub.c new file mode 100644 index 0000000..a94b1f5 --- /dev/null +++ b/test cases/failing/61 grab subproj/subprojects/foo/sub.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + printf("I am a subproject executable file.\n"); + return 0; +} diff --git a/test cases/failing/61 grab subproj/test.json b/test cases/failing/61 grab subproj/test.json new file mode 100644 index 0000000..873ec6c --- /dev/null +++ b/test cases/failing/61 grab subproj/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/61 grab subproj/meson.build:7:0: ERROR: Sandbox violation: Tried to grab file sub.c from a nested subproject." + } + ] +} diff --git a/test cases/failing/61 subproj filegrab/meson.build b/test cases/failing/61 subproj filegrab/meson.build deleted file mode 100644 index f38d6c7..0000000 --- a/test cases/failing/61 subproj filegrab/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('mainproj', 'c') - -# Try to grab a file from a parent project. - -subproject('a') diff --git a/test cases/failing/61 subproj filegrab/prog.c b/test cases/failing/61 subproj filegrab/prog.c deleted file mode 100644 index 0314ff1..0000000 --- a/test cases/failing/61 subproj filegrab/prog.c +++ /dev/null @@ -1 +0,0 @@ -int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/61 subproj filegrab/subprojects/a/meson.build b/test cases/failing/61 subproj filegrab/subprojects/a/meson.build deleted file mode 100644 index 80b9888..0000000 --- a/test cases/failing/61 subproj filegrab/subprojects/a/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('a', 'c') - -executable('prog', '../../prog.c') diff --git a/test cases/failing/61 subproj filegrab/test.json b/test cases/failing/61 subproj filegrab/test.json deleted file mode 100644 index 600e0d5..0000000 --- a/test cases/failing/61 subproj filegrab/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/61 subproj filegrab/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file prog.c outside current (sub)project." - } - ] -} diff --git a/test cases/failing/62 grab sibling/meson.build b/test cases/failing/62 grab sibling/meson.build new file mode 100644 index 0000000..60b926a --- /dev/null +++ b/test cases/failing/62 grab sibling/meson.build @@ -0,0 +1,3 @@ +project('master', 'c') + +subproject('a') diff --git a/test cases/failing/62 grab sibling/subprojects/a/meson.build b/test cases/failing/62 grab sibling/subprojects/a/meson.build new file mode 100644 index 0000000..6dd9f61 --- /dev/null +++ b/test cases/failing/62 grab sibling/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +executable('sneaky', '../b/sneaky.c') diff --git a/test cases/failing/62 grab sibling/subprojects/b/meson.build b/test cases/failing/62 grab sibling/subprojects/b/meson.build new file mode 100644 index 0000000..7c70fe5 --- /dev/null +++ b/test cases/failing/62 grab sibling/subprojects/b/meson.build @@ -0,0 +1,3 @@ +projecT('b', 'c') + +message('I do nothing.') diff --git a/test cases/failing/62 grab sibling/subprojects/b/sneaky.c b/test cases/failing/62 grab sibling/subprojects/b/sneaky.c new file mode 100644 index 0000000..46718c6 --- /dev/null +++ b/test cases/failing/62 grab sibling/subprojects/b/sneaky.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + printf("I can only come into existence via trickery.\n"); + return 0; +} diff --git a/test cases/failing/62 grab sibling/test.json b/test cases/failing/62 grab sibling/test.json new file mode 100644 index 0000000..9e7c4bb --- /dev/null +++ b/test cases/failing/62 grab sibling/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/62 grab sibling/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file sneaky.c outside current (sub)project." + } + ] +} diff --git a/test cases/failing/62 grab subproj/meson.build b/test cases/failing/62 grab subproj/meson.build deleted file mode 100644 index 30fc690..0000000 --- a/test cases/failing/62 grab subproj/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('grabber', 'c') - -# Try to grab a file from a child subproject. - -subproject('foo') - -executable('foo', 'subprojects/foo/sub.c') diff --git a/test cases/failing/62 grab subproj/subprojects/foo/meson.build b/test cases/failing/62 grab subproj/subprojects/foo/meson.build deleted file mode 100644 index b346f6d..0000000 --- a/test cases/failing/62 grab subproj/subprojects/foo/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('foo', 'c') - -message('I do nothing.') diff --git a/test cases/failing/62 grab subproj/subprojects/foo/sub.c b/test cases/failing/62 grab subproj/subprojects/foo/sub.c deleted file mode 100644 index a94b1f5..0000000 --- a/test cases/failing/62 grab subproj/subprojects/foo/sub.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - printf("I am a subproject executable file.\n"); - return 0; -} diff --git a/test cases/failing/62 grab subproj/test.json b/test cases/failing/62 grab subproj/test.json deleted file mode 100644 index 1503ad7..0000000 --- a/test cases/failing/62 grab subproj/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/62 grab subproj/meson.build:7:0: ERROR: Sandbox violation: Tried to grab file sub.c from a nested subproject." - } - ] -} diff --git a/test cases/failing/63 grab sibling/meson.build b/test cases/failing/63 grab sibling/meson.build deleted file mode 100644 index 60b926a..0000000 --- a/test cases/failing/63 grab sibling/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('master', 'c') - -subproject('a') diff --git a/test cases/failing/63 grab sibling/subprojects/a/meson.build b/test cases/failing/63 grab sibling/subprojects/a/meson.build deleted file mode 100644 index 6dd9f61..0000000 --- a/test cases/failing/63 grab sibling/subprojects/a/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('a', 'c') - -executable('sneaky', '../b/sneaky.c') diff --git a/test cases/failing/63 grab sibling/subprojects/b/meson.build b/test cases/failing/63 grab sibling/subprojects/b/meson.build deleted file mode 100644 index 7c70fe5..0000000 --- a/test cases/failing/63 grab sibling/subprojects/b/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -projecT('b', 'c') - -message('I do nothing.') diff --git a/test cases/failing/63 grab sibling/subprojects/b/sneaky.c b/test cases/failing/63 grab sibling/subprojects/b/sneaky.c deleted file mode 100644 index 46718c6..0000000 --- a/test cases/failing/63 grab sibling/subprojects/b/sneaky.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - printf("I can only come into existence via trickery.\n"); - return 0; -} diff --git a/test cases/failing/63 grab sibling/test.json b/test cases/failing/63 grab sibling/test.json deleted file mode 100644 index 91715c7..0000000 --- a/test cases/failing/63 grab sibling/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/63 grab sibling/subprojects/a/meson.build:3:0: ERROR: Sandbox violation: Tried to grab file sneaky.c outside current (sub)project." - } - ] -} diff --git a/test cases/failing/63 string as link target/meson.build b/test cases/failing/63 string as link target/meson.build new file mode 100644 index 0000000..cb83fff --- /dev/null +++ b/test cases/failing/63 string as link target/meson.build @@ -0,0 +1,2 @@ +project('string as link argument', 'c') +executable('myprog', 'prog.c', link_with: [ '' ]) diff --git a/test cases/failing/63 string as link target/prog.c b/test cases/failing/63 string as link target/prog.c new file mode 100644 index 0000000..0314ff1 --- /dev/null +++ b/test cases/failing/63 string as link target/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/63 string as link target/test.json b/test cases/failing/63 string as link target/test.json new file mode 100644 index 0000000..a531d64 --- /dev/null +++ b/test cases/failing/63 string as link target/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/63 string as link target/meson.build:2:0: ERROR: '' is not a target." + } + ] +} diff --git a/test cases/failing/64 dependency not-found and required/meson.build b/test cases/failing/64 dependency not-found and required/meson.build new file mode 100644 index 0000000..1ce5747 --- /dev/null +++ b/test cases/failing/64 dependency not-found and required/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +dep = dependency('', required:true) diff --git a/test cases/failing/64 dependency not-found and required/test.json b/test cases/failing/64 dependency not-found and required/test.json new file mode 100644 index 0000000..84d14b4 --- /dev/null +++ b/test cases/failing/64 dependency not-found and required/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/64 dependency not-found and required/meson.build:2:0: ERROR: Dependency is required but has no candidates." + } + ] +} diff --git a/test cases/failing/64 string as link target/meson.build b/test cases/failing/64 string as link target/meson.build deleted file mode 100644 index cb83fff..0000000 --- a/test cases/failing/64 string as link target/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('string as link argument', 'c') -executable('myprog', 'prog.c', link_with: [ '' ]) diff --git a/test cases/failing/64 string as link target/prog.c b/test cases/failing/64 string as link target/prog.c deleted file mode 100644 index 0314ff1..0000000 --- a/test cases/failing/64 string as link target/prog.c +++ /dev/null @@ -1 +0,0 @@ -int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/64 string as link target/test.json b/test cases/failing/64 string as link target/test.json deleted file mode 100644 index b07a2ea..0000000 --- a/test cases/failing/64 string as link target/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/64 string as link target/meson.build:2:0: ERROR: '' is not a target." - } - ] -} diff --git a/test cases/failing/65 dependency not-found and required/meson.build b/test cases/failing/65 dependency not-found and required/meson.build deleted file mode 100644 index 1ce5747..0000000 --- a/test cases/failing/65 dependency not-found and required/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('dep-test') -dep = dependency('', required:true) diff --git a/test cases/failing/65 dependency not-found and required/test.json b/test cases/failing/65 dependency not-found and required/test.json deleted file mode 100644 index ff20969..0000000 --- a/test cases/failing/65 dependency not-found and required/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/65 dependency not-found and required/meson.build:2:0: ERROR: Dependency is required but has no candidates." - } - ] -} diff --git a/test cases/failing/65 subproj different versions/main.c b/test cases/failing/65 subproj different versions/main.c new file mode 100644 index 0000000..8793c62 --- /dev/null +++ b/test cases/failing/65 subproj different versions/main.c @@ -0,0 +1,9 @@ +#include +#include "a.h" +#include "b.h" + +int main(int argc, char **argv) { + int life = a_fun() + b_fun(); + printf("%d\n", life); + return 0; +} diff --git a/test cases/failing/65 subproj different versions/meson.build b/test cases/failing/65 subproj different versions/meson.build new file mode 100644 index 0000000..e964e42 --- /dev/null +++ b/test cases/failing/65 subproj different versions/meson.build @@ -0,0 +1,9 @@ +project('super', 'c') + +# A will use version 1 of C +a_dep = dependency('a', fallback: ['a', 'a_dep']) + +# B will fail because it requests version 2 of C +b_dep = dependency('b', fallback: ['b', 'b_dep']) + +main = executable('main', files('main.c'), dependencies: [a_dep, b_dep]) diff --git a/test cases/failing/65 subproj different versions/subprojects/a/a.c b/test cases/failing/65 subproj different versions/subprojects/a/a.c new file mode 100644 index 0000000..cd41a65 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/a/a.c @@ -0,0 +1,5 @@ +#include "c.h" + +int a_fun() { + return c_fun(); +} diff --git a/test cases/failing/65 subproj different versions/subprojects/a/a.h b/test cases/failing/65 subproj different versions/subprojects/a/a.h new file mode 100644 index 0000000..8f1d49e --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/a/a.h @@ -0,0 +1 @@ +int a_fun(); diff --git a/test cases/failing/65 subproj different versions/subprojects/a/meson.build b/test cases/failing/65 subproj different versions/subprojects/a/meson.build new file mode 100644 index 0000000..e84182a --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/a/meson.build @@ -0,0 +1,11 @@ +project('a', 'c') + +c_dep = dependency('c', version:'1', fallback: ['c', 'c_dep']) + +alib = library('a', 'a.c', + dependencies: c_dep) + +a_dep = declare_dependency( + link_with: alib, + include_directories: include_directories('.'), +) diff --git a/test cases/failing/65 subproj different versions/subprojects/b/b.c b/test cases/failing/65 subproj different versions/subprojects/b/b.c new file mode 100644 index 0000000..f85f8c3 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/b/b.c @@ -0,0 +1,5 @@ +#include "c.h" + +int b_fun(){ +return c_fun(); +} diff --git a/test cases/failing/65 subproj different versions/subprojects/b/b.h b/test cases/failing/65 subproj different versions/subprojects/b/b.h new file mode 100644 index 0000000..eced786 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/b/b.h @@ -0,0 +1 @@ +int b_fun(); diff --git a/test cases/failing/65 subproj different versions/subprojects/b/meson.build b/test cases/failing/65 subproj different versions/subprojects/b/meson.build new file mode 100644 index 0000000..0398340 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/b/meson.build @@ -0,0 +1,11 @@ +project('b', 'c') + +c_dep = dependency('c', version:'2', fallback: ['c', 'c_dep']) + +blib = library('b', 'b.c', + dependencies: c_dep) + +b_dep = declare_dependency( + link_with: blib, + include_directories: include_directories('.'), +) diff --git a/test cases/failing/65 subproj different versions/subprojects/c/c.h b/test cases/failing/65 subproj different versions/subprojects/c/c.h new file mode 100644 index 0000000..2b15f60 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/c/c.h @@ -0,0 +1,3 @@ +static int c_fun(){ + return 3; +} diff --git a/test cases/failing/65 subproj different versions/subprojects/c/meson.build b/test cases/failing/65 subproj different versions/subprojects/c/meson.build new file mode 100644 index 0000000..7184933 --- /dev/null +++ b/test cases/failing/65 subproj different versions/subprojects/c/meson.build @@ -0,0 +1,5 @@ +project('c', 'c', version:'1') + +c_dep = declare_dependency( + include_directories: include_directories('.') +) diff --git a/test cases/failing/65 subproj different versions/test.json b/test cases/failing/65 subproj different versions/test.json new file mode 100644 index 0000000..2f9f70d --- /dev/null +++ b/test cases/failing/65 subproj different versions/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/65 subproj different versions/subprojects/b/meson.build:3:0: ERROR: Dependency 'c' is required but not found." + } + ] +} diff --git a/test cases/failing/66 subproj different versions/main.c b/test cases/failing/66 subproj different versions/main.c deleted file mode 100644 index 8793c62..0000000 --- a/test cases/failing/66 subproj different versions/main.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "a.h" -#include "b.h" - -int main(int argc, char **argv) { - int life = a_fun() + b_fun(); - printf("%d\n", life); - return 0; -} diff --git a/test cases/failing/66 subproj different versions/meson.build b/test cases/failing/66 subproj different versions/meson.build deleted file mode 100644 index e964e42..0000000 --- a/test cases/failing/66 subproj different versions/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('super', 'c') - -# A will use version 1 of C -a_dep = dependency('a', fallback: ['a', 'a_dep']) - -# B will fail because it requests version 2 of C -b_dep = dependency('b', fallback: ['b', 'b_dep']) - -main = executable('main', files('main.c'), dependencies: [a_dep, b_dep]) diff --git a/test cases/failing/66 subproj different versions/subprojects/a/a.c b/test cases/failing/66 subproj different versions/subprojects/a/a.c deleted file mode 100644 index cd41a65..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/a/a.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "c.h" - -int a_fun() { - return c_fun(); -} diff --git a/test cases/failing/66 subproj different versions/subprojects/a/a.h b/test cases/failing/66 subproj different versions/subprojects/a/a.h deleted file mode 100644 index 8f1d49e..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/a/a.h +++ /dev/null @@ -1 +0,0 @@ -int a_fun(); diff --git a/test cases/failing/66 subproj different versions/subprojects/a/meson.build b/test cases/failing/66 subproj different versions/subprojects/a/meson.build deleted file mode 100644 index e84182a..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/a/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('a', 'c') - -c_dep = dependency('c', version:'1', fallback: ['c', 'c_dep']) - -alib = library('a', 'a.c', - dependencies: c_dep) - -a_dep = declare_dependency( - link_with: alib, - include_directories: include_directories('.'), -) diff --git a/test cases/failing/66 subproj different versions/subprojects/b/b.c b/test cases/failing/66 subproj different versions/subprojects/b/b.c deleted file mode 100644 index f85f8c3..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/b/b.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "c.h" - -int b_fun(){ -return c_fun(); -} diff --git a/test cases/failing/66 subproj different versions/subprojects/b/b.h b/test cases/failing/66 subproj different versions/subprojects/b/b.h deleted file mode 100644 index eced786..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/b/b.h +++ /dev/null @@ -1 +0,0 @@ -int b_fun(); diff --git a/test cases/failing/66 subproj different versions/subprojects/b/meson.build b/test cases/failing/66 subproj different versions/subprojects/b/meson.build deleted file mode 100644 index 0398340..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/b/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('b', 'c') - -c_dep = dependency('c', version:'2', fallback: ['c', 'c_dep']) - -blib = library('b', 'b.c', - dependencies: c_dep) - -b_dep = declare_dependency( - link_with: blib, - include_directories: include_directories('.'), -) diff --git a/test cases/failing/66 subproj different versions/subprojects/c/c.h b/test cases/failing/66 subproj different versions/subprojects/c/c.h deleted file mode 100644 index 2b15f60..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/c/c.h +++ /dev/null @@ -1,3 +0,0 @@ -static int c_fun(){ - return 3; -} diff --git a/test cases/failing/66 subproj different versions/subprojects/c/meson.build b/test cases/failing/66 subproj different versions/subprojects/c/meson.build deleted file mode 100644 index 7184933..0000000 --- a/test cases/failing/66 subproj different versions/subprojects/c/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('c', 'c', version:'1') - -c_dep = declare_dependency( - include_directories: include_directories('.') -) diff --git a/test cases/failing/66 subproj different versions/test.json b/test cases/failing/66 subproj different versions/test.json deleted file mode 100644 index 19e7b4a..0000000 --- a/test cases/failing/66 subproj different versions/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/66 subproj different versions/subprojects/b/meson.build:3:0: ERROR: Dependency 'c' is required but not found." - } - ] -} diff --git a/test cases/failing/66 wrong boost module/meson.build b/test cases/failing/66 wrong boost module/meson.build new file mode 100644 index 0000000..937e587 --- /dev/null +++ b/test cases/failing/66 wrong boost module/meson.build @@ -0,0 +1,9 @@ +project('boosttest', 'cpp', + default_options : ['cpp_std=c++11']) + +if not dependency('boost', required: false).found() + error('MESON_SKIP_TEST test requires boost') +endif + +# abc doesn't exist +linkdep = dependency('boost', modules : ['thread', 'system', 'test', 'abc']) diff --git a/test cases/failing/66 wrong boost module/test.json b/test cases/failing/66 wrong boost module/test.json new file mode 100644 index 0000000..c65a78c --- /dev/null +++ b/test cases/failing/66 wrong boost module/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/66 wrong boost module/meson.build:9:0: ERROR: Dependency \"boost\" not found, tried system" + } + ] +} diff --git a/test cases/failing/67 install_data rename bad size/file1.txt b/test cases/failing/67 install_data rename bad size/file1.txt new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/67 install_data rename bad size/file2.txt b/test cases/failing/67 install_data rename bad size/file2.txt new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/67 install_data rename bad size/meson.build b/test cases/failing/67 install_data rename bad size/meson.build new file mode 100644 index 0000000..c7cde08 --- /dev/null +++ b/test cases/failing/67 install_data rename bad size/meson.build @@ -0,0 +1,3 @@ +project('data install test', 'c') + +install_data(['file1.txt', 'file2.txt'], rename : 'just one name') diff --git a/test cases/failing/67 install_data rename bad size/test.json b/test cases/failing/67 install_data rename bad size/test.json new file mode 100644 index 0000000..af1f0d9 --- /dev/null +++ b/test cases/failing/67 install_data rename bad size/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/67 install_data rename bad size/meson.build:3:0: ERROR: \"rename\" and \"sources\" argument lists must be the same length if \"rename\" is given. Rename has 1 elements and sources has 2." + } + ] +} diff --git a/test cases/failing/67 wrong boost module/meson.build b/test cases/failing/67 wrong boost module/meson.build deleted file mode 100644 index 937e587..0000000 --- a/test cases/failing/67 wrong boost module/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('boosttest', 'cpp', - default_options : ['cpp_std=c++11']) - -if not dependency('boost', required: false).found() - error('MESON_SKIP_TEST test requires boost') -endif - -# abc doesn't exist -linkdep = dependency('boost', modules : ['thread', 'system', 'test', 'abc']) diff --git a/test cases/failing/67 wrong boost module/test.json b/test cases/failing/67 wrong boost module/test.json deleted file mode 100644 index 5f9b21f..0000000 --- a/test cases/failing/67 wrong boost module/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/67 wrong boost module/meson.build:9:0: ERROR: Dependency \"boost\" not found, tried system" - } - ] -} diff --git a/test cases/failing/68 install_data rename bad size/file1.txt b/test cases/failing/68 install_data rename bad size/file1.txt deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/68 install_data rename bad size/file2.txt b/test cases/failing/68 install_data rename bad size/file2.txt deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/68 install_data rename bad size/meson.build b/test cases/failing/68 install_data rename bad size/meson.build deleted file mode 100644 index c7cde08..0000000 --- a/test cases/failing/68 install_data rename bad size/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('data install test', 'c') - -install_data(['file1.txt', 'file2.txt'], rename : 'just one name') diff --git a/test cases/failing/68 install_data rename bad size/test.json b/test cases/failing/68 install_data rename bad size/test.json deleted file mode 100644 index a3cbb1b..0000000 --- a/test cases/failing/68 install_data rename bad size/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/68 install_data rename bad size/meson.build:3:0: ERROR: \"rename\" and \"sources\" argument lists must be the same length if \"rename\" is given. Rename has 1 elements and sources has 2." - } - ] -} diff --git a/test cases/failing/68 skip only subdir/meson.build b/test cases/failing/68 skip only subdir/meson.build new file mode 100644 index 0000000..4832bd4 --- /dev/null +++ b/test cases/failing/68 skip only subdir/meson.build @@ -0,0 +1,8 @@ +# Check that skip_rest only exits subdir, not the whole script. +# Should create an error because main.cpp does not exists. +project('example exit', 'cpp') + +subdir('subdir') + +message('Good') +executable('main', 'main.cpp') diff --git a/test cases/failing/68 skip only subdir/subdir/meson.build b/test cases/failing/68 skip only subdir/subdir/meson.build new file mode 100644 index 0000000..1ba447b --- /dev/null +++ b/test cases/failing/68 skip only subdir/subdir/meson.build @@ -0,0 +1,3 @@ +subdir_done() + +error('Unreachable') diff --git a/test cases/failing/68 skip only subdir/test.json b/test cases/failing/68 skip only subdir/test.json new file mode 100644 index 0000000..4558847 --- /dev/null +++ b/test cases/failing/68 skip only subdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/68 skip only subdir/meson.build:8:0: ERROR: File main.cpp does not exist." + } + ] +} diff --git a/test cases/failing/69 dual override/meson.build b/test cases/failing/69 dual override/meson.build new file mode 100644 index 0000000..e5f86ba --- /dev/null +++ b/test cases/failing/69 dual override/meson.build @@ -0,0 +1,5 @@ +project('yo dawg', 'c') + +p = find_program('overrides.py') +meson.override_find_program('override', p) +meson.override_find_program('override', p) diff --git a/test cases/failing/69 dual override/overrides.py b/test cases/failing/69 dual override/overrides.py new file mode 100644 index 0000000..49e9b7a --- /dev/null +++ b/test cases/failing/69 dual override/overrides.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python3 + +print('Yo dawg, we put overrides in your overrides,') +print('so now you can override when you override.') diff --git a/test cases/failing/69 dual override/test.json b/test cases/failing/69 dual override/test.json new file mode 100644 index 0000000..784d6b2 --- /dev/null +++ b/test cases/failing/69 dual override/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/69 dual override/meson.build:5:6: ERROR: Tried to override executable \"override\" which has already been overridden." + } + ] +} diff --git a/test cases/failing/69 skip only subdir/meson.build b/test cases/failing/69 skip only subdir/meson.build deleted file mode 100644 index 4832bd4..0000000 --- a/test cases/failing/69 skip only subdir/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -# Check that skip_rest only exits subdir, not the whole script. -# Should create an error because main.cpp does not exists. -project('example exit', 'cpp') - -subdir('subdir') - -message('Good') -executable('main', 'main.cpp') diff --git a/test cases/failing/69 skip only subdir/subdir/meson.build b/test cases/failing/69 skip only subdir/subdir/meson.build deleted file mode 100644 index 1ba447b..0000000 --- a/test cases/failing/69 skip only subdir/subdir/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -subdir_done() - -error('Unreachable') diff --git a/test cases/failing/69 skip only subdir/test.json b/test cases/failing/69 skip only subdir/test.json deleted file mode 100644 index 134971a..0000000 --- a/test cases/failing/69 skip only subdir/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/69 skip only subdir/meson.build:8:0: ERROR: File main.cpp does not exist." - } - ] -} diff --git a/test cases/failing/70 dual override/meson.build b/test cases/failing/70 dual override/meson.build deleted file mode 100644 index e5f86ba..0000000 --- a/test cases/failing/70 dual override/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('yo dawg', 'c') - -p = find_program('overrides.py') -meson.override_find_program('override', p) -meson.override_find_program('override', p) diff --git a/test cases/failing/70 dual override/overrides.py b/test cases/failing/70 dual override/overrides.py deleted file mode 100644 index 49e9b7a..0000000 --- a/test cases/failing/70 dual override/overrides.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python3 - -print('Yo dawg, we put overrides in your overrides,') -print('so now you can override when you override.') diff --git a/test cases/failing/70 dual override/test.json b/test cases/failing/70 dual override/test.json deleted file mode 100644 index e955dc0..0000000 --- a/test cases/failing/70 dual override/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/70 dual override/meson.build:5:6: ERROR: Tried to override executable \"override\" which has already been overridden." - } - ] -} diff --git a/test cases/failing/70 override used/meson.build b/test cases/failing/70 override used/meson.build new file mode 100644 index 0000000..61885bb --- /dev/null +++ b/test cases/failing/70 override used/meson.build @@ -0,0 +1,5 @@ +project('overridde an already found exe', 'c') + +old = find_program('something.py') +replacement = find_program('other.py') +meson.override_find_program('something.py', replacement) diff --git a/test cases/failing/70 override used/other.py b/test cases/failing/70 override used/other.py new file mode 100755 index 0000000..f62ba96 --- /dev/null +++ b/test cases/failing/70 override used/other.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('Doing something else.') diff --git a/test cases/failing/70 override used/something.py b/test cases/failing/70 override used/something.py new file mode 100755 index 0000000..64c9454 --- /dev/null +++ b/test cases/failing/70 override used/something.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('Doing something.') diff --git a/test cases/failing/70 override used/test.json b/test cases/failing/70 override used/test.json new file mode 100644 index 0000000..adb60aa --- /dev/null +++ b/test cases/failing/70 override used/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/70 override used/meson.build:5:6: ERROR: Tried to override finding of executable \"something.py\" which has already been found." + } + ] +} diff --git a/test cases/failing/71 override used/meson.build b/test cases/failing/71 override used/meson.build deleted file mode 100644 index 61885bb..0000000 --- a/test cases/failing/71 override used/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('overridde an already found exe', 'c') - -old = find_program('something.py') -replacement = find_program('other.py') -meson.override_find_program('something.py', replacement) diff --git a/test cases/failing/71 override used/other.py b/test cases/failing/71 override used/other.py deleted file mode 100755 index f62ba96..0000000 --- a/test cases/failing/71 override used/other.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 - -print('Doing something else.') diff --git a/test cases/failing/71 override used/something.py b/test cases/failing/71 override used/something.py deleted file mode 100755 index 64c9454..0000000 --- a/test cases/failing/71 override used/something.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 - -print('Doing something.') diff --git a/test cases/failing/71 override used/test.json b/test cases/failing/71 override used/test.json deleted file mode 100644 index 6c734e4..0000000 --- a/test cases/failing/71 override used/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/71 override used/meson.build:5:6: ERROR: Tried to override finding of executable \"something.py\" which has already been found." - } - ] -} diff --git a/test cases/failing/71 run_command unclean exit/meson.build b/test cases/failing/71 run_command unclean exit/meson.build new file mode 100644 index 0000000..4bc02ae --- /dev/null +++ b/test cases/failing/71 run_command unclean exit/meson.build @@ -0,0 +1,4 @@ +project('run_command unclean exit', 'c') + +rcprog = find_program('./returncode.py') +run_command(rcprog, '1', check : true) diff --git a/test cases/failing/71 run_command unclean exit/returncode.py b/test cases/failing/71 run_command unclean exit/returncode.py new file mode 100755 index 0000000..84dbc5d --- /dev/null +++ b/test cases/failing/71 run_command unclean exit/returncode.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python3 + +import sys +exit(int(sys.argv[1])) diff --git a/test cases/failing/71 run_command unclean exit/test.json b/test cases/failing/71 run_command unclean exit/test.json new file mode 100644 index 0000000..e9bfb94 --- /dev/null +++ b/test cases/failing/71 run_command unclean exit/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/71 run_command unclean exit/meson\\.build:4:0: ERROR: Command \".*[\\\\/]test cases[\\\\/]failing[\\\\/]71 run_command unclean exit[\\\\/]\\.[\\\\/]returncode\\.py 1\" failed with status 1\\." + } + ] +} diff --git a/test cases/failing/72 int literal leading zero/meson.build b/test cases/failing/72 int literal leading zero/meson.build new file mode 100644 index 0000000..87c776f --- /dev/null +++ b/test cases/failing/72 int literal leading zero/meson.build @@ -0,0 +1,5 @@ + +# This should fail. +# Decimal syntax is 123. +# Octal syntax is 0o123. +fail_0123 = 0123 diff --git a/test cases/failing/72 int literal leading zero/test.json b/test cases/failing/72 int literal leading zero/test.json new file mode 100644 index 0000000..556e492 --- /dev/null +++ b/test cases/failing/72 int literal leading zero/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "comment": "this error message is not very informative", + "line": "test cases/failing/72 int literal leading zero/meson.build:5:13: ERROR: Expecting eof got number." + } + ] +} diff --git a/test cases/failing/72 run_command unclean exit/meson.build b/test cases/failing/72 run_command unclean exit/meson.build deleted file mode 100644 index 4bc02ae..0000000 --- a/test cases/failing/72 run_command unclean exit/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('run_command unclean exit', 'c') - -rcprog = find_program('./returncode.py') -run_command(rcprog, '1', check : true) diff --git a/test cases/failing/72 run_command unclean exit/returncode.py b/test cases/failing/72 run_command unclean exit/returncode.py deleted file mode 100755 index 84dbc5d..0000000 --- a/test cases/failing/72 run_command unclean exit/returncode.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python3 - -import sys -exit(int(sys.argv[1])) diff --git a/test cases/failing/72 run_command unclean exit/test.json b/test cases/failing/72 run_command unclean exit/test.json deleted file mode 100644 index 67a80f4..0000000 --- a/test cases/failing/72 run_command unclean exit/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": "test cases/failing/72 run_command unclean exit/meson\\.build:4:0: ERROR: Command \".*[\\\\/]test cases[\\\\/]failing[\\\\/]72 run_command unclean exit[\\\\/]\\.[\\\\/]returncode\\.py 1\" failed with status 1\\." - } - ] -} diff --git a/test cases/failing/73 configuration immutable/input b/test cases/failing/73 configuration immutable/input new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/73 configuration immutable/meson.build b/test cases/failing/73 configuration immutable/meson.build new file mode 100644 index 0000000..b6cac41 --- /dev/null +++ b/test cases/failing/73 configuration immutable/meson.build @@ -0,0 +1,12 @@ +project('configuration_data is immutable') + +a = configuration_data() + +configure_file( + configuration : a, + input : 'input', + output : 'output', +) + +still_immutable = a +still_immutable.set('hello', 'world') diff --git a/test cases/failing/73 configuration immutable/test.json b/test cases/failing/73 configuration immutable/test.json new file mode 100644 index 0000000..32d9427 --- /dev/null +++ b/test cases/failing/73 configuration immutable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/73 configuration immutable/meson.build:12:16: ERROR: Can not set values on configuration object that has been used." + } + ] +} diff --git a/test cases/failing/73 int literal leading zero/meson.build b/test cases/failing/73 int literal leading zero/meson.build deleted file mode 100644 index 87c776f..0000000 --- a/test cases/failing/73 int literal leading zero/meson.build +++ /dev/null @@ -1,5 +0,0 @@ - -# This should fail. -# Decimal syntax is 123. -# Octal syntax is 0o123. -fail_0123 = 0123 diff --git a/test cases/failing/73 int literal leading zero/test.json b/test cases/failing/73 int literal leading zero/test.json deleted file mode 100644 index bc41165..0000000 --- a/test cases/failing/73 int literal leading zero/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "comment": "this error message is not very informative", - "line": "test cases/failing/73 int literal leading zero/meson.build:5:13: ERROR: Expecting eof got number." - } - ] -} diff --git a/test cases/failing/74 configuration immutable/input b/test cases/failing/74 configuration immutable/input deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/74 configuration immutable/meson.build b/test cases/failing/74 configuration immutable/meson.build deleted file mode 100644 index b6cac41..0000000 --- a/test cases/failing/74 configuration immutable/meson.build +++ /dev/null @@ -1,12 +0,0 @@ -project('configuration_data is immutable') - -a = configuration_data() - -configure_file( - configuration : a, - input : 'input', - output : 'output', -) - -still_immutable = a -still_immutable.set('hello', 'world') diff --git a/test cases/failing/74 configuration immutable/test.json b/test cases/failing/74 configuration immutable/test.json deleted file mode 100644 index 1dd172a..0000000 --- a/test cases/failing/74 configuration immutable/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/74 configuration immutable/meson.build:12:16: ERROR: Can not set values on configuration object that has been used." - } - ] -} diff --git a/test cases/failing/74 link with shared module on osx/meson.build b/test cases/failing/74 link with shared module on osx/meson.build new file mode 100644 index 0000000..bf18b36 --- /dev/null +++ b/test cases/failing/74 link with shared module on osx/meson.build @@ -0,0 +1,8 @@ +project('link with shared module', 'c') + +if host_machine.system() != 'darwin' + error('MESON_SKIP_TEST test only fails on OSX') +endif + +m = shared_module('mymodule', 'module.c') +e = executable('prog', 'prog.c', link_with : m) diff --git a/test cases/failing/74 link with shared module on osx/module.c b/test cases/failing/74 link with shared module on osx/module.c new file mode 100644 index 0000000..81b0d5a --- /dev/null +++ b/test cases/failing/74 link with shared module on osx/module.c @@ -0,0 +1,3 @@ +int func(void) { + return 1496; +} diff --git a/test cases/failing/74 link with shared module on osx/prog.c b/test cases/failing/74 link with shared module on osx/prog.c new file mode 100644 index 0000000..8164d8d --- /dev/null +++ b/test cases/failing/74 link with shared module on osx/prog.c @@ -0,0 +1,4 @@ + +int main(int argc, char **argv) { + return func(); +} diff --git a/test cases/failing/74 link with shared module on osx/test.json b/test cases/failing/74 link with shared module on osx/test.json new file mode 100644 index 0000000..9ca1b9d --- /dev/null +++ b/test cases/failing/74 link with shared module on osx/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/74 link with shared module on osx/meson.build:8:0: ERROR: target prog links against shared module mymodule. This is not permitted on OSX" + } + ] +} diff --git a/test cases/failing/75 link with shared module on osx/meson.build b/test cases/failing/75 link with shared module on osx/meson.build deleted file mode 100644 index bf18b36..0000000 --- a/test cases/failing/75 link with shared module on osx/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('link with shared module', 'c') - -if host_machine.system() != 'darwin' - error('MESON_SKIP_TEST test only fails on OSX') -endif - -m = shared_module('mymodule', 'module.c') -e = executable('prog', 'prog.c', link_with : m) diff --git a/test cases/failing/75 link with shared module on osx/module.c b/test cases/failing/75 link with shared module on osx/module.c deleted file mode 100644 index 81b0d5a..0000000 --- a/test cases/failing/75 link with shared module on osx/module.c +++ /dev/null @@ -1,3 +0,0 @@ -int func(void) { - return 1496; -} diff --git a/test cases/failing/75 link with shared module on osx/prog.c b/test cases/failing/75 link with shared module on osx/prog.c deleted file mode 100644 index 8164d8d..0000000 --- a/test cases/failing/75 link with shared module on osx/prog.c +++ /dev/null @@ -1,4 +0,0 @@ - -int main(int argc, char **argv) { - return func(); -} diff --git a/test cases/failing/75 link with shared module on osx/test.json b/test cases/failing/75 link with shared module on osx/test.json deleted file mode 100644 index 81ee2ac..0000000 --- a/test cases/failing/75 link with shared module on osx/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/75 link with shared module on osx/meson.build:8:0: ERROR: target prog links against shared module mymodule. This is not permitted on OSX" - } - ] -} diff --git a/test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in b/test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in new file mode 100644 index 0000000..323bec6 --- /dev/null +++ b/test cases/failing/75 non ascii in ascii encoded configure file/config9.h.in @@ -0,0 +1 @@ +#define MESSAGE "@var@" diff --git a/test cases/failing/75 non ascii in ascii encoded configure file/meson.build b/test cases/failing/75 non ascii in ascii encoded configure file/meson.build new file mode 100644 index 0000000..846daaf --- /dev/null +++ b/test cases/failing/75 non ascii in ascii encoded configure file/meson.build @@ -0,0 +1,10 @@ +project('non acsii to ascii encoding', 'c') +# Writing a non ASCII character with a ASCII encoding should fail +conf9 = configuration_data() +conf9.set('var', 'д') +configure_file( + input : 'config9.h.in', + output : '@BASENAME@', + encoding : 'ascii', + configuration : conf9 +) diff --git a/test cases/failing/75 non ascii in ascii encoded configure file/test.json b/test cases/failing/75 non ascii in ascii encoded configure file/test.json new file mode 100644 index 0000000..27cb0ab --- /dev/null +++ b/test cases/failing/75 non ascii in ascii encoded configure file/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/75 non ascii in ascii encoded configure file/meson\\.build:5:0: ERROR: Could not write output file .*[\\\\/]config9\\.h: 'ascii' codec can't encode character '\\\\u0434' in position 17: ordinal not in range\\(128\\)" + } + ] +} diff --git a/test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in b/test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in deleted file mode 100644 index 323bec6..0000000 --- a/test cases/failing/76 non ascii in ascii encoded configure file/config9.h.in +++ /dev/null @@ -1 +0,0 @@ -#define MESSAGE "@var@" diff --git a/test cases/failing/76 non ascii in ascii encoded configure file/meson.build b/test cases/failing/76 non ascii in ascii encoded configure file/meson.build deleted file mode 100644 index 846daaf..0000000 --- a/test cases/failing/76 non ascii in ascii encoded configure file/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('non acsii to ascii encoding', 'c') -# Writing a non ASCII character with a ASCII encoding should fail -conf9 = configuration_data() -conf9.set('var', 'д') -configure_file( - input : 'config9.h.in', - output : '@BASENAME@', - encoding : 'ascii', - configuration : conf9 -) diff --git a/test cases/failing/76 non ascii in ascii encoded configure file/test.json b/test cases/failing/76 non ascii in ascii encoded configure file/test.json deleted file mode 100644 index 44e6377..0000000 --- a/test cases/failing/76 non ascii in ascii encoded configure file/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": "test cases/failing/76 non ascii in ascii encoded configure file/meson\\.build:5:0: ERROR: Could not write output file .*[\\\\/]config9\\.h: 'ascii' codec can't encode character '\\\\u0434' in position 17: ordinal not in range\\(128\\)" - } - ] -} diff --git a/test cases/failing/76 subproj dependency not-found and required/meson.build b/test cases/failing/76 subproj dependency not-found and required/meson.build new file mode 100644 index 0000000..c5a2961 --- /dev/null +++ b/test cases/failing/76 subproj dependency not-found and required/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +missing = dependency('', fallback: ['missing', 'missing_dep'], required: true) diff --git a/test cases/failing/76 subproj dependency not-found and required/test.json b/test cases/failing/76 subproj dependency not-found and required/test.json new file mode 100644 index 0000000..3b98436 --- /dev/null +++ b/test cases/failing/76 subproj dependency not-found and required/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/76 subproj dependency not-found and required/meson.build:2:0: ERROR: Neither a subproject directory nor a missing.wrap file was found." + } + ] +} diff --git a/test cases/failing/77 subproj dependency not-found and required/meson.build b/test cases/failing/77 subproj dependency not-found and required/meson.build deleted file mode 100644 index c5a2961..0000000 --- a/test cases/failing/77 subproj dependency not-found and required/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('dep-test') -missing = dependency('', fallback: ['missing', 'missing_dep'], required: true) diff --git a/test cases/failing/77 subproj dependency not-found and required/test.json b/test cases/failing/77 subproj dependency not-found and required/test.json deleted file mode 100644 index 5365f34..0000000 --- a/test cases/failing/77 subproj dependency not-found and required/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/77 subproj dependency not-found and required/meson.build:2:0: ERROR: Neither a subproject directory nor a missing.wrap file was found." - } - ] -} diff --git a/test cases/failing/77 unfound run/meson.build b/test cases/failing/77 unfound run/meson.build new file mode 100644 index 0000000..3f37e9a --- /dev/null +++ b/test cases/failing/77 unfound run/meson.build @@ -0,0 +1,4 @@ +project('unfound runtarget') + +exe = find_program('nonexisting_prog', required : false) +run_target('invoke_fail', command : [exe]) diff --git a/test cases/failing/77 unfound run/test.json b/test cases/failing/77 unfound run/test.json new file mode 100644 index 0000000..99464bd --- /dev/null +++ b/test cases/failing/77 unfound run/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/77 unfound run/meson.build:4:0: ERROR: Tried to use non-existing executable 'nonexisting_prog'" + } + ] +} diff --git a/test cases/failing/78 framework dependency with version/meson.build b/test cases/failing/78 framework dependency with version/meson.build new file mode 100644 index 0000000..b7e04ba --- /dev/null +++ b/test cases/failing/78 framework dependency with version/meson.build @@ -0,0 +1,8 @@ +project('framework dependency with version', 'c') + +if host_machine.system() != 'darwin' + error('MESON_SKIP_TEST test only applicable on darwin') +endif + +# do individual frameworks have a meaningful version to test? And multiple frameworks might be listed... +dep = dependency('appleframeworks', modules: 'foundation', version: '>0') diff --git a/test cases/failing/78 framework dependency with version/test.json b/test cases/failing/78 framework dependency with version/test.json new file mode 100644 index 0000000..c9f25a2 --- /dev/null +++ b/test cases/failing/78 framework dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/78 framework dependency with version/meson.build:8:0: ERROR: Unknown version of dependency 'appleframeworks', but need ['>0']." + } + ] +} diff --git a/test cases/failing/78 unfound run/meson.build b/test cases/failing/78 unfound run/meson.build deleted file mode 100644 index 3f37e9a..0000000 --- a/test cases/failing/78 unfound run/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('unfound runtarget') - -exe = find_program('nonexisting_prog', required : false) -run_target('invoke_fail', command : [exe]) diff --git a/test cases/failing/78 unfound run/test.json b/test cases/failing/78 unfound run/test.json deleted file mode 100644 index 0cdcdf2..0000000 --- a/test cases/failing/78 unfound run/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/78 unfound run/meson.build:4:0: ERROR: Tried to use non-existing executable 'nonexisting_prog'" - } - ] -} diff --git a/test cases/failing/79 framework dependency with version/meson.build b/test cases/failing/79 framework dependency with version/meson.build deleted file mode 100644 index b7e04ba..0000000 --- a/test cases/failing/79 framework dependency with version/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('framework dependency with version', 'c') - -if host_machine.system() != 'darwin' - error('MESON_SKIP_TEST test only applicable on darwin') -endif - -# do individual frameworks have a meaningful version to test? And multiple frameworks might be listed... -dep = dependency('appleframeworks', modules: 'foundation', version: '>0') diff --git a/test cases/failing/79 framework dependency with version/test.json b/test cases/failing/79 framework dependency with version/test.json deleted file mode 100644 index 9b0d335..0000000 --- a/test cases/failing/79 framework dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/79 framework dependency with version/meson.build:8:0: ERROR: Unknown version of dependency 'appleframeworks', but need ['>0']." - } - ] -} diff --git a/test cases/failing/79 override exe config/foo.c b/test cases/failing/79 override exe config/foo.c new file mode 100644 index 0000000..03b2213 --- /dev/null +++ b/test cases/failing/79 override exe config/foo.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/79 override exe config/meson.build b/test cases/failing/79 override exe config/meson.build new file mode 100644 index 0000000..a5d0924 --- /dev/null +++ b/test cases/failing/79 override exe config/meson.build @@ -0,0 +1,6 @@ +project('myexe', 'c') + +foo = executable('foo', 'foo.c') +meson.override_find_program('bar', foo) +bar = find_program('bar') +run_command(bar, check: true) diff --git a/test cases/failing/79 override exe config/test.json b/test cases/failing/79 override exe config/test.json new file mode 100644 index 0000000..1a671a3 --- /dev/null +++ b/test cases/failing/79 override exe config/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/79 override exe config/meson.build:6:0: ERROR: Program 'bar' was overridden with the compiled executable 'foo' and therefore cannot be used during configuration" + } + ] +} diff --git a/test cases/failing/80 gl dependency with version/meson.build b/test cases/failing/80 gl dependency with version/meson.build new file mode 100644 index 0000000..0127093 --- /dev/null +++ b/test cases/failing/80 gl dependency with version/meson.build @@ -0,0 +1,9 @@ +project('gl dependency with version', 'c') + +host_system = host_machine.system() +if host_system != 'windows' and host_system != 'darwin' + error('MESON_SKIP_TEST: test only fails on Windows and OSX') +endif + +# gl dependency found via system method doesn't have a meaningful version to check +dep = dependency('gl', method: 'system', version: '>0') diff --git a/test cases/failing/80 gl dependency with version/test.json b/test cases/failing/80 gl dependency with version/test.json new file mode 100644 index 0000000..cae10da --- /dev/null +++ b/test cases/failing/80 gl dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/80 gl dependency with version/meson.build:9:0: ERROR: Unknown version of dependency 'gl', but need ['>0']." + } + ] +} diff --git a/test cases/failing/80 override exe config/foo.c b/test cases/failing/80 override exe config/foo.c deleted file mode 100644 index 03b2213..0000000 --- a/test cases/failing/80 override exe config/foo.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/failing/80 override exe config/meson.build b/test cases/failing/80 override exe config/meson.build deleted file mode 100644 index a5d0924..0000000 --- a/test cases/failing/80 override exe config/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('myexe', 'c') - -foo = executable('foo', 'foo.c') -meson.override_find_program('bar', foo) -bar = find_program('bar') -run_command(bar, check: true) diff --git a/test cases/failing/80 override exe config/test.json b/test cases/failing/80 override exe config/test.json deleted file mode 100644 index 36c789e..0000000 --- a/test cases/failing/80 override exe config/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/80 override exe config/meson.build:6:0: ERROR: Program 'bar' was overridden with the compiled executable 'foo' and therefore cannot be used during configuration" - } - ] -} diff --git a/test cases/failing/81 gl dependency with version/meson.build b/test cases/failing/81 gl dependency with version/meson.build deleted file mode 100644 index 0127093..0000000 --- a/test cases/failing/81 gl dependency with version/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('gl dependency with version', 'c') - -host_system = host_machine.system() -if host_system != 'windows' and host_system != 'darwin' - error('MESON_SKIP_TEST: test only fails on Windows and OSX') -endif - -# gl dependency found via system method doesn't have a meaningful version to check -dep = dependency('gl', method: 'system', version: '>0') diff --git a/test cases/failing/81 gl dependency with version/test.json b/test cases/failing/81 gl dependency with version/test.json deleted file mode 100644 index 86da735..0000000 --- a/test cases/failing/81 gl dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/81 gl dependency with version/meson.build:9:0: ERROR: Unknown version of dependency 'gl', but need ['>0']." - } - ] -} diff --git a/test cases/failing/81 threads dependency with version/meson.build b/test cases/failing/81 threads dependency with version/meson.build new file mode 100644 index 0000000..6023fae --- /dev/null +++ b/test cases/failing/81 threads dependency with version/meson.build @@ -0,0 +1,3 @@ +project('threads dependency with version', 'c') +# threads dependency doesn't have a meaningful version to check +dep = dependency('threads', version: '>0') diff --git a/test cases/failing/81 threads dependency with version/test.json b/test cases/failing/81 threads dependency with version/test.json new file mode 100644 index 0000000..7781b72 --- /dev/null +++ b/test cases/failing/81 threads dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/81 threads dependency with version/meson.build:3:0: ERROR: Unknown version of dependency 'threads', but need ['>0']." + } + ] +} diff --git a/test cases/failing/82 gtest dependency with version/meson.build b/test cases/failing/82 gtest dependency with version/meson.build new file mode 100644 index 0000000..b43a047 --- /dev/null +++ b/test cases/failing/82 gtest dependency with version/meson.build @@ -0,0 +1,8 @@ +project('gtest dependency with version', ['c', 'cpp']) + +if not dependency('gtest', method: 'system', required: false).found() + error('MESON_SKIP_TEST test requires gtest') +endif + +# discovering gtest version is not yet implemented +dep = dependency('gtest', method: 'system', version: '>0') diff --git a/test cases/failing/82 gtest dependency with version/test.json b/test cases/failing/82 gtest dependency with version/test.json new file mode 100644 index 0000000..7cf397b --- /dev/null +++ b/test cases/failing/82 gtest dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/82 gtest dependency with version/meson.build:8:0: ERROR: Dependency 'gtest' is required but not found." + } + ] +} diff --git a/test cases/failing/82 threads dependency with version/meson.build b/test cases/failing/82 threads dependency with version/meson.build deleted file mode 100644 index 6023fae..0000000 --- a/test cases/failing/82 threads dependency with version/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('threads dependency with version', 'c') -# threads dependency doesn't have a meaningful version to check -dep = dependency('threads', version: '>0') diff --git a/test cases/failing/82 threads dependency with version/test.json b/test cases/failing/82 threads dependency with version/test.json deleted file mode 100644 index 9b71468..0000000 --- a/test cases/failing/82 threads dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/82 threads dependency with version/meson.build:3:0: ERROR: Unknown version of dependency 'threads', but need ['>0']." - } - ] -} diff --git a/test cases/failing/83 dub libray/meson.build b/test cases/failing/83 dub libray/meson.build new file mode 100644 index 0000000..306d5b3 --- /dev/null +++ b/test cases/failing/83 dub libray/meson.build @@ -0,0 +1,11 @@ +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + +dependency('dubtestproject', method: 'dub') # Not library (none) diff --git a/test cases/failing/83 dub libray/test.json b/test cases/failing/83 dub libray/test.json new file mode 100644 index 0000000..4dcbbed --- /dev/null +++ b/test cases/failing/83 dub libray/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/83 dub libray/meson.build:11:0: ERROR: Dependency \"dubtestproject\" not found" + } + ] +} diff --git a/test cases/failing/83 gtest dependency with version/meson.build b/test cases/failing/83 gtest dependency with version/meson.build deleted file mode 100644 index b43a047..0000000 --- a/test cases/failing/83 gtest dependency with version/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('gtest dependency with version', ['c', 'cpp']) - -if not dependency('gtest', method: 'system', required: false).found() - error('MESON_SKIP_TEST test requires gtest') -endif - -# discovering gtest version is not yet implemented -dep = dependency('gtest', method: 'system', version: '>0') diff --git a/test cases/failing/83 gtest dependency with version/test.json b/test cases/failing/83 gtest dependency with version/test.json deleted file mode 100644 index 4a44077..0000000 --- a/test cases/failing/83 gtest dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/83 gtest dependency with version/meson.build:8:0: ERROR: Dependency 'gtest' is required but not found." - } - ] -} diff --git a/test cases/failing/84 dub executable/meson.build b/test cases/failing/84 dub executable/meson.build new file mode 100644 index 0000000..9a134ea --- /dev/null +++ b/test cases/failing/84 dub executable/meson.build @@ -0,0 +1,11 @@ +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + +dependency('dubtestproject:test1', method: 'dub') # Not library (executable) diff --git a/test cases/failing/84 dub executable/test.json b/test cases/failing/84 dub executable/test.json new file mode 100644 index 0000000..6dfff62 --- /dev/null +++ b/test cases/failing/84 dub executable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/84 dub executable/meson.build:11:0: ERROR: Dependency \"dubtestproject:test1\" not found" + } + ] +} diff --git a/test cases/failing/84 dub libray/meson.build b/test cases/failing/84 dub libray/meson.build deleted file mode 100644 index 306d5b3..0000000 --- a/test cases/failing/84 dub libray/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('dub') - -if not add_languages('d', required: false) - error('MESON_SKIP_TEST test requires D compiler') -endif - -if not find_program('dub', required: false).found() - error('MESON_SKIP_TEST test requires dub') -endif - -dependency('dubtestproject', method: 'dub') # Not library (none) diff --git a/test cases/failing/84 dub libray/test.json b/test cases/failing/84 dub libray/test.json deleted file mode 100644 index 23fe6e5..0000000 --- a/test cases/failing/84 dub libray/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/84 dub libray/meson.build:11:0: ERROR: Dependency \"dubtestproject\" not found" - } - ] -} diff --git a/test cases/failing/85 dub compiler/meson.build b/test cases/failing/85 dub compiler/meson.build new file mode 100644 index 0000000..36f1849 --- /dev/null +++ b/test cases/failing/85 dub compiler/meson.build @@ -0,0 +1,17 @@ +project('dub') + +if not add_languages('d', required: false) + error('MESON_SKIP_TEST test requires D compiler') +endif + +if meson.get_compiler('d').get_id() == 'dmd' + if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' + error('MESON_SKIP_TEST Windows test environment lacks multiple D compilers.') + endif +endif + +if not find_program('dub', required: false).found() + error('MESON_SKIP_TEST test requires dub') +endif + +dependency('dubtestproject:test2', method: 'dub') # Compiler mismatch diff --git a/test cases/failing/85 dub compiler/test.json b/test cases/failing/85 dub compiler/test.json new file mode 100644 index 0000000..50ee39b --- /dev/null +++ b/test cases/failing/85 dub compiler/test.json @@ -0,0 +1,19 @@ +{ + "matrix": { + "options": { + "warning_level": [ + { + "val": "1", + "skip_on_env": [ + "SINGLE_DUB_COMPILER" + ] + } + ] + } + }, + "stdout": [ + { + "line": "test cases/failing/85 dub compiler/meson.build:17:0: ERROR: Dependency \"dubtestproject:test2\" not found" + } + ] +} diff --git a/test cases/failing/85 dub executable/meson.build b/test cases/failing/85 dub executable/meson.build deleted file mode 100644 index 9a134ea..0000000 --- a/test cases/failing/85 dub executable/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('dub') - -if not add_languages('d', required: false) - error('MESON_SKIP_TEST test requires D compiler') -endif - -if not find_program('dub', required: false).found() - error('MESON_SKIP_TEST test requires dub') -endif - -dependency('dubtestproject:test1', method: 'dub') # Not library (executable) diff --git a/test cases/failing/85 dub executable/test.json b/test cases/failing/85 dub executable/test.json deleted file mode 100644 index 4a8674c..0000000 --- a/test cases/failing/85 dub executable/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/85 dub executable/meson.build:11:0: ERROR: Dependency \"dubtestproject:test1\" not found" - } - ] -} diff --git a/test cases/failing/86 dub compiler/meson.build b/test cases/failing/86 dub compiler/meson.build deleted file mode 100644 index 36f1849..0000000 --- a/test cases/failing/86 dub compiler/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -project('dub') - -if not add_languages('d', required: false) - error('MESON_SKIP_TEST test requires D compiler') -endif - -if meson.get_compiler('d').get_id() == 'dmd' - if host_machine.system() == 'windows' or host_machine.system() == 'cygwin' - error('MESON_SKIP_TEST Windows test environment lacks multiple D compilers.') - endif -endif - -if not find_program('dub', required: false).found() - error('MESON_SKIP_TEST test requires dub') -endif - -dependency('dubtestproject:test2', method: 'dub') # Compiler mismatch diff --git a/test cases/failing/86 dub compiler/test.json b/test cases/failing/86 dub compiler/test.json deleted file mode 100644 index ab6caff..0000000 --- a/test cases/failing/86 dub compiler/test.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "matrix": { - "options": { - "warning_level": [ - { - "val": "1", - "skip_on_env": [ - "SINGLE_DUB_COMPILER" - ] - } - ] - } - }, - "stdout": [ - { - "line": "test cases/failing/86 dub compiler/meson.build:17:0: ERROR: Dependency \"dubtestproject:test2\" not found" - } - ] -} diff --git a/test cases/failing/86 subproj not-found dep/meson.build b/test cases/failing/86 subproj not-found dep/meson.build new file mode 100644 index 0000000..2b17df1 --- /dev/null +++ b/test cases/failing/86 subproj not-found dep/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +missing = dependency('', fallback: ['somesubproj', 'notfound_dep'], required: true) diff --git a/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build b/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build new file mode 100644 index 0000000..5f451f4 --- /dev/null +++ b/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build @@ -0,0 +1,3 @@ +project('dep', 'c') + +notfound_dep = dependency('', required : false) diff --git a/test cases/failing/86 subproj not-found dep/test.json b/test cases/failing/86 subproj not-found dep/test.json new file mode 100644 index 0000000..b662643 --- /dev/null +++ b/test cases/failing/86 subproj not-found dep/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/86 subproj not-found dep/meson.build:2:0: ERROR: Dependency '(anonymous)' is required but not found." + } + ] +} diff --git a/test cases/failing/87 invalid configure file/input b/test cases/failing/87 invalid configure file/input new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/87 invalid configure file/meson.build b/test cases/failing/87 invalid configure file/meson.build new file mode 100644 index 0000000..08eca2b --- /dev/null +++ b/test cases/failing/87 invalid configure file/meson.build @@ -0,0 +1,9 @@ +project('invalid configura file') + +configure_file( + configuration : configuration_data(), + input : 'input', + output : 'output', + install_dir : '', + install : true, +) diff --git a/test cases/failing/87 invalid configure file/test.json b/test cases/failing/87 invalid configure file/test.json new file mode 100644 index 0000000..d8ea73d --- /dev/null +++ b/test cases/failing/87 invalid configure file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/87 invalid configure file/meson.build:3:0: ERROR: \"install_dir\" must be specified when \"install\" in a configure_file is true" + } + ] +} diff --git a/test cases/failing/87 subproj not-found dep/meson.build b/test cases/failing/87 subproj not-found dep/meson.build deleted file mode 100644 index 2b17df1..0000000 --- a/test cases/failing/87 subproj not-found dep/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('dep-test') -missing = dependency('', fallback: ['somesubproj', 'notfound_dep'], required: true) diff --git a/test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build b/test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build deleted file mode 100644 index 5f451f4..0000000 --- a/test cases/failing/87 subproj not-found dep/subprojects/somesubproj/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('dep', 'c') - -notfound_dep = dependency('', required : false) diff --git a/test cases/failing/87 subproj not-found dep/test.json b/test cases/failing/87 subproj not-found dep/test.json deleted file mode 100644 index 160e9d3..0000000 --- a/test cases/failing/87 subproj not-found dep/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/87 subproj not-found dep/meson.build:2:0: ERROR: Dependency '(anonymous)' is required but not found." - } - ] -} diff --git a/test cases/failing/88 invalid configure file/input b/test cases/failing/88 invalid configure file/input deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/88 invalid configure file/meson.build b/test cases/failing/88 invalid configure file/meson.build deleted file mode 100644 index 08eca2b..0000000 --- a/test cases/failing/88 invalid configure file/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('invalid configura file') - -configure_file( - configuration : configuration_data(), - input : 'input', - output : 'output', - install_dir : '', - install : true, -) diff --git a/test cases/failing/88 invalid configure file/test.json b/test cases/failing/88 invalid configure file/test.json deleted file mode 100644 index b551f61..0000000 --- a/test cases/failing/88 invalid configure file/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/88 invalid configure file/meson.build:3:0: ERROR: \"install_dir\" must be specified when \"install\" in a configure_file is true" - } - ] -} diff --git a/test cases/failing/88 kwarg dupe/meson.build b/test cases/failing/88 kwarg dupe/meson.build new file mode 100644 index 0000000..06821a2 --- /dev/null +++ b/test cases/failing/88 kwarg dupe/meson.build @@ -0,0 +1,6 @@ +project('dupe kwarg', 'c') + +dupedict = {'install': true} + +executable('prog', 'prog.c', install: true, + kwargs: dupedict) diff --git a/test cases/failing/88 kwarg dupe/prog.c b/test cases/failing/88 kwarg dupe/prog.c new file mode 100644 index 0000000..5f3fbe6 --- /dev/null +++ b/test cases/failing/88 kwarg dupe/prog.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + printf("I don't get built. It makes me saaaaaad. :(\n"); + return 0; +} diff --git a/test cases/failing/88 kwarg dupe/test.json b/test cases/failing/88 kwarg dupe/test.json new file mode 100644 index 0000000..cfd68eb --- /dev/null +++ b/test cases/failing/88 kwarg dupe/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/88 kwarg dupe/meson.build:5:0: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." + } + ] +} diff --git a/test cases/failing/89 kwarg dupe/meson.build b/test cases/failing/89 kwarg dupe/meson.build deleted file mode 100644 index 06821a2..0000000 --- a/test cases/failing/89 kwarg dupe/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('dupe kwarg', 'c') - -dupedict = {'install': true} - -executable('prog', 'prog.c', install: true, - kwargs: dupedict) diff --git a/test cases/failing/89 kwarg dupe/prog.c b/test cases/failing/89 kwarg dupe/prog.c deleted file mode 100644 index 5f3fbe6..0000000 --- a/test cases/failing/89 kwarg dupe/prog.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - printf("I don't get built. It makes me saaaaaad. :(\n"); - return 0; -} diff --git a/test cases/failing/89 kwarg dupe/test.json b/test cases/failing/89 kwarg dupe/test.json deleted file mode 100644 index ec46600..0000000 --- a/test cases/failing/89 kwarg dupe/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/89 kwarg dupe/meson.build:5:0: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." - } - ] -} diff --git a/test cases/failing/89 missing pch file/meson.build b/test cases/failing/89 missing pch file/meson.build new file mode 100644 index 0000000..a67b798 --- /dev/null +++ b/test cases/failing/89 missing pch file/meson.build @@ -0,0 +1,3 @@ +project('pch test', 'c') +exe = executable('prog', 'prog.c', +c_pch : ['pch/prog_pch.c', 'pch/prog.h']) diff --git a/test cases/failing/89 missing pch file/prog.c b/test cases/failing/89 missing pch file/prog.c new file mode 100644 index 0000000..11b7fad --- /dev/null +++ b/test cases/failing/89 missing pch file/prog.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/test cases/failing/89 missing pch file/test.json b/test cases/failing/89 missing pch file/test.json new file mode 100644 index 0000000..638d2e7 --- /dev/null +++ b/test cases/failing/89 missing pch file/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "comment": "literal 'pch/prog.h' from meson.build appears in output, irrespective of os.path.sep", + "line": "test cases/failing/89 missing pch file/meson.build:2:0: ERROR: File pch/prog.h does not exist." + } + ] +} diff --git a/test cases/failing/90 missing pch file/meson.build b/test cases/failing/90 missing pch file/meson.build deleted file mode 100644 index a67b798..0000000 --- a/test cases/failing/90 missing pch file/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('pch test', 'c') -exe = executable('prog', 'prog.c', -c_pch : ['pch/prog_pch.c', 'pch/prog.h']) diff --git a/test cases/failing/90 missing pch file/prog.c b/test cases/failing/90 missing pch file/prog.c deleted file mode 100644 index 11b7fad..0000000 --- a/test cases/failing/90 missing pch file/prog.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char **argv) { - return 0; -} diff --git a/test cases/failing/90 missing pch file/test.json b/test cases/failing/90 missing pch file/test.json deleted file mode 100644 index f55eb47..0000000 --- a/test cases/failing/90 missing pch file/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "comment": "literal 'pch/prog.h' from meson.build appears in output, irrespective of os.path.sep", - "line": "test cases/failing/90 missing pch file/meson.build:2:0: ERROR: File pch/prog.h does not exist." - } - ] -} diff --git a/test cases/failing/90 pch source different folder/include/pch.h b/test cases/failing/90 pch source different folder/include/pch.h new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/90 pch source different folder/meson.build b/test cases/failing/90 pch source different folder/meson.build new file mode 100644 index 0000000..d320717 --- /dev/null +++ b/test cases/failing/90 pch source different folder/meson.build @@ -0,0 +1,5 @@ +project('pch', 'c') +# It is not allowed to have the PCH implementation in a different +# folder than the header. +exe = executable('prog', 'prog.c', + c_pch : ['include/pch.h', 'src/pch.c']) diff --git a/test cases/failing/90 pch source different folder/prog.c b/test cases/failing/90 pch source different folder/prog.c new file mode 100644 index 0000000..3fb1295 --- /dev/null +++ b/test cases/failing/90 pch source different folder/prog.c @@ -0,0 +1 @@ +int main(void) {} \ No newline at end of file diff --git a/test cases/failing/90 pch source different folder/src/pch.c b/test cases/failing/90 pch source different folder/src/pch.c new file mode 100644 index 0000000..e69de29 diff --git a/test cases/failing/90 pch source different folder/test.json b/test cases/failing/90 pch source different folder/test.json new file mode 100644 index 0000000..cbbac3d --- /dev/null +++ b/test cases/failing/90 pch source different folder/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/90 pch source different folder/meson.build:4:0: ERROR: PCH files must be stored in the same folder." + } + ] +} diff --git a/test cases/failing/91 pch source different folder/include/pch.h b/test cases/failing/91 pch source different folder/include/pch.h deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/91 pch source different folder/meson.build b/test cases/failing/91 pch source different folder/meson.build deleted file mode 100644 index d320717..0000000 --- a/test cases/failing/91 pch source different folder/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('pch', 'c') -# It is not allowed to have the PCH implementation in a different -# folder than the header. -exe = executable('prog', 'prog.c', - c_pch : ['include/pch.h', 'src/pch.c']) diff --git a/test cases/failing/91 pch source different folder/prog.c b/test cases/failing/91 pch source different folder/prog.c deleted file mode 100644 index 3fb1295..0000000 --- a/test cases/failing/91 pch source different folder/prog.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) {} \ No newline at end of file diff --git a/test cases/failing/91 pch source different folder/src/pch.c b/test cases/failing/91 pch source different folder/src/pch.c deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/failing/91 pch source different folder/test.json b/test cases/failing/91 pch source different folder/test.json deleted file mode 100644 index 6309f6c..0000000 --- a/test cases/failing/91 pch source different folder/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/91 pch source different folder/meson.build:4:0: ERROR: PCH files must be stored in the same folder." - } - ] -} diff --git a/test cases/failing/91 unknown config tool/meson.build b/test cases/failing/91 unknown config tool/meson.build new file mode 100644 index 0000000..536976e --- /dev/null +++ b/test cases/failing/91 unknown config tool/meson.build @@ -0,0 +1,2 @@ +project('no-such-config-tool') +dependency('no-such-config-tool', method:'config-tool') diff --git a/test cases/failing/91 unknown config tool/test.json b/test cases/failing/91 unknown config tool/test.json new file mode 100644 index 0000000..e225167 --- /dev/null +++ b/test cases/failing/91 unknown config tool/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/91 unknown config tool/meson.build:2:0: ERROR: Dependency \"no-such-config-tool\" not found" + } + ] +} diff --git a/test cases/failing/92 custom target install data/Info.plist.cpp b/test cases/failing/92 custom target install data/Info.plist.cpp new file mode 100644 index 0000000..9ca2fcb --- /dev/null +++ b/test cases/failing/92 custom target install data/Info.plist.cpp @@ -0,0 +1 @@ +Some data which gets processed before installation diff --git a/test cases/failing/92 custom target install data/meson.build b/test cases/failing/92 custom target install data/meson.build new file mode 100644 index 0000000..00d348c --- /dev/null +++ b/test cases/failing/92 custom target install data/meson.build @@ -0,0 +1,11 @@ +project('custom target install data') + +preproc = find_program('preproc.py') + +t = custom_target('Info.plist', + command: [preproc, '@INPUT@', '@OUTPUT@'], + input: 'Info.plist.cpp', + output: 'Info.plist', +) + +install_data(t) diff --git a/test cases/failing/92 custom target install data/preproc.py b/test cases/failing/92 custom target install data/preproc.py new file mode 100644 index 0000000..e6eba4c --- /dev/null +++ b/test cases/failing/92 custom target install data/preproc.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sys + +if len(sys.argv) != 3: + print(sys.argv[0], '', '') + +inf = sys.argv[1] +outf = sys.argv[2] + +with open(outf, 'wb') as o: + with open(inf, 'rb') as i: + o.write(i.read()) diff --git a/test cases/failing/92 custom target install data/test.json b/test cases/failing/92 custom target install data/test.json new file mode 100644 index 0000000..46ab013 --- /dev/null +++ b/test cases/failing/92 custom target install data/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/92 custom target install data/meson.build:11:0: ERROR: install_data argument 1 was of type \"CustomTarget\" but should have been one of: \"str\", \"File\"" + } + ] +} diff --git a/test cases/failing/92 unknown config tool/meson.build b/test cases/failing/92 unknown config tool/meson.build deleted file mode 100644 index 536976e..0000000 --- a/test cases/failing/92 unknown config tool/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no-such-config-tool') -dependency('no-such-config-tool', method:'config-tool') diff --git a/test cases/failing/92 unknown config tool/test.json b/test cases/failing/92 unknown config tool/test.json deleted file mode 100644 index c4484f3..0000000 --- a/test cases/failing/92 unknown config tool/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/92 unknown config tool/meson.build:2:0: ERROR: Dependency \"no-such-config-tool\" not found" - } - ] -} diff --git a/test cases/failing/93 add dict non string key/meson.build b/test cases/failing/93 add dict non string key/meson.build new file mode 100644 index 0000000..c81a3f7 --- /dev/null +++ b/test cases/failing/93 add dict non string key/meson.build @@ -0,0 +1,9 @@ +project('add dictionary entry using non-string key') + +dict = {} + +# An integer variable to be used as a key +key = 1 + +# Add new entry using integer variable as key should fail +dict += {key : 'myValue'} \ No newline at end of file diff --git a/test cases/failing/93 add dict non string key/test.json b/test cases/failing/93 add dict non string key/test.json new file mode 100644 index 0000000..3ef2dde --- /dev/null +++ b/test cases/failing/93 add dict non string key/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/93 add dict non string key/meson.build:9:0: ERROR: Key must be a string" + } + ] +} diff --git a/test cases/failing/93 custom target install data/Info.plist.cpp b/test cases/failing/93 custom target install data/Info.plist.cpp deleted file mode 100644 index 9ca2fcb..0000000 --- a/test cases/failing/93 custom target install data/Info.plist.cpp +++ /dev/null @@ -1 +0,0 @@ -Some data which gets processed before installation diff --git a/test cases/failing/93 custom target install data/meson.build b/test cases/failing/93 custom target install data/meson.build deleted file mode 100644 index 00d348c..0000000 --- a/test cases/failing/93 custom target install data/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('custom target install data') - -preproc = find_program('preproc.py') - -t = custom_target('Info.plist', - command: [preproc, '@INPUT@', '@OUTPUT@'], - input: 'Info.plist.cpp', - output: 'Info.plist', -) - -install_data(t) diff --git a/test cases/failing/93 custom target install data/preproc.py b/test cases/failing/93 custom target install data/preproc.py deleted file mode 100644 index e6eba4c..0000000 --- a/test cases/failing/93 custom target install data/preproc.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -if len(sys.argv) != 3: - print(sys.argv[0], '', '') - -inf = sys.argv[1] -outf = sys.argv[2] - -with open(outf, 'wb') as o: - with open(inf, 'rb') as i: - o.write(i.read()) diff --git a/test cases/failing/93 custom target install data/test.json b/test cases/failing/93 custom target install data/test.json deleted file mode 100644 index caeafb1..0000000 --- a/test cases/failing/93 custom target install data/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/93 custom target install data/meson.build:11:0: ERROR: install_data argument 1 was of type \"CustomTarget\" but should have been one of: \"str\", \"File\"" - } - ] -} diff --git a/test cases/failing/94 add dict duplicate keys/meson.build b/test cases/failing/94 add dict duplicate keys/meson.build new file mode 100644 index 0000000..7a9b523 --- /dev/null +++ b/test cases/failing/94 add dict duplicate keys/meson.build @@ -0,0 +1,9 @@ +project('add dictionary entries with duplicate keys') + +dict = {} + +# A variable to be used as a key +key = 'myKey' + +# Add two entries with duplicate keys should fail +dict += {key : 'myValue1', key : 'myValue2'} \ No newline at end of file diff --git a/test cases/failing/94 add dict duplicate keys/test.json b/test cases/failing/94 add dict duplicate keys/test.json new file mode 100644 index 0000000..5b2d7d6 --- /dev/null +++ b/test cases/failing/94 add dict duplicate keys/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/94 add dict duplicate keys/meson.build:9:0: ERROR: Duplicate dictionary key: myKey" + } + ] +} diff --git a/test cases/failing/94 add dict non string key/meson.build b/test cases/failing/94 add dict non string key/meson.build deleted file mode 100644 index c81a3f7..0000000 --- a/test cases/failing/94 add dict non string key/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('add dictionary entry using non-string key') - -dict = {} - -# An integer variable to be used as a key -key = 1 - -# Add new entry using integer variable as key should fail -dict += {key : 'myValue'} \ No newline at end of file diff --git a/test cases/failing/94 add dict non string key/test.json b/test cases/failing/94 add dict non string key/test.json deleted file mode 100644 index 09459dd..0000000 --- a/test cases/failing/94 add dict non string key/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/94 add dict non string key/meson.build:9:0: ERROR: Key must be a string" - } - ] -} diff --git a/test cases/failing/95 add dict duplicate keys/meson.build b/test cases/failing/95 add dict duplicate keys/meson.build deleted file mode 100644 index 7a9b523..0000000 --- a/test cases/failing/95 add dict duplicate keys/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('add dictionary entries with duplicate keys') - -dict = {} - -# A variable to be used as a key -key = 'myKey' - -# Add two entries with duplicate keys should fail -dict += {key : 'myValue1', key : 'myValue2'} \ No newline at end of file diff --git a/test cases/failing/95 add dict duplicate keys/test.json b/test cases/failing/95 add dict duplicate keys/test.json deleted file mode 100644 index ae9a81f..0000000 --- a/test cases/failing/95 add dict duplicate keys/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/95 add dict duplicate keys/meson.build:9:0: ERROR: Duplicate dictionary key: myKey" - } - ] -} diff --git a/test cases/failing/95 no host get_external_property/meson.build b/test cases/failing/95 no host get_external_property/meson.build new file mode 100644 index 0000000..c956754 --- /dev/null +++ b/test cases/failing/95 no host get_external_property/meson.build @@ -0,0 +1,3 @@ +project('missing property') + +message(meson.get_external_property('nonexisting')) diff --git a/test cases/failing/95 no host get_external_property/test.json b/test cases/failing/95 no host get_external_property/test.json new file mode 100644 index 0000000..0ef6dd2 --- /dev/null +++ b/test cases/failing/95 no host get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/95 no host get_external_property/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting" + } + ] +} diff --git a/test cases/failing/96 no host get_external_property/meson.build b/test cases/failing/96 no host get_external_property/meson.build deleted file mode 100644 index c956754..0000000 --- a/test cases/failing/96 no host get_external_property/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('missing property') - -message(meson.get_external_property('nonexisting')) diff --git a/test cases/failing/96 no host get_external_property/test.json b/test cases/failing/96 no host get_external_property/test.json deleted file mode 100644 index 3376a0b..0000000 --- a/test cases/failing/96 no host get_external_property/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/96 no host get_external_property/meson.build:3:0: ERROR: Unknown property for host machine: nonexisting" - } - ] -} diff --git a/test cases/failing/96 no native compiler/main.c b/test cases/failing/96 no native compiler/main.c new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/test cases/failing/96 no native compiler/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/96 no native compiler/meson.build b/test cases/failing/96 no native compiler/meson.build new file mode 100644 index 0000000..f0126ac --- /dev/null +++ b/test cases/failing/96 no native compiler/meson.build @@ -0,0 +1,12 @@ +project('no native compiler') + +if not meson.is_cross_build() + error('MESON_SKIP_TEST test only applicable when cross building.') +endif + +if add_languages('c', required: false, native: true) + error('MESON_SKIP_TEST test only applicable when native compiler not available.') +endif + +add_languages('c') +executable('main', 'main.c', native: true) diff --git a/test cases/failing/96 no native compiler/test.json b/test cases/failing/96 no native compiler/test.json new file mode 100644 index 0000000..0107727 --- /dev/null +++ b/test cases/failing/96 no native compiler/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/96 no native compiler/meson.build:12:0: ERROR: No host machine compiler for \"main.c\"" + } + ] +} diff --git a/test cases/failing/97 no native compiler/main.c b/test cases/failing/97 no native compiler/main.c deleted file mode 100644 index 9b6bdc2..0000000 --- a/test cases/failing/97 no native compiler/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/failing/97 no native compiler/meson.build b/test cases/failing/97 no native compiler/meson.build deleted file mode 100644 index f0126ac..0000000 --- a/test cases/failing/97 no native compiler/meson.build +++ /dev/null @@ -1,12 +0,0 @@ -project('no native compiler') - -if not meson.is_cross_build() - error('MESON_SKIP_TEST test only applicable when cross building.') -endif - -if add_languages('c', required: false, native: true) - error('MESON_SKIP_TEST test only applicable when native compiler not available.') -endif - -add_languages('c') -executable('main', 'main.c', native: true) diff --git a/test cases/failing/97 no native compiler/test.json b/test cases/failing/97 no native compiler/test.json deleted file mode 100644 index b79bd3b..0000000 --- a/test cases/failing/97 no native compiler/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/97 no native compiler/meson.build:12:0: ERROR: No host machine compiler for \"main.c\"" - } - ] -} diff --git a/test cases/failing/97 subdir parse error/meson.build b/test cases/failing/97 subdir parse error/meson.build new file mode 100644 index 0000000..ee5bb0c --- /dev/null +++ b/test cases/failing/97 subdir parse error/meson.build @@ -0,0 +1,2 @@ +project('subdir false plusassign', 'c') +subdir('subdir') diff --git a/test cases/failing/97 subdir parse error/subdir/meson.build b/test cases/failing/97 subdir parse error/subdir/meson.build new file mode 100644 index 0000000..3ac5ef9 --- /dev/null +++ b/test cases/failing/97 subdir parse error/subdir/meson.build @@ -0,0 +1 @@ +3 += 4 diff --git a/test cases/failing/97 subdir parse error/test.json b/test cases/failing/97 subdir parse error/test.json new file mode 100644 index 0000000..414789e --- /dev/null +++ b/test cases/failing/97 subdir parse error/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/97 subdir parse error/subdir/meson.build:1:0: ERROR: Plusassignment target must be an id." + } + ] +} diff --git a/test cases/failing/98 invalid option file/meson.build b/test cases/failing/98 invalid option file/meson.build new file mode 100644 index 0000000..b0347c3 --- /dev/null +++ b/test cases/failing/98 invalid option file/meson.build @@ -0,0 +1 @@ +project('invalid option file') diff --git a/test cases/failing/98 invalid option file/meson_options.txt b/test cases/failing/98 invalid option file/meson_options.txt new file mode 100644 index 0000000..eef843b --- /dev/null +++ b/test cases/failing/98 invalid option file/meson_options.txt @@ -0,0 +1 @@ +' diff --git a/test cases/failing/98 invalid option file/test.json b/test cases/failing/98 invalid option file/test.json new file mode 100644 index 0000000..6ab5393 --- /dev/null +++ b/test cases/failing/98 invalid option file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/98 invalid option file/meson_options.txt:1:0: ERROR: lexer" + } + ] +} diff --git a/test cases/failing/98 subdir parse error/meson.build b/test cases/failing/98 subdir parse error/meson.build deleted file mode 100644 index ee5bb0c..0000000 --- a/test cases/failing/98 subdir parse error/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('subdir false plusassign', 'c') -subdir('subdir') diff --git a/test cases/failing/98 subdir parse error/subdir/meson.build b/test cases/failing/98 subdir parse error/subdir/meson.build deleted file mode 100644 index 3ac5ef9..0000000 --- a/test cases/failing/98 subdir parse error/subdir/meson.build +++ /dev/null @@ -1 +0,0 @@ -3 += 4 diff --git a/test cases/failing/98 subdir parse error/test.json b/test cases/failing/98 subdir parse error/test.json deleted file mode 100644 index 8e04799..0000000 --- a/test cases/failing/98 subdir parse error/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/98 subdir parse error/subdir/meson.build:1:0: ERROR: Plusassignment target must be an id." - } - ] -} diff --git a/test cases/failing/99 invalid option file/meson.build b/test cases/failing/99 invalid option file/meson.build deleted file mode 100644 index b0347c3..0000000 --- a/test cases/failing/99 invalid option file/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('invalid option file') diff --git a/test cases/failing/99 invalid option file/meson_options.txt b/test cases/failing/99 invalid option file/meson_options.txt deleted file mode 100644 index eef843b..0000000 --- a/test cases/failing/99 invalid option file/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -' diff --git a/test cases/failing/99 invalid option file/test.json b/test cases/failing/99 invalid option file/test.json deleted file mode 100644 index ebfddd8..0000000 --- a/test cases/failing/99 invalid option file/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/99 invalid option file/meson_options.txt:1:0: ERROR: lexer" - } - ] -} diff --git a/test cases/failing/99 no lang/main.c b/test cases/failing/99 no lang/main.c new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/test cases/failing/99 no lang/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/99 no lang/meson.build b/test cases/failing/99 no lang/meson.build new file mode 100644 index 0000000..85c5db8 --- /dev/null +++ b/test cases/failing/99 no lang/meson.build @@ -0,0 +1,2 @@ +project('target without lang') +executable('main', 'main.c') diff --git a/test cases/failing/99 no lang/test.json b/test cases/failing/99 no lang/test.json new file mode 100644 index 0000000..48c6dd7 --- /dev/null +++ b/test cases/failing/99 no lang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/99 no lang/meson.build:2:0: ERROR: No host machine compiler for 'main.c'" + } + ] +} 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 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/39 external, internal library rpath/built library/bar.c b/test cases/unit/39 external, internal library rpath/built library/bar.c new file mode 100644 index 0000000..4f5662e --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/built library/bar.c @@ -0,0 +1,7 @@ +int foo_system_value (void); +int faa_system_value (void); + +int bar_built_value (int in) +{ + return faa_system_value() + foo_system_value() + in; +} diff --git a/test cases/unit/39 external, internal library rpath/built library/meson.build b/test cases/unit/39 external, internal library rpath/built library/meson.build new file mode 100644 index 0000000..07fe7bb --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/built library/meson.build @@ -0,0 +1,26 @@ +project('built library', 'c') + +cc = meson.get_compiler('c') + +if host_machine.system() != 'cygwin' + # bar_in_system has undefined symbols, but still must be found + bar_system_dep = cc.find_library('bar_in_system') +endif + +foo_system_dep = cc.find_library('foo_in_system') + +faa_pkg_dep = dependency('faa_pkg') + +l = shared_library('bar_built', 'bar.c', + install: true, + dependencies : [foo_system_dep, faa_pkg_dep]) + +if host_machine.system() == 'darwin' + e = executable('prog', 'prog.c', link_with: l, install: true) + test('testprog', e) +elif host_machine.system() == 'linux' + e = executable('prog', 'prog.c', link_with: l, install: true, + install_rpath: '$ORIGIN/..' / get_option('libdir'), + ) + test('testprog', e) +endif diff --git a/test cases/unit/39 external, internal library rpath/built library/meson_options.txt b/test cases/unit/39 external, internal library rpath/built library/meson_options.txt new file mode 100644 index 0000000..aa1d2ec --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/built library/meson_options.txt @@ -0,0 +1 @@ +option('foo_system_path', type: 'string', value: '') diff --git a/test cases/unit/39 external, internal library rpath/built library/prog.c b/test cases/unit/39 external, internal library rpath/built library/prog.c new file mode 100644 index 0000000..e3d4cf6 --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/built library/prog.c @@ -0,0 +1,7 @@ +int bar_built_value (int in); + +int main (int argc, char *argv[]) +{ + // this will evaluate to 0 + return bar_built_value(10) - (42 + 1969 + 10); +} diff --git a/test cases/unit/39 external, internal library rpath/external library/bar.c b/test cases/unit/39 external, internal library rpath/external library/bar.c new file mode 100644 index 0000000..c6f42d6 --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/external library/bar.c @@ -0,0 +1,6 @@ +int some_undefined_func (void); + +int bar_system_value (void) +{ + return some_undefined_func (); +} diff --git a/test cases/unit/39 external, internal library rpath/external library/faa.c b/test cases/unit/39 external, internal library rpath/external library/faa.c new file mode 100644 index 0000000..4733575 --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/external library/faa.c @@ -0,0 +1,4 @@ +int faa_system_value (void) +{ + return 1969; +} diff --git a/test cases/unit/39 external, internal library rpath/external library/foo.c b/test cases/unit/39 external, internal library rpath/external library/foo.c new file mode 100644 index 0000000..a34e4a8 --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/external library/foo.c @@ -0,0 +1,4 @@ +int foo_system_value (void) +{ + return 42; +} diff --git a/test cases/unit/39 external, internal library rpath/external library/meson.build b/test cases/unit/39 external, internal library rpath/external library/meson.build new file mode 100644 index 0000000..06ffa0f --- /dev/null +++ b/test cases/unit/39 external, internal library rpath/external library/meson.build @@ -0,0 +1,22 @@ +project('system library', 'c', default_options : ['b_lundef=false']) + +shared_library('foo_in_system', 'foo.c', install : true) +l = shared_library('faa_pkg', 'faa.c', install: true) + +if host_machine.system() == 'darwin' + ldflags = ['-framework', 'CoreFoundation', '-framework', 'CoreMedia'] + allow_undef_args = ['-Wl,-undefined,dynamic_lookup'] +else + ldflags = ['-Wl,-rpath,${libdir}'] + allow_undef_args = [] +endif + +pkg = import('pkgconfig') +pkg.generate(name: 'faa_pkg', + libraries: [l] + ldflags, + description: 'FAA, a pkg-config test library') + +# cygwin DLLs can't have undefined symbols +if host_machine.system() != 'cygwin' + shared_library('bar_in_system', 'bar.c', install : true, link_args : allow_undef_args) +endif diff --git a/test cases/unit/40 external, internal library rpath/built library/bar.c b/test cases/unit/40 external, internal library rpath/built library/bar.c deleted file mode 100644 index 4f5662e..0000000 --- a/test cases/unit/40 external, internal library rpath/built library/bar.c +++ /dev/null @@ -1,7 +0,0 @@ -int foo_system_value (void); -int faa_system_value (void); - -int bar_built_value (int in) -{ - return faa_system_value() + foo_system_value() + in; -} diff --git a/test cases/unit/40 external, internal library rpath/built library/meson.build b/test cases/unit/40 external, internal library rpath/built library/meson.build deleted file mode 100644 index 07fe7bb..0000000 --- a/test cases/unit/40 external, internal library rpath/built library/meson.build +++ /dev/null @@ -1,26 +0,0 @@ -project('built library', 'c') - -cc = meson.get_compiler('c') - -if host_machine.system() != 'cygwin' - # bar_in_system has undefined symbols, but still must be found - bar_system_dep = cc.find_library('bar_in_system') -endif - -foo_system_dep = cc.find_library('foo_in_system') - -faa_pkg_dep = dependency('faa_pkg') - -l = shared_library('bar_built', 'bar.c', - install: true, - dependencies : [foo_system_dep, faa_pkg_dep]) - -if host_machine.system() == 'darwin' - e = executable('prog', 'prog.c', link_with: l, install: true) - test('testprog', e) -elif host_machine.system() == 'linux' - e = executable('prog', 'prog.c', link_with: l, install: true, - install_rpath: '$ORIGIN/..' / get_option('libdir'), - ) - test('testprog', e) -endif diff --git a/test cases/unit/40 external, internal library rpath/built library/meson_options.txt b/test cases/unit/40 external, internal library rpath/built library/meson_options.txt deleted file mode 100644 index aa1d2ec..0000000 --- a/test cases/unit/40 external, internal library rpath/built library/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('foo_system_path', type: 'string', value: '') diff --git a/test cases/unit/40 external, internal library rpath/built library/prog.c b/test cases/unit/40 external, internal library rpath/built library/prog.c deleted file mode 100644 index e3d4cf6..0000000 --- a/test cases/unit/40 external, internal library rpath/built library/prog.c +++ /dev/null @@ -1,7 +0,0 @@ -int bar_built_value (int in); - -int main (int argc, char *argv[]) -{ - // this will evaluate to 0 - return bar_built_value(10) - (42 + 1969 + 10); -} diff --git a/test cases/unit/40 external, internal library rpath/external library/bar.c b/test cases/unit/40 external, internal library rpath/external library/bar.c deleted file mode 100644 index c6f42d6..0000000 --- a/test cases/unit/40 external, internal library rpath/external library/bar.c +++ /dev/null @@ -1,6 +0,0 @@ -int some_undefined_func (void); - -int bar_system_value (void) -{ - return some_undefined_func (); -} diff --git a/test cases/unit/40 external, internal library rpath/external library/faa.c b/test cases/unit/40 external, internal library rpath/external library/faa.c deleted file mode 100644 index 4733575..0000000 --- a/test cases/unit/40 external, internal library rpath/external library/faa.c +++ /dev/null @@ -1,4 +0,0 @@ -int faa_system_value (void) -{ - return 1969; -} diff --git a/test cases/unit/40 external, internal library rpath/external library/foo.c b/test cases/unit/40 external, internal library rpath/external library/foo.c deleted file mode 100644 index a34e4a8..0000000 --- a/test cases/unit/40 external, internal library rpath/external library/foo.c +++ /dev/null @@ -1,4 +0,0 @@ -int foo_system_value (void) -{ - return 42; -} diff --git a/test cases/unit/40 external, internal library rpath/external library/meson.build b/test cases/unit/40 external, internal library rpath/external library/meson.build deleted file mode 100644 index 06ffa0f..0000000 --- a/test cases/unit/40 external, internal library rpath/external library/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project('system library', 'c', default_options : ['b_lundef=false']) - -shared_library('foo_in_system', 'foo.c', install : true) -l = shared_library('faa_pkg', 'faa.c', install: true) - -if host_machine.system() == 'darwin' - ldflags = ['-framework', 'CoreFoundation', '-framework', 'CoreMedia'] - allow_undef_args = ['-Wl,-undefined,dynamic_lookup'] -else - ldflags = ['-Wl,-rpath,${libdir}'] - allow_undef_args = [] -endif - -pkg = import('pkgconfig') -pkg.generate(name: 'faa_pkg', - libraries: [l] + ldflags, - description: 'FAA, a pkg-config test library') - -# cygwin DLLs can't have undefined symbols -if host_machine.system() != 'cygwin' - shared_library('bar_in_system', 'bar.c', install : true, link_args : allow_undef_args) -endif diff --git a/test cases/unit/40 featurenew subprojects/meson.build b/test cases/unit/40 featurenew subprojects/meson.build new file mode 100644 index 0000000..d136bed --- /dev/null +++ b/test cases/unit/40 featurenew subprojects/meson.build @@ -0,0 +1,7 @@ +project('featurenew subproject', meson_version: '>=0.45') + +foo = {} + +subproject('foo') +subproject('bar') +subproject('baz') diff --git a/test cases/unit/40 featurenew subprojects/subprojects/bar/meson.build b/test cases/unit/40 featurenew subprojects/subprojects/bar/meson.build new file mode 100644 index 0000000..712a125 --- /dev/null +++ b/test cases/unit/40 featurenew subprojects/subprojects/bar/meson.build @@ -0,0 +1,3 @@ +project('foo subproject', meson_version: '>=0.46') + +import('python') diff --git a/test cases/unit/40 featurenew subprojects/subprojects/baz/meson.build b/test cases/unit/40 featurenew subprojects/subprojects/baz/meson.build new file mode 100644 index 0000000..811e7aa --- /dev/null +++ b/test cases/unit/40 featurenew subprojects/subprojects/baz/meson.build @@ -0,0 +1,3 @@ +project('baz subproject', meson_version: '!=0.40') + +disabler() diff --git a/test cases/unit/40 featurenew subprojects/subprojects/foo/meson.build b/test cases/unit/40 featurenew subprojects/subprojects/foo/meson.build new file mode 100644 index 0000000..0ef4472 --- /dev/null +++ b/test cases/unit/40 featurenew subprojects/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo subproject', meson_version: '>=0.40') + +disabler() diff --git a/test cases/unit/41 featurenew subprojects/meson.build b/test cases/unit/41 featurenew subprojects/meson.build deleted file mode 100644 index d136bed..0000000 --- a/test cases/unit/41 featurenew subprojects/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('featurenew subproject', meson_version: '>=0.45') - -foo = {} - -subproject('foo') -subproject('bar') -subproject('baz') diff --git a/test cases/unit/41 featurenew subprojects/subprojects/bar/meson.build b/test cases/unit/41 featurenew subprojects/subprojects/bar/meson.build deleted file mode 100644 index 712a125..0000000 --- a/test cases/unit/41 featurenew subprojects/subprojects/bar/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('foo subproject', meson_version: '>=0.46') - -import('python') diff --git a/test cases/unit/41 featurenew subprojects/subprojects/baz/meson.build b/test cases/unit/41 featurenew subprojects/subprojects/baz/meson.build deleted file mode 100644 index 811e7aa..0000000 --- a/test cases/unit/41 featurenew subprojects/subprojects/baz/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('baz subproject', meson_version: '!=0.40') - -disabler() diff --git a/test cases/unit/41 featurenew subprojects/subprojects/foo/meson.build b/test cases/unit/41 featurenew subprojects/subprojects/foo/meson.build deleted file mode 100644 index 0ef4472..0000000 --- a/test cases/unit/41 featurenew subprojects/subprojects/foo/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('foo subproject', meson_version: '>=0.40') - -disabler() diff --git a/test cases/unit/41 rpath order/meson.build b/test cases/unit/41 rpath order/meson.build new file mode 100644 index 0000000..a722894 --- /dev/null +++ b/test cases/unit/41 rpath order/meson.build @@ -0,0 +1,11 @@ +project('myexe', 'c') + +sub1 = subproject('sub1') +sub1_dep = sub1.get_variable('sub1_dep') + +sub2 = subproject('sub2') +sub2_dep = sub2.get_variable('sub2_dep') + +executable('myexe', + 'myexe.c', + dependencies: [sub1_dep, sub2_dep]) diff --git a/test cases/unit/41 rpath order/myexe.c b/test cases/unit/41 rpath order/myexe.c new file mode 100644 index 0000000..03b2213 --- /dev/null +++ b/test cases/unit/41 rpath order/myexe.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/unit/41 rpath order/subprojects/sub1/lib.c b/test cases/unit/41 rpath order/subprojects/sub1/lib.c new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/41 rpath order/subprojects/sub1/meson.build b/test cases/unit/41 rpath order/subprojects/sub1/meson.build new file mode 100644 index 0000000..4dd5d08 --- /dev/null +++ b/test cases/unit/41 rpath order/subprojects/sub1/meson.build @@ -0,0 +1,5 @@ +project('sub1', 'c') + +sub1_lib = library('sub1', 'lib.c') + +sub1_dep = declare_dependency(link_with : sub1_lib) diff --git a/test cases/unit/41 rpath order/subprojects/sub2/lib.c b/test cases/unit/41 rpath order/subprojects/sub2/lib.c new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/41 rpath order/subprojects/sub2/meson.build b/test cases/unit/41 rpath order/subprojects/sub2/meson.build new file mode 100644 index 0000000..bc3510d --- /dev/null +++ b/test cases/unit/41 rpath order/subprojects/sub2/meson.build @@ -0,0 +1,5 @@ +project('sub2', 'c') + +sub2_lib = library('sub2', 'lib.c') + +sub2_dep = declare_dependency(link_with : sub2_lib) diff --git a/test cases/unit/42 dep order/lib1.c b/test cases/unit/42 dep order/lib1.c new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/42 dep order/lib2.c b/test cases/unit/42 dep order/lib2.c new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/42 dep order/meson.build b/test cases/unit/42 dep order/meson.build new file mode 100644 index 0000000..17cf9df --- /dev/null +++ b/test cases/unit/42 dep order/meson.build @@ -0,0 +1,8 @@ +project('myexe', 'c') + +lib1 = static_library('lib1', 'lib1.c') +lib2 = static_library('lib2', 'lib2.c') + +executable('myexe', + 'myexe.c', + link_with: [lib1, lib2]) diff --git a/test cases/unit/42 dep order/myexe.c b/test cases/unit/42 dep order/myexe.c new file mode 100644 index 0000000..8f4c045 --- /dev/null +++ b/test cases/unit/42 dep order/myexe.c @@ -0,0 +1,3 @@ +int main(int ac, char** av) { + return 0; +} diff --git a/test cases/unit/42 rpath order/meson.build b/test cases/unit/42 rpath order/meson.build deleted file mode 100644 index a722894..0000000 --- a/test cases/unit/42 rpath order/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('myexe', 'c') - -sub1 = subproject('sub1') -sub1_dep = sub1.get_variable('sub1_dep') - -sub2 = subproject('sub2') -sub2_dep = sub2.get_variable('sub2_dep') - -executable('myexe', - 'myexe.c', - dependencies: [sub1_dep, sub2_dep]) diff --git a/test cases/unit/42 rpath order/myexe.c b/test cases/unit/42 rpath order/myexe.c deleted file mode 100644 index 03b2213..0000000 --- a/test cases/unit/42 rpath order/myexe.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/unit/42 rpath order/subprojects/sub1/lib.c b/test cases/unit/42 rpath order/subprojects/sub1/lib.c deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/42 rpath order/subprojects/sub1/meson.build b/test cases/unit/42 rpath order/subprojects/sub1/meson.build deleted file mode 100644 index 4dd5d08..0000000 --- a/test cases/unit/42 rpath order/subprojects/sub1/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('sub1', 'c') - -sub1_lib = library('sub1', 'lib.c') - -sub1_dep = declare_dependency(link_with : sub1_lib) diff --git a/test cases/unit/42 rpath order/subprojects/sub2/lib.c b/test cases/unit/42 rpath order/subprojects/sub2/lib.c deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/42 rpath order/subprojects/sub2/meson.build b/test cases/unit/42 rpath order/subprojects/sub2/meson.build deleted file mode 100644 index bc3510d..0000000 --- a/test cases/unit/42 rpath order/subprojects/sub2/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('sub2', 'c') - -sub2_lib = library('sub2', 'lib.c') - -sub2_dep = declare_dependency(link_with : sub2_lib) diff --git a/test cases/unit/43 dep order/lib1.c b/test cases/unit/43 dep order/lib1.c deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/43 dep order/lib2.c b/test cases/unit/43 dep order/lib2.c deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/43 dep order/meson.build b/test cases/unit/43 dep order/meson.build deleted file mode 100644 index 17cf9df..0000000 --- a/test cases/unit/43 dep order/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('myexe', 'c') - -lib1 = static_library('lib1', 'lib1.c') -lib2 = static_library('lib2', 'lib2.c') - -executable('myexe', - 'myexe.c', - link_with: [lib1, lib2]) diff --git a/test cases/unit/43 dep order/myexe.c b/test cases/unit/43 dep order/myexe.c deleted file mode 100644 index 8f4c045..0000000 --- a/test cases/unit/43 dep order/myexe.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int ac, char** av) { - return 0; -} diff --git a/test cases/unit/43 promote wrap/meson.build b/test cases/unit/43 promote wrap/meson.build new file mode 100644 index 0000000..5012bf6 --- /dev/null +++ b/test cases/unit/43 promote wrap/meson.build @@ -0,0 +1,4 @@ +project('promotion test', 'c') + +subproject('s1') +subproject('s2') diff --git a/test cases/unit/43 promote wrap/subprojects/s1/meson.build b/test cases/unit/43 promote wrap/subprojects/s1/meson.build new file mode 100644 index 0000000..48dc853 --- /dev/null +++ b/test cases/unit/43 promote wrap/subprojects/s1/meson.build @@ -0,0 +1 @@ +project('s1', 'c') diff --git a/test cases/unit/43 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build b/test cases/unit/43 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build new file mode 100644 index 0000000..b485d83 --- /dev/null +++ b/test cases/unit/43 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build @@ -0,0 +1 @@ +project('ambiguous', 'c') diff --git a/test cases/unit/43 promote wrap/subprojects/s2/meson.build b/test cases/unit/43 promote wrap/subprojects/s2/meson.build new file mode 100644 index 0000000..901bc2a --- /dev/null +++ b/test cases/unit/43 promote wrap/subprojects/s2/meson.build @@ -0,0 +1 @@ +project('s2', 'c') diff --git a/test cases/unit/43 promote wrap/subprojects/s2/subprojects/ambiguous.wrap b/test cases/unit/43 promote wrap/subprojects/s2/subprojects/ambiguous.wrap new file mode 100644 index 0000000..09ba4e8 --- /dev/null +++ b/test cases/unit/43 promote wrap/subprojects/s2/subprojects/ambiguous.wrap @@ -0,0 +1,2 @@ +The contents of this wrap file are never evaluated so they +can be anything. diff --git a/test cases/unit/44 promote wrap/meson.build b/test cases/unit/44 promote wrap/meson.build deleted file mode 100644 index 5012bf6..0000000 --- a/test cases/unit/44 promote wrap/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('promotion test', 'c') - -subproject('s1') -subproject('s2') diff --git a/test cases/unit/44 promote wrap/subprojects/s1/meson.build b/test cases/unit/44 promote wrap/subprojects/s1/meson.build deleted file mode 100644 index 48dc853..0000000 --- a/test cases/unit/44 promote wrap/subprojects/s1/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('s1', 'c') diff --git a/test cases/unit/44 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build b/test cases/unit/44 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build deleted file mode 100644 index b485d83..0000000 --- a/test cases/unit/44 promote wrap/subprojects/s1/subprojects/ambiguous/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('ambiguous', 'c') diff --git a/test cases/unit/44 promote wrap/subprojects/s2/meson.build b/test cases/unit/44 promote wrap/subprojects/s2/meson.build deleted file mode 100644 index 901bc2a..0000000 --- a/test cases/unit/44 promote wrap/subprojects/s2/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('s2', 'c') diff --git a/test cases/unit/44 promote wrap/subprojects/s2/subprojects/ambiguous.wrap b/test cases/unit/44 promote wrap/subprojects/s2/subprojects/ambiguous.wrap deleted file mode 100644 index 09ba4e8..0000000 --- a/test cases/unit/44 promote wrap/subprojects/s2/subprojects/ambiguous.wrap +++ /dev/null @@ -1,2 +0,0 @@ -The contents of this wrap file are never evaluated so they -can be anything. diff --git a/test cases/unit/44 vscpp17/main.cpp b/test cases/unit/44 vscpp17/main.cpp new file mode 100644 index 0000000..3d07d4c --- /dev/null +++ b/test cases/unit/44 vscpp17/main.cpp @@ -0,0 +1,29 @@ +#include + +#if __cpp_lib_filesystem || (defined(__cplusplus) && __cplusplus >= 201703L) +#include +#endif + +int main(){ + +#if __cpp_lib_filesystem || (defined(__cplusplus) && __cplusplus >= 201703L) +char fs = std::filesystem::path::preferred_separator; +std::cout << "OK: C++17 filesystem enabled" << std::endl; +#endif + +#if defined(_MSC_VER) +#if _HAS_CXX17 +std::cout << "OK: MSVC has C++17 enabled" << std::endl; +return EXIT_SUCCESS; +#else +std::cerr << "ERROR: MSVC does not have C++17 enabled" << std::endl; +return EXIT_FAILURE; +#endif +#elif defined(__cplusplus) && __cplusplus >= 201703L +std::cout << "OK: C++17 enabled" << std::endl; +return EXIT_SUCCESS; +#else +std::cerr << "ERROR: C++17 not enabled" << std::endl; +return EXIT_FAILURE; +#endif +} diff --git a/test cases/unit/44 vscpp17/meson.build b/test cases/unit/44 vscpp17/meson.build new file mode 100644 index 0000000..afe740b --- /dev/null +++ b/test cases/unit/44 vscpp17/meson.build @@ -0,0 +1,4 @@ +project('msvc_cpp17', 'cpp', default_options: ['cpp_std=c++17']) + +exe = executable('msvc_cpp17', 'main.cpp') +test('msvc_cpp17', exe) diff --git a/test cases/unit/45 native dep pkgconfig var/cross_pkgconfig.py b/test cases/unit/45 native dep pkgconfig var/cross_pkgconfig.py new file mode 100755 index 0000000..f0d89ee --- /dev/null +++ b/test cases/unit/45 native dep pkgconfig var/cross_pkgconfig.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +import os +import sys +import subprocess + +environ = os.environ.copy() +environ['PKG_CONFIG_LIBDIR'] = os.path.join( + os.path.dirname(os.path.realpath(__file__)), 'cross_pkgconfig') + +sys.exit( + subprocess.run(['pkg-config'] + sys.argv[1:], env=environ).returncode) diff --git a/test cases/unit/45 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc b/test cases/unit/45 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc new file mode 100644 index 0000000..67d7afa --- /dev/null +++ b/test cases/unit/45 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc @@ -0,0 +1,5 @@ +dep_type=cross + +Name: dependency() test +Description: dependency() test +Version: 0 diff --git a/test cases/unit/45 native dep pkgconfig var/meson.build b/test cases/unit/45 native dep pkgconfig var/meson.build new file mode 100644 index 0000000..d95dbcd --- /dev/null +++ b/test cases/unit/45 native dep pkgconfig var/meson.build @@ -0,0 +1,15 @@ +project('native dep pkgconfig test') + +if get_option('start_native') + dep_native = dependency('dep_tester', native: true, method: 'pkg-config') + dep_cross = dependency('dep_tester', native: false, method: 'pkg-config') +else + dep_cross = dependency('dep_tester', native: false, method: 'pkg-config') + dep_native = dependency('dep_tester', native: true, method: 'pkg-config') +endif + +dep_type = dep_native.get_pkgconfig_variable('dep_type') +assert(dep_type == 'native', 'Expected native') + +dep_type = dep_cross.get_pkgconfig_variable('dep_type') +assert(dep_type == 'cross', 'Expected cross') diff --git a/test cases/unit/45 native dep pkgconfig var/meson_options.txt b/test cases/unit/45 native dep pkgconfig var/meson_options.txt new file mode 100644 index 0000000..37006dd --- /dev/null +++ b/test cases/unit/45 native dep pkgconfig var/meson_options.txt @@ -0,0 +1,6 @@ +option( + 'start_native', + type : 'boolean', + value : 'false', + description : 'Start by creating a dependency() with native : true', +) diff --git a/test cases/unit/45 native dep pkgconfig var/native_pkgconfig/dep_tester.pc b/test cases/unit/45 native dep pkgconfig var/native_pkgconfig/dep_tester.pc new file mode 100644 index 0000000..affaa97 --- /dev/null +++ b/test cases/unit/45 native dep pkgconfig var/native_pkgconfig/dep_tester.pc @@ -0,0 +1,5 @@ +dep_type=native + +Name: dependency() test +Description: dependency() test +Version: 0 diff --git a/test cases/unit/45 vscpp17/main.cpp b/test cases/unit/45 vscpp17/main.cpp deleted file mode 100644 index 3d07d4c..0000000 --- a/test cases/unit/45 vscpp17/main.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include - -#if __cpp_lib_filesystem || (defined(__cplusplus) && __cplusplus >= 201703L) -#include -#endif - -int main(){ - -#if __cpp_lib_filesystem || (defined(__cplusplus) && __cplusplus >= 201703L) -char fs = std::filesystem::path::preferred_separator; -std::cout << "OK: C++17 filesystem enabled" << std::endl; -#endif - -#if defined(_MSC_VER) -#if _HAS_CXX17 -std::cout << "OK: MSVC has C++17 enabled" << std::endl; -return EXIT_SUCCESS; -#else -std::cerr << "ERROR: MSVC does not have C++17 enabled" << std::endl; -return EXIT_FAILURE; -#endif -#elif defined(__cplusplus) && __cplusplus >= 201703L -std::cout << "OK: C++17 enabled" << std::endl; -return EXIT_SUCCESS; -#else -std::cerr << "ERROR: C++17 not enabled" << std::endl; -return EXIT_FAILURE; -#endif -} diff --git a/test cases/unit/45 vscpp17/meson.build b/test cases/unit/45 vscpp17/meson.build deleted file mode 100644 index afe740b..0000000 --- a/test cases/unit/45 vscpp17/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('msvc_cpp17', 'cpp', default_options: ['cpp_std=c++17']) - -exe = executable('msvc_cpp17', 'main.cpp') -test('msvc_cpp17', exe) diff --git a/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py b/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py deleted file mode 100755 index f0d89ee..0000000 --- a/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -import subprocess - -environ = os.environ.copy() -environ['PKG_CONFIG_LIBDIR'] = os.path.join( - os.path.dirname(os.path.realpath(__file__)), 'cross_pkgconfig') - -sys.exit( - subprocess.run(['pkg-config'] + sys.argv[1:], env=environ).returncode) diff --git a/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc b/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc deleted file mode 100644 index 67d7afa..0000000 --- a/test cases/unit/46 native dep pkgconfig var/cross_pkgconfig/dep_tester.pc +++ /dev/null @@ -1,5 +0,0 @@ -dep_type=cross - -Name: dependency() test -Description: dependency() test -Version: 0 diff --git a/test cases/unit/46 native dep pkgconfig var/meson.build b/test cases/unit/46 native dep pkgconfig var/meson.build deleted file mode 100644 index d95dbcd..0000000 --- a/test cases/unit/46 native dep pkgconfig var/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project('native dep pkgconfig test') - -if get_option('start_native') - dep_native = dependency('dep_tester', native: true, method: 'pkg-config') - dep_cross = dependency('dep_tester', native: false, method: 'pkg-config') -else - dep_cross = dependency('dep_tester', native: false, method: 'pkg-config') - dep_native = dependency('dep_tester', native: true, method: 'pkg-config') -endif - -dep_type = dep_native.get_pkgconfig_variable('dep_type') -assert(dep_type == 'native', 'Expected native') - -dep_type = dep_cross.get_pkgconfig_variable('dep_type') -assert(dep_type == 'cross', 'Expected cross') diff --git a/test cases/unit/46 native dep pkgconfig var/meson_options.txt b/test cases/unit/46 native dep pkgconfig var/meson_options.txt deleted file mode 100644 index 37006dd..0000000 --- a/test cases/unit/46 native dep pkgconfig var/meson_options.txt +++ /dev/null @@ -1,6 +0,0 @@ -option( - 'start_native', - type : 'boolean', - value : 'false', - description : 'Start by creating a dependency() with native : true', -) diff --git a/test cases/unit/46 native dep pkgconfig var/native_pkgconfig/dep_tester.pc b/test cases/unit/46 native dep pkgconfig var/native_pkgconfig/dep_tester.pc deleted file mode 100644 index affaa97..0000000 --- a/test cases/unit/46 native dep pkgconfig var/native_pkgconfig/dep_tester.pc +++ /dev/null @@ -1,5 +0,0 @@ -dep_type=native - -Name: dependency() test -Description: dependency() test -Version: 0 diff --git a/test cases/unit/46 native file binary/meson.build b/test cases/unit/46 native file binary/meson.build new file mode 100644 index 0000000..2f55fe2 --- /dev/null +++ b/test cases/unit/46 native file binary/meson.build @@ -0,0 +1,21 @@ +project('test project') + +case = get_option('case') + +if case == 'find_program' + prog = find_program('bash') + result = run_command(prog, ['--version'], check: true) + assert(result.stdout().strip().endswith('12345'), 'Didn\'t load bash from config file') +elif case == 'config_dep' + add_languages('cpp') + dep = dependency('llvm', method : 'config-tool') + assert(dep.get_configtool_variable('version').endswith('12345'), 'Didn\'t load llvm from config file') +elif case == 'python3' + prog = import('python3').find_python() + result = run_command(prog, ['--version'], check: true) + assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python3 from config file') +elif case == 'python' + prog = import('python').find_installation() + result = run_command(prog, ['--version'], check: true) + assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python from config file') +endif diff --git a/test cases/unit/46 native file binary/meson_options.txt b/test cases/unit/46 native file binary/meson_options.txt new file mode 100644 index 0000000..651da0e --- /dev/null +++ b/test cases/unit/46 native file binary/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'case', + type : 'combo', + choices : ['find_program', 'config_dep', 'python3', 'python'] +) diff --git a/test cases/unit/47 native file binary/meson.build b/test cases/unit/47 native file binary/meson.build deleted file mode 100644 index 2f55fe2..0000000 --- a/test cases/unit/47 native file binary/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -project('test project') - -case = get_option('case') - -if case == 'find_program' - prog = find_program('bash') - result = run_command(prog, ['--version'], check: true) - assert(result.stdout().strip().endswith('12345'), 'Didn\'t load bash from config file') -elif case == 'config_dep' - add_languages('cpp') - dep = dependency('llvm', method : 'config-tool') - assert(dep.get_configtool_variable('version').endswith('12345'), 'Didn\'t load llvm from config file') -elif case == 'python3' - prog = import('python3').find_python() - result = run_command(prog, ['--version'], check: true) - assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python3 from config file') -elif case == 'python' - prog = import('python').find_installation() - result = run_command(prog, ['--version'], check: true) - assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python from config file') -endif diff --git a/test cases/unit/47 native file binary/meson_options.txt b/test cases/unit/47 native file binary/meson_options.txt deleted file mode 100644 index 651da0e..0000000 --- a/test cases/unit/47 native file binary/meson_options.txt +++ /dev/null @@ -1,5 +0,0 @@ -option( - 'case', - type : 'combo', - choices : ['find_program', 'config_dep', 'python3', 'python'] -) diff --git a/test cases/unit/47 reconfigure/main.c b/test cases/unit/47 reconfigure/main.c new file mode 100644 index 0000000..25927f5 --- /dev/null +++ b/test cases/unit/47 reconfigure/main.c @@ -0,0 +1,4 @@ +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/test cases/unit/47 reconfigure/meson.build b/test cases/unit/47 reconfigure/meson.build new file mode 100644 index 0000000..4f35458 --- /dev/null +++ b/test cases/unit/47 reconfigure/meson.build @@ -0,0 +1,11 @@ +project('test-reconfigure', 'c') + +message('opt1 ' + get_option('opt1')) +message('opt2 ' + get_option('opt2')) +message('opt3 ' + get_option('opt3')) +message('opt4 ' + get_option('opt4')) + +exe = executable('test1', 'main.c') +test('test1', exe) + +sub1 = subproject('sub1') diff --git a/test cases/unit/47 reconfigure/meson_options.txt b/test cases/unit/47 reconfigure/meson_options.txt new file mode 100644 index 0000000..728f7b7 --- /dev/null +++ b/test cases/unit/47 reconfigure/meson_options.txt @@ -0,0 +1,4 @@ +option('opt1', type : 'string', value : 'default1') +option('opt2', type : 'string', value : 'default2') +option('opt3', type : 'string', value : 'default3') +option('opt4', type : 'string', value : 'default4') diff --git a/test cases/unit/47 reconfigure/subprojects/sub1/meson.build b/test cases/unit/47 reconfigure/subprojects/sub1/meson.build new file mode 100644 index 0000000..30fd19d --- /dev/null +++ b/test cases/unit/47 reconfigure/subprojects/sub1/meson.build @@ -0,0 +1,3 @@ +project('sub1') + +message('sub1:werror @0@'.format(get_option('werror'))) diff --git a/test cases/unit/48 reconfigure/main.c b/test cases/unit/48 reconfigure/main.c deleted file mode 100644 index 25927f5..0000000 --- a/test cases/unit/48 reconfigure/main.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char *argv[]) -{ - return 0; -} diff --git a/test cases/unit/48 reconfigure/meson.build b/test cases/unit/48 reconfigure/meson.build deleted file mode 100644 index 4f35458..0000000 --- a/test cases/unit/48 reconfigure/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('test-reconfigure', 'c') - -message('opt1 ' + get_option('opt1')) -message('opt2 ' + get_option('opt2')) -message('opt3 ' + get_option('opt3')) -message('opt4 ' + get_option('opt4')) - -exe = executable('test1', 'main.c') -test('test1', exe) - -sub1 = subproject('sub1') diff --git a/test cases/unit/48 reconfigure/meson_options.txt b/test cases/unit/48 reconfigure/meson_options.txt deleted file mode 100644 index 728f7b7..0000000 --- a/test cases/unit/48 reconfigure/meson_options.txt +++ /dev/null @@ -1,4 +0,0 @@ -option('opt1', type : 'string', value : 'default1') -option('opt2', type : 'string', value : 'default2') -option('opt3', type : 'string', value : 'default3') -option('opt4', type : 'string', value : 'default4') diff --git a/test cases/unit/48 reconfigure/subprojects/sub1/meson.build b/test cases/unit/48 reconfigure/subprojects/sub1/meson.build deleted file mode 100644 index 30fd19d..0000000 --- a/test cases/unit/48 reconfigure/subprojects/sub1/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('sub1') - -message('sub1:werror @0@'.format(get_option('werror'))) diff --git a/test cases/unit/48 testsetup default/envcheck.py b/test cases/unit/48 testsetup default/envcheck.py new file mode 100644 index 0000000..34ad76d --- /dev/null +++ b/test cases/unit/48 testsetup default/envcheck.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import os + +assert 'ENV_A' in os.environ +assert 'ENV_B' in os.environ +assert 'ENV_C' in os.environ + +print('ENV_A is', os.environ['ENV_A']) +print('ENV_B is', os.environ['ENV_B']) +print('ENV_C is', os.environ['ENV_C']) diff --git a/test cases/unit/48 testsetup default/meson.build b/test cases/unit/48 testsetup default/meson.build new file mode 100644 index 0000000..bdd35b8 --- /dev/null +++ b/test cases/unit/48 testsetup default/meson.build @@ -0,0 +1,23 @@ +project('testsetup default', 'c') + +envcheck = find_program('envcheck.py') + +# Defining ENV_A in test-env should overwrite ENV_A from test setup +env_1 = environment() +env_1.set('ENV_A', '1') +test('test-env', envcheck, env: env_1) + +# Defining default env which is used unless --setup is given or the +# env variable is defined in the test. +env_2 = environment() +env_2.set('ENV_A', '2') +env_2.set('ENV_B', '2') +env_2.set('ENV_C', '2') +add_test_setup('mydefault', env: env_2, is_default: true) + +# Defining a test setup that will update some of the env variables +# from the default test setup. +env_3 = env_2 +env_3.set('ENV_A', '3') +env_3.set('ENV_B', '3') +add_test_setup('other', env: env_3) diff --git a/test cases/unit/49 pkgconfig csharp library/meson.build b/test cases/unit/49 pkgconfig csharp library/meson.build new file mode 100644 index 0000000..148d40f --- /dev/null +++ b/test cases/unit/49 pkgconfig csharp library/meson.build @@ -0,0 +1,10 @@ +project('pkgformat', 'cs', + version : '1.0') + +pkgg = import('pkgconfig') + +l = library('libsomething', 'somelib.cs') + +pkgg.generate(l, + version: '1.0', + description: 'A library that does something') diff --git a/test cases/unit/49 pkgconfig csharp library/somelib.cs b/test cases/unit/49 pkgconfig csharp library/somelib.cs new file mode 100644 index 0000000..24d37ed --- /dev/null +++ b/test cases/unit/49 pkgconfig csharp library/somelib.cs @@ -0,0 +1,12 @@ +using System; + +namespace Abc +{ + public static class Something + { + public static bool Api1(this String str) + { + return str == "foo"; + } + } +} diff --git a/test cases/unit/49 testsetup default/envcheck.py b/test cases/unit/49 testsetup default/envcheck.py deleted file mode 100644 index 34ad76d..0000000 --- a/test cases/unit/49 testsetup default/envcheck.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 - -import os - -assert 'ENV_A' in os.environ -assert 'ENV_B' in os.environ -assert 'ENV_C' in os.environ - -print('ENV_A is', os.environ['ENV_A']) -print('ENV_B is', os.environ['ENV_B']) -print('ENV_C is', os.environ['ENV_C']) diff --git a/test cases/unit/49 testsetup default/meson.build b/test cases/unit/49 testsetup default/meson.build deleted file mode 100644 index bdd35b8..0000000 --- a/test cases/unit/49 testsetup default/meson.build +++ /dev/null @@ -1,23 +0,0 @@ -project('testsetup default', 'c') - -envcheck = find_program('envcheck.py') - -# Defining ENV_A in test-env should overwrite ENV_A from test setup -env_1 = environment() -env_1.set('ENV_A', '1') -test('test-env', envcheck, env: env_1) - -# Defining default env which is used unless --setup is given or the -# env variable is defined in the test. -env_2 = environment() -env_2.set('ENV_A', '2') -env_2.set('ENV_B', '2') -env_2.set('ENV_C', '2') -add_test_setup('mydefault', env: env_2, is_default: true) - -# Defining a test setup that will update some of the env variables -# from the default test setup. -env_3 = env_2 -env_3.set('ENV_A', '3') -env_3.set('ENV_B', '3') -add_test_setup('other', env: env_3) diff --git a/test cases/unit/50 noncross options/meson.build b/test cases/unit/50 noncross options/meson.build new file mode 100644 index 0000000..6d479d6 --- /dev/null +++ b/test cases/unit/50 noncross options/meson.build @@ -0,0 +1,14 @@ +project('std_remains', 'c', default_options: ['c_std=c99']) + +executable('prog', 'prog.c') + +# Check that native: true does not affect the use of c_std in +# non-cross builds + +if not meson.is_cross_build() + executable('prog2', 'prog.c', native: true) + + # Check that even deps marked as native are found + # by default when not cross compiling. + dependency('ylib', method: 'pkg-config') +endif diff --git a/test cases/unit/50 noncross options/prog.c b/test cases/unit/50 noncross options/prog.c new file mode 100644 index 0000000..0314ff1 --- /dev/null +++ b/test cases/unit/50 noncross options/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/test cases/unit/50 noncross options/ylib.pc b/test cases/unit/50 noncross options/ylib.pc new file mode 100644 index 0000000..afec2d3 --- /dev/null +++ b/test cases/unit/50 noncross options/ylib.pc @@ -0,0 +1,13 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${prefix}/lib/x86_64-linux-gnu +sharedlibdir=${libdir} +includedir=${prefix}/include + +Name: ylib +Description: ylib compression library +Version: 1.2.3 + +Requires: +Libs: -L${libdir} -L${sharedlibdir} -ly +Cflags: -I${includedir} diff --git a/test cases/unit/50 pkgconfig csharp library/meson.build b/test cases/unit/50 pkgconfig csharp library/meson.build deleted file mode 100644 index 148d40f..0000000 --- a/test cases/unit/50 pkgconfig csharp library/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('pkgformat', 'cs', - version : '1.0') - -pkgg = import('pkgconfig') - -l = library('libsomething', 'somelib.cs') - -pkgg.generate(l, - version: '1.0', - description: 'A library that does something') diff --git a/test cases/unit/50 pkgconfig csharp library/somelib.cs b/test cases/unit/50 pkgconfig csharp library/somelib.cs deleted file mode 100644 index 24d37ed..0000000 --- a/test cases/unit/50 pkgconfig csharp library/somelib.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace Abc -{ - public static class Something - { - public static bool Api1(this String str) - { - return str == "foo"; - } - } -} diff --git a/test cases/unit/51 ldflagdedup/bob.c b/test cases/unit/51 ldflagdedup/bob.c new file mode 100644 index 0000000..a68d4b1 --- /dev/null +++ b/test cases/unit/51 ldflagdedup/bob.c @@ -0,0 +1,5 @@ +#include + +int func() { + return 0; +} diff --git a/test cases/unit/51 ldflagdedup/meson.build b/test cases/unit/51 ldflagdedup/meson.build new file mode 100644 index 0000000..0bbcc50 --- /dev/null +++ b/test cases/unit/51 ldflagdedup/meson.build @@ -0,0 +1,12 @@ +project('lddedup', 'c') + +# Chosen because its ldflags contains -Wl,--export-dynamic, +# which must be deduplicated. +gm = dependency('gmodule-2.0') + +lib = static_library('bob', 'bob.c', + dependencies: gm) + +executable('prog', 'prog.c', + link_with: lib, + dependencies: gm) diff --git a/test cases/unit/51 ldflagdedup/prog.c b/test cases/unit/51 ldflagdedup/prog.c new file mode 100644 index 0000000..02c599d --- /dev/null +++ b/test cases/unit/51 ldflagdedup/prog.c @@ -0,0 +1,7 @@ +#include + +int func(); + +int main(int argc, char **argv) { + return func(); +} diff --git a/test cases/unit/51 noncross options/meson.build b/test cases/unit/51 noncross options/meson.build deleted file mode 100644 index 6d479d6..0000000 --- a/test cases/unit/51 noncross options/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('std_remains', 'c', default_options: ['c_std=c99']) - -executable('prog', 'prog.c') - -# Check that native: true does not affect the use of c_std in -# non-cross builds - -if not meson.is_cross_build() - executable('prog2', 'prog.c', native: true) - - # Check that even deps marked as native are found - # by default when not cross compiling. - dependency('ylib', method: 'pkg-config') -endif diff --git a/test cases/unit/51 noncross options/prog.c b/test cases/unit/51 noncross options/prog.c deleted file mode 100644 index 0314ff1..0000000 --- a/test cases/unit/51 noncross options/prog.c +++ /dev/null @@ -1 +0,0 @@ -int main(int argc, char **argv) { return 0; } diff --git a/test cases/unit/51 noncross options/ylib.pc b/test cases/unit/51 noncross options/ylib.pc deleted file mode 100644 index afec2d3..0000000 --- a/test cases/unit/51 noncross options/ylib.pc +++ /dev/null @@ -1,13 +0,0 @@ -prefix=/usr -exec_prefix=${prefix} -libdir=${prefix}/lib/x86_64-linux-gnu -sharedlibdir=${libdir} -includedir=${prefix}/include - -Name: ylib -Description: ylib compression library -Version: 1.2.3 - -Requires: -Libs: -L${libdir} -L${sharedlibdir} -ly -Cflags: -I${includedir} diff --git a/test cases/unit/52 ldflagdedup/bob.c b/test cases/unit/52 ldflagdedup/bob.c deleted file mode 100644 index a68d4b1..0000000 --- a/test cases/unit/52 ldflagdedup/bob.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int func() { - return 0; -} diff --git a/test cases/unit/52 ldflagdedup/meson.build b/test cases/unit/52 ldflagdedup/meson.build deleted file mode 100644 index 0bbcc50..0000000 --- a/test cases/unit/52 ldflagdedup/meson.build +++ /dev/null @@ -1,12 +0,0 @@ -project('lddedup', 'c') - -# Chosen because its ldflags contains -Wl,--export-dynamic, -# which must be deduplicated. -gm = dependency('gmodule-2.0') - -lib = static_library('bob', 'bob.c', - dependencies: gm) - -executable('prog', 'prog.c', - link_with: lib, - dependencies: gm) diff --git a/test cases/unit/52 ldflagdedup/prog.c b/test cases/unit/52 ldflagdedup/prog.c deleted file mode 100644 index 02c599d..0000000 --- a/test cases/unit/52 ldflagdedup/prog.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int func(); - -int main(int argc, char **argv) { - return func(); -} diff --git a/test cases/unit/52 pkgconfig static link order/meson.build b/test cases/unit/52 pkgconfig static link order/meson.build new file mode 100644 index 0000000..b61de9a --- /dev/null +++ b/test cases/unit/52 pkgconfig static link order/meson.build @@ -0,0 +1,11 @@ +project('link order test', 'c') + +dep = library('dependency', []) +lib = static_library('something', [], link_with: dep) + +import('pkgconfig').generate( + name: 'libsomething', + description: 'test library', + libraries: lib, + version: '1' +) diff --git a/test cases/unit/53 clang-format/.clang-format b/test cases/unit/53 clang-format/.clang-format new file mode 100644 index 0000000..5c60ac9 --- /dev/null +++ b/test cases/unit/53 clang-format/.clang-format @@ -0,0 +1,5 @@ +--- +BasedOnStyle: LLVM +IndentWidth: 4 +UseTab: Never +--- diff --git a/test cases/unit/53 clang-format/dummydir.h/dummy.dat b/test cases/unit/53 clang-format/dummydir.h/dummy.dat new file mode 100644 index 0000000..80c6165 --- /dev/null +++ b/test cases/unit/53 clang-format/dummydir.h/dummy.dat @@ -0,0 +1 @@ +Placeholder to track enclosing directory in git. Not to be analyzed. diff --git a/test cases/unit/53 clang-format/header_expected_h b/test cases/unit/53 clang-format/header_expected_h new file mode 100644 index 0000000..4303176 --- /dev/null +++ b/test cases/unit/53 clang-format/header_expected_h @@ -0,0 +1,3 @@ +#pragma once + +int fun(int argc); diff --git a/test cases/unit/53 clang-format/header_orig_h b/test cases/unit/53 clang-format/header_orig_h new file mode 100644 index 0000000..f2222f3 --- /dev/null +++ b/test cases/unit/53 clang-format/header_orig_h @@ -0,0 +1,9 @@ +#pragma once + +int +fun +( +int +argc +) +; diff --git a/test cases/unit/53 clang-format/meson.build b/test cases/unit/53 clang-format/meson.build new file mode 100644 index 0000000..09973db --- /dev/null +++ b/test cases/unit/53 clang-format/meson.build @@ -0,0 +1,3 @@ +project('clangformat', 'c') + +executable('prog', 'prog.c') diff --git a/test cases/unit/53 clang-format/prog_expected_c b/test cases/unit/53 clang-format/prog_expected_c new file mode 100644 index 0000000..a045966 --- /dev/null +++ b/test cases/unit/53 clang-format/prog_expected_c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char **argv) { + printf("Awful.\n"); + return 0; +} diff --git a/test cases/unit/53 clang-format/prog_orig_c b/test cases/unit/53 clang-format/prog_orig_c new file mode 100644 index 0000000..23a2b57 --- /dev/null +++ b/test cases/unit/53 clang-format/prog_orig_c @@ -0,0 +1,20 @@ +#include + + + + +int +main( +int +argc, +char** +argv) +{ +printf( +"Awful.\n" +) +; +return +0 +; +} diff --git a/test cases/unit/53 pkgconfig static link order/meson.build b/test cases/unit/53 pkgconfig static link order/meson.build deleted file mode 100644 index b61de9a..0000000 --- a/test cases/unit/53 pkgconfig static link order/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('link order test', 'c') - -dep = library('dependency', []) -lib = static_library('something', [], link_with: dep) - -import('pkgconfig').generate( - name: 'libsomething', - description: 'test library', - libraries: lib, - version: '1' -) diff --git a/test cases/unit/54 clang-format/.clang-format b/test cases/unit/54 clang-format/.clang-format deleted file mode 100644 index 5c60ac9..0000000 --- a/test cases/unit/54 clang-format/.clang-format +++ /dev/null @@ -1,5 +0,0 @@ ---- -BasedOnStyle: LLVM -IndentWidth: 4 -UseTab: Never ---- diff --git a/test cases/unit/54 clang-format/dummydir.h/dummy.dat b/test cases/unit/54 clang-format/dummydir.h/dummy.dat deleted file mode 100644 index 80c6165..0000000 --- a/test cases/unit/54 clang-format/dummydir.h/dummy.dat +++ /dev/null @@ -1 +0,0 @@ -Placeholder to track enclosing directory in git. Not to be analyzed. diff --git a/test cases/unit/54 clang-format/header_expected_h b/test cases/unit/54 clang-format/header_expected_h deleted file mode 100644 index 4303176..0000000 --- a/test cases/unit/54 clang-format/header_expected_h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -int fun(int argc); diff --git a/test cases/unit/54 clang-format/header_orig_h b/test cases/unit/54 clang-format/header_orig_h deleted file mode 100644 index f2222f3..0000000 --- a/test cases/unit/54 clang-format/header_orig_h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -int -fun -( -int -argc -) -; diff --git a/test cases/unit/54 clang-format/meson.build b/test cases/unit/54 clang-format/meson.build deleted file mode 100644 index 09973db..0000000 --- a/test cases/unit/54 clang-format/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('clangformat', 'c') - -executable('prog', 'prog.c') diff --git a/test cases/unit/54 clang-format/prog_expected_c b/test cases/unit/54 clang-format/prog_expected_c deleted file mode 100644 index a045966..0000000 --- a/test cases/unit/54 clang-format/prog_expected_c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char **argv) { - printf("Awful.\n"); - return 0; -} diff --git a/test cases/unit/54 clang-format/prog_orig_c b/test cases/unit/54 clang-format/prog_orig_c deleted file mode 100644 index 23a2b57..0000000 --- a/test cases/unit/54 clang-format/prog_orig_c +++ /dev/null @@ -1,20 +0,0 @@ -#include - - - - -int -main( -int -argc, -char** -argv) -{ -printf( -"Awful.\n" -) -; -return -0 -; -} diff --git a/test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson.build b/test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson.build new file mode 100644 index 0000000..4d0aeeb --- /dev/null +++ b/test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson.build @@ -0,0 +1,9 @@ +pfggggaergaeg(sdgrgjgn)aga + +rgqeh +th +thtr +e +tb +tbqebt +tbqebttrtt diff --git a/test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson_options.txt b/test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson_options.txt new file mode 100644 index 0000000..f15d352 --- /dev/null +++ b/test cases/unit/54 introspect buildoptions/subprojects/projectBad/meson_options.txt @@ -0,0 +1 @@ +option('should_not_appear', type: 'integer', min: 0, value: 125) diff --git a/test cases/unit/55 dedup compiler libs/app/app.c b/test cases/unit/55 dedup compiler libs/app/app.c new file mode 100644 index 0000000..4e215b3 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/app/app.c @@ -0,0 +1,13 @@ +#include +#include +#include + +int +main(void) +{ + printf("start value = %d\n", liba_get()); + liba_add(2); + libb_mul(5); + printf("end value = %d\n", liba_get()); + return 0; +} diff --git a/test cases/unit/55 dedup compiler libs/app/meson.build b/test cases/unit/55 dedup compiler libs/app/meson.build new file mode 100644 index 0000000..82ac306 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/app/meson.build @@ -0,0 +1,2 @@ +executable('app', 'app.c', + dependencies: [liba_dep, libb_dep]) diff --git a/test cases/unit/55 dedup compiler libs/liba/liba.c b/test cases/unit/55 dedup compiler libs/liba/liba.c new file mode 100644 index 0000000..962d47f --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/liba/liba.c @@ -0,0 +1,18 @@ +#include "liba.h" + +static int val; + +void liba_add(int x) +{ + val += x; +} + +void liba_sub(int x) +{ + val -= x; +} + +int liba_get(void) +{ + return val; +} diff --git a/test cases/unit/55 dedup compiler libs/liba/liba.h b/test cases/unit/55 dedup compiler libs/liba/liba.h new file mode 100644 index 0000000..a980cdc --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/liba/liba.h @@ -0,0 +1,8 @@ +#ifndef LIBA_H_ +#define LIBA_H_ + +void liba_add(int x); +void liba_sub(int x); +int liba_get(void); + +#endif diff --git a/test cases/unit/55 dedup compiler libs/liba/meson.build b/test cases/unit/55 dedup compiler libs/liba/meson.build new file mode 100644 index 0000000..eccfa46 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/liba/meson.build @@ -0,0 +1,8 @@ +deps = [dependency('threads'), cc.find_library('dl'), cc.find_library('m')] + +liba = library('a', 'liba.c', + dependencies: deps) + +liba_dep = declare_dependency(link_with: liba, + include_directories: include_directories('.'), + dependencies: deps) diff --git a/test cases/unit/55 dedup compiler libs/libb/libb.c b/test cases/unit/55 dedup compiler libs/libb/libb.c new file mode 100644 index 0000000..3720868 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/libb/libb.c @@ -0,0 +1,7 @@ +#include +#include "libb.h" + +void libb_mul(int x) +{ + liba_add(liba_get() * (x - 1)); +} diff --git a/test cases/unit/55 dedup compiler libs/libb/libb.h b/test cases/unit/55 dedup compiler libs/libb/libb.h new file mode 100644 index 0000000..2e4ddd0 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/libb/libb.h @@ -0,0 +1,6 @@ +#ifndef _LIBB_H_ +#define _LIBB_H_ + +void libb_mul(int x); + +#endif diff --git a/test cases/unit/55 dedup compiler libs/libb/meson.build b/test cases/unit/55 dedup compiler libs/libb/meson.build new file mode 100644 index 0000000..d59206f --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/libb/meson.build @@ -0,0 +1,6 @@ +libb = library('b', 'libb.c', + dependencies: liba_dep) + +libb_dep = declare_dependency(link_with: libb, + include_directories: include_directories('.'), + dependencies: liba_dep) diff --git a/test cases/unit/55 dedup compiler libs/meson.build b/test cases/unit/55 dedup compiler libs/meson.build new file mode 100644 index 0000000..fad0ed5 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/meson.build @@ -0,0 +1,7 @@ +project('temp', 'c') + +cc = meson.get_compiler('c') + +subdir('liba') +subdir('libb') +subdir('app') diff --git a/test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson.build b/test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson.build deleted file mode 100644 index 4d0aeeb..0000000 --- a/test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -pfggggaergaeg(sdgrgjgn)aga - -rgqeh -th -thtr -e -tb -tbqebt -tbqebttrtt diff --git a/test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson_options.txt b/test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson_options.txt deleted file mode 100644 index f15d352..0000000 --- a/test cases/unit/55 introspect buildoptions/subprojects/projectBad/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('should_not_appear', type: 'integer', min: 0, value: 125) diff --git a/test cases/unit/56 dedup compiler libs/app/app.c b/test cases/unit/56 dedup compiler libs/app/app.c deleted file mode 100644 index 4e215b3..0000000 --- a/test cases/unit/56 dedup compiler libs/app/app.c +++ /dev/null @@ -1,13 +0,0 @@ -#include -#include -#include - -int -main(void) -{ - printf("start value = %d\n", liba_get()); - liba_add(2); - libb_mul(5); - printf("end value = %d\n", liba_get()); - return 0; -} diff --git a/test cases/unit/56 dedup compiler libs/app/meson.build b/test cases/unit/56 dedup compiler libs/app/meson.build deleted file mode 100644 index 82ac306..0000000 --- a/test cases/unit/56 dedup compiler libs/app/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -executable('app', 'app.c', - dependencies: [liba_dep, libb_dep]) diff --git a/test cases/unit/56 dedup compiler libs/liba/liba.c b/test cases/unit/56 dedup compiler libs/liba/liba.c deleted file mode 100644 index 962d47f..0000000 --- a/test cases/unit/56 dedup compiler libs/liba/liba.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "liba.h" - -static int val; - -void liba_add(int x) -{ - val += x; -} - -void liba_sub(int x) -{ - val -= x; -} - -int liba_get(void) -{ - return val; -} diff --git a/test cases/unit/56 dedup compiler libs/liba/liba.h b/test cases/unit/56 dedup compiler libs/liba/liba.h deleted file mode 100644 index a980cdc..0000000 --- a/test cases/unit/56 dedup compiler libs/liba/liba.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef LIBA_H_ -#define LIBA_H_ - -void liba_add(int x); -void liba_sub(int x); -int liba_get(void); - -#endif diff --git a/test cases/unit/56 dedup compiler libs/liba/meson.build b/test cases/unit/56 dedup compiler libs/liba/meson.build deleted file mode 100644 index eccfa46..0000000 --- a/test cases/unit/56 dedup compiler libs/liba/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -deps = [dependency('threads'), cc.find_library('dl'), cc.find_library('m')] - -liba = library('a', 'liba.c', - dependencies: deps) - -liba_dep = declare_dependency(link_with: liba, - include_directories: include_directories('.'), - dependencies: deps) diff --git a/test cases/unit/56 dedup compiler libs/libb/libb.c b/test cases/unit/56 dedup compiler libs/libb/libb.c deleted file mode 100644 index 3720868..0000000 --- a/test cases/unit/56 dedup compiler libs/libb/libb.c +++ /dev/null @@ -1,7 +0,0 @@ -#include -#include "libb.h" - -void libb_mul(int x) -{ - liba_add(liba_get() * (x - 1)); -} diff --git a/test cases/unit/56 dedup compiler libs/libb/libb.h b/test cases/unit/56 dedup compiler libs/libb/libb.h deleted file mode 100644 index 2e4ddd0..0000000 --- a/test cases/unit/56 dedup compiler libs/libb/libb.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef _LIBB_H_ -#define _LIBB_H_ - -void libb_mul(int x); - -#endif diff --git a/test cases/unit/56 dedup compiler libs/libb/meson.build b/test cases/unit/56 dedup compiler libs/libb/meson.build deleted file mode 100644 index d59206f..0000000 --- a/test cases/unit/56 dedup compiler libs/libb/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -libb = library('b', 'libb.c', - dependencies: liba_dep) - -libb_dep = declare_dependency(link_with: libb, - include_directories: include_directories('.'), - dependencies: liba_dep) diff --git a/test cases/unit/56 dedup compiler libs/meson.build b/test cases/unit/56 dedup compiler libs/meson.build deleted file mode 100644 index fad0ed5..0000000 --- a/test cases/unit/56 dedup compiler libs/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('temp', 'c') - -cc = meson.get_compiler('c') - -subdir('liba') -subdir('libb') -subdir('app') diff --git a/test cases/unit/56 introspection/cp.py b/test cases/unit/56 introspection/cp.py new file mode 100644 index 0000000..cb09cf3 --- /dev/null +++ b/test cases/unit/56 introspection/cp.py @@ -0,0 +1,5 @@ +#! /usr/bin/env python3 + +import sys +from shutil import copyfile +copyfile(*sys.argv[1:]) diff --git a/test cases/unit/56 introspection/meson.build b/test cases/unit/56 introspection/meson.build new file mode 100644 index 0000000..568d5cc --- /dev/null +++ b/test cases/unit/56 introspection/meson.build @@ -0,0 +1,72 @@ +project('introspection', ['c', 'cpp'], version: '1.2.3', default_options: ['cpp_std=c++11', 'buildtype=debug']) + +dep1 = dependency('threads') +dep2 = dependency('zlib', required: false) +dep3 = dependency('bugDep1', required: get_option('test_opt1')) + +b1 = get_option('test_opt1') +b2 = get_option('test_opt2') +test_bool = b1 or b2 +test_bool = b1 and b2 +test_bool = not test_bool + +set_variable('list_test_plusassign', []) +list_test_plusassign += ['bugs everywhere'] +dict_test = {list_test_plusassign[0]: 'even more bugs'} + +if not true + vers_str = '<=99.9.9' + dependency('somethingthatdoesnotexist', required: true, version: '>=1.2.3') + dependency('look_i_have_a_fallback', version: ['>=1.0.0', vers_str], fallback: ['oh_no', 'the_subproject_does_not_exist']) +endif + +subdir('sharedlib') +subdir('staticlib') + +var1 = '1' +var2 = 2.to_string() +var3 = 'test3' + +var4 = f'test @var1@ string' # TODO: Actually implement fstrings + +cus1 = custom_target('custom target test 1', output: 'file2', input: 'cp.py', + command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) +cus2 = custom_target('custom target test 2', output: 'file3', input: cus1, + command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) + +t1 = executable('test' + var1, ['t1.cpp'], link_with: [sharedlib], install: not false, build_by_default: get_option('test_opt2')) +t2 = executable('test@0@'.format('@0@'.format(var2)), sources: ['t2.cpp'], link_with: [staticlib]) +t3 = executable(var3, 't3.cpp', link_with: [sharedlib, staticlib], dependencies: [dep1]) + +cus3 = custom_target('custom target test 3', output: 'file4', input: t3, + command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) + +### BEGIN: Test inspired by taisei: https://github.com/taisei-project/taisei/blob/master/meson.build#L293 +systype = '@0@'.format(host_machine.system()) +systype = '@0@, @1@, @2@'.format(systype, host_machine.cpu_family(), host_machine.cpu()) +message(systype) +### END: Test inspired by taisei + +# Minimal code version to produce bug #5376 +# Code inspired by https://github.com/mesa3d/mesa/blob/974c4d679c23373dbed386c696e3e3bc1bfa23ae/meson.build#L1341-L1347 +osmesa_lib_name = 'OSMesa' +osmesa_bits = '8' +osmesa_lib_name = osmesa_lib_name + osmesa_bits +message(osmesa_lib_name) # Infinite recursion gets triggered here when the parameter osmesa_lib_name is resolved + +test('test case 1', t1) +test('test case 2', t2, depends: t3) +benchmark('benchmark 1', t3, args: [cus1, cus2, cus3]) + +### Stuff to test the AST JSON printer +foreach x : ['a', 'b', 'c'] + if x == 'a' + message('a') + elif x == 'b' + message('a') + else + continue + endif + break + continue +endforeach diff --git a/test cases/unit/56 introspection/meson_options.txt b/test cases/unit/56 introspection/meson_options.txt new file mode 100644 index 0000000..fc5cb4d --- /dev/null +++ b/test cases/unit/56 introspection/meson_options.txt @@ -0,0 +1,2 @@ +option('test_opt1', type: 'boolean', value: false, description: 'simple boolean flag') +option('test_opt2', type: 'boolean', value: true, description: 'simple boolean flag') diff --git a/test cases/unit/56 introspection/sharedlib/meson.build b/test cases/unit/56 introspection/sharedlib/meson.build new file mode 100644 index 0000000..7640bc7 --- /dev/null +++ b/test cases/unit/56 introspection/sharedlib/meson.build @@ -0,0 +1,2 @@ +SRC_shared = ['shared.cpp'] +sharedlib = shared_library('sharedTestLib', SRC_shared, extra_files: ['shared.hpp']) diff --git a/test cases/unit/56 introspection/sharedlib/shared.cpp b/test cases/unit/56 introspection/sharedlib/shared.cpp new file mode 100644 index 0000000..5030ab7 --- /dev/null +++ b/test cases/unit/56 introspection/sharedlib/shared.cpp @@ -0,0 +1,9 @@ +#include "shared.hpp" + +void SharedClass::doStuff() { + number++; +} + +int SharedClass::getNumber() const { + return number; +} diff --git a/test cases/unit/56 introspection/sharedlib/shared.hpp b/test cases/unit/56 introspection/sharedlib/shared.hpp new file mode 100644 index 0000000..dc9b2da --- /dev/null +++ b/test cases/unit/56 introspection/sharedlib/shared.hpp @@ -0,0 +1,10 @@ +#pragma once + +class SharedClass { + private: + int number = 42; + public: + SharedClass() = default; + void doStuff(); + int getNumber() const; +}; \ No newline at end of file diff --git a/test cases/unit/56 introspection/staticlib/meson.build b/test cases/unit/56 introspection/staticlib/meson.build new file mode 100644 index 0000000..1cbb020 --- /dev/null +++ b/test cases/unit/56 introspection/staticlib/meson.build @@ -0,0 +1,3 @@ +SRC_static = ['static.c'] +extra_static = files(['static.h']) +staticlib = static_library('staticTestLib', SRC_static, extra_files: extra_static) diff --git a/test cases/unit/56 introspection/staticlib/static.c b/test cases/unit/56 introspection/staticlib/static.c new file mode 100644 index 0000000..37ebc0d --- /dev/null +++ b/test cases/unit/56 introspection/staticlib/static.c @@ -0,0 +1,5 @@ +#include "static.h" + +int add_numbers(int a, int b) { + return a + b; +} \ No newline at end of file diff --git a/test cases/unit/56 introspection/staticlib/static.h b/test cases/unit/56 introspection/staticlib/static.h new file mode 100644 index 0000000..06da508 --- /dev/null +++ b/test cases/unit/56 introspection/staticlib/static.h @@ -0,0 +1,11 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +int add_numbers(int a, int b); + +#ifdef __cplusplus +} +#endif diff --git a/test cases/unit/56 introspection/t1.cpp b/test cases/unit/56 introspection/t1.cpp new file mode 100644 index 0000000..901e3f1 --- /dev/null +++ b/test cases/unit/56 introspection/t1.cpp @@ -0,0 +1,13 @@ +#include "sharedlib/shared.hpp" + +int main(void) { + SharedClass cl1; + if(cl1.getNumber() != 42) { + return 1; + } + cl1.doStuff(); + if(cl1.getNumber() != 43) { + return 2; + } + return 0; +} diff --git a/test cases/unit/56 introspection/t2.cpp b/test cases/unit/56 introspection/t2.cpp new file mode 100644 index 0000000..8323f46 --- /dev/null +++ b/test cases/unit/56 introspection/t2.cpp @@ -0,0 +1,8 @@ +#include "staticlib/static.h" + +int main(void) { + if(add_numbers(1, 2) != 3) { + return 1; + } + return 0; +} diff --git a/test cases/unit/56 introspection/t3.cpp b/test cases/unit/56 introspection/t3.cpp new file mode 100644 index 0000000..dd518e8 --- /dev/null +++ b/test cases/unit/56 introspection/t3.cpp @@ -0,0 +1,16 @@ +#include "sharedlib/shared.hpp" +#include "staticlib/static.h" + +int main(void) { + for(int i = 0; i < 1000; add_numbers(i, 1)) { + SharedClass cl1; + if(cl1.getNumber() != 42) { + return 1; + } + cl1.doStuff(); + if(cl1.getNumber() != 43) { + return 2; + } + } + return 0; +} diff --git a/test cases/unit/57 introspection/cp.py b/test cases/unit/57 introspection/cp.py deleted file mode 100644 index cb09cf3..0000000 --- a/test cases/unit/57 introspection/cp.py +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env python3 - -import sys -from shutil import copyfile -copyfile(*sys.argv[1:]) diff --git a/test cases/unit/57 introspection/meson.build b/test cases/unit/57 introspection/meson.build deleted file mode 100644 index 568d5cc..0000000 --- a/test cases/unit/57 introspection/meson.build +++ /dev/null @@ -1,72 +0,0 @@ -project('introspection', ['c', 'cpp'], version: '1.2.3', default_options: ['cpp_std=c++11', 'buildtype=debug']) - -dep1 = dependency('threads') -dep2 = dependency('zlib', required: false) -dep3 = dependency('bugDep1', required: get_option('test_opt1')) - -b1 = get_option('test_opt1') -b2 = get_option('test_opt2') -test_bool = b1 or b2 -test_bool = b1 and b2 -test_bool = not test_bool - -set_variable('list_test_plusassign', []) -list_test_plusassign += ['bugs everywhere'] -dict_test = {list_test_plusassign[0]: 'even more bugs'} - -if not true - vers_str = '<=99.9.9' - dependency('somethingthatdoesnotexist', required: true, version: '>=1.2.3') - dependency('look_i_have_a_fallback', version: ['>=1.0.0', vers_str], fallback: ['oh_no', 'the_subproject_does_not_exist']) -endif - -subdir('sharedlib') -subdir('staticlib') - -var1 = '1' -var2 = 2.to_string() -var3 = 'test3' - -var4 = f'test @var1@ string' # TODO: Actually implement fstrings - -cus1 = custom_target('custom target test 1', output: 'file2', input: 'cp.py', - command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) -cus2 = custom_target('custom target test 2', output: 'file3', input: cus1, - command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) - -t1 = executable('test' + var1, ['t1.cpp'], link_with: [sharedlib], install: not false, build_by_default: get_option('test_opt2')) -t2 = executable('test@0@'.format('@0@'.format(var2)), sources: ['t2.cpp'], link_with: [staticlib]) -t3 = executable(var3, 't3.cpp', link_with: [sharedlib, staticlib], dependencies: [dep1]) - -cus3 = custom_target('custom target test 3', output: 'file4', input: t3, - command: [find_program('cp.py'), '@INPUT@', '@OUTPUT@']) - -### BEGIN: Test inspired by taisei: https://github.com/taisei-project/taisei/blob/master/meson.build#L293 -systype = '@0@'.format(host_machine.system()) -systype = '@0@, @1@, @2@'.format(systype, host_machine.cpu_family(), host_machine.cpu()) -message(systype) -### END: Test inspired by taisei - -# Minimal code version to produce bug #5376 -# Code inspired by https://github.com/mesa3d/mesa/blob/974c4d679c23373dbed386c696e3e3bc1bfa23ae/meson.build#L1341-L1347 -osmesa_lib_name = 'OSMesa' -osmesa_bits = '8' -osmesa_lib_name = osmesa_lib_name + osmesa_bits -message(osmesa_lib_name) # Infinite recursion gets triggered here when the parameter osmesa_lib_name is resolved - -test('test case 1', t1) -test('test case 2', t2, depends: t3) -benchmark('benchmark 1', t3, args: [cus1, cus2, cus3]) - -### Stuff to test the AST JSON printer -foreach x : ['a', 'b', 'c'] - if x == 'a' - message('a') - elif x == 'b' - message('a') - else - continue - endif - break - continue -endforeach diff --git a/test cases/unit/57 introspection/meson_options.txt b/test cases/unit/57 introspection/meson_options.txt deleted file mode 100644 index fc5cb4d..0000000 --- a/test cases/unit/57 introspection/meson_options.txt +++ /dev/null @@ -1,2 +0,0 @@ -option('test_opt1', type: 'boolean', value: false, description: 'simple boolean flag') -option('test_opt2', type: 'boolean', value: true, description: 'simple boolean flag') diff --git a/test cases/unit/57 introspection/sharedlib/meson.build b/test cases/unit/57 introspection/sharedlib/meson.build deleted file mode 100644 index 7640bc7..0000000 --- a/test cases/unit/57 introspection/sharedlib/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -SRC_shared = ['shared.cpp'] -sharedlib = shared_library('sharedTestLib', SRC_shared, extra_files: ['shared.hpp']) diff --git a/test cases/unit/57 introspection/sharedlib/shared.cpp b/test cases/unit/57 introspection/sharedlib/shared.cpp deleted file mode 100644 index 5030ab7..0000000 --- a/test cases/unit/57 introspection/sharedlib/shared.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "shared.hpp" - -void SharedClass::doStuff() { - number++; -} - -int SharedClass::getNumber() const { - return number; -} diff --git a/test cases/unit/57 introspection/sharedlib/shared.hpp b/test cases/unit/57 introspection/sharedlib/shared.hpp deleted file mode 100644 index dc9b2da..0000000 --- a/test cases/unit/57 introspection/sharedlib/shared.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -class SharedClass { - private: - int number = 42; - public: - SharedClass() = default; - void doStuff(); - int getNumber() const; -}; \ No newline at end of file diff --git a/test cases/unit/57 introspection/staticlib/meson.build b/test cases/unit/57 introspection/staticlib/meson.build deleted file mode 100644 index 1cbb020..0000000 --- a/test cases/unit/57 introspection/staticlib/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -SRC_static = ['static.c'] -extra_static = files(['static.h']) -staticlib = static_library('staticTestLib', SRC_static, extra_files: extra_static) diff --git a/test cases/unit/57 introspection/staticlib/static.c b/test cases/unit/57 introspection/staticlib/static.c deleted file mode 100644 index 37ebc0d..0000000 --- a/test cases/unit/57 introspection/staticlib/static.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "static.h" - -int add_numbers(int a, int b) { - return a + b; -} \ No newline at end of file diff --git a/test cases/unit/57 introspection/staticlib/static.h b/test cases/unit/57 introspection/staticlib/static.h deleted file mode 100644 index 06da508..0000000 --- a/test cases/unit/57 introspection/staticlib/static.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -int add_numbers(int a, int b); - -#ifdef __cplusplus -} -#endif diff --git a/test cases/unit/57 introspection/t1.cpp b/test cases/unit/57 introspection/t1.cpp deleted file mode 100644 index 901e3f1..0000000 --- a/test cases/unit/57 introspection/t1.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "sharedlib/shared.hpp" - -int main(void) { - SharedClass cl1; - if(cl1.getNumber() != 42) { - return 1; - } - cl1.doStuff(); - if(cl1.getNumber() != 43) { - return 2; - } - return 0; -} diff --git a/test cases/unit/57 introspection/t2.cpp b/test cases/unit/57 introspection/t2.cpp deleted file mode 100644 index 8323f46..0000000 --- a/test cases/unit/57 introspection/t2.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "staticlib/static.h" - -int main(void) { - if(add_numbers(1, 2) != 3) { - return 1; - } - return 0; -} diff --git a/test cases/unit/57 introspection/t3.cpp b/test cases/unit/57 introspection/t3.cpp deleted file mode 100644 index dd518e8..0000000 --- a/test cases/unit/57 introspection/t3.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "sharedlib/shared.hpp" -#include "staticlib/static.h" - -int main(void) { - for(int i = 0; i < 1000; add_numbers(i, 1)) { - SharedClass cl1; - if(cl1.getNumber() != 42) { - return 1; - } - cl1.doStuff(); - if(cl1.getNumber() != 43) { - return 2; - } - } - return 0; -} diff --git a/test cases/unit/57 pkg_config_path option/build_extra_path/totally_made_up_dep.pc b/test cases/unit/57 pkg_config_path option/build_extra_path/totally_made_up_dep.pc new file mode 100644 index 0000000..5b149f6 --- /dev/null +++ b/test cases/unit/57 pkg_config_path option/build_extra_path/totally_made_up_dep.pc @@ -0,0 +1,7 @@ +prefix=/ +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: totally_made_up_dep +Description: completely and totally made up for a test case +Version: 4.5.6 diff --git a/test cases/unit/57 pkg_config_path option/host_extra_path/totally_made_up_dep.pc b/test cases/unit/57 pkg_config_path option/host_extra_path/totally_made_up_dep.pc new file mode 100644 index 0000000..6d08687 --- /dev/null +++ b/test cases/unit/57 pkg_config_path option/host_extra_path/totally_made_up_dep.pc @@ -0,0 +1,7 @@ +prefix=/ +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: totally_made_up_dep +Description: completely and totally made up for a test case +Version: 1.2.3 \ No newline at end of file diff --git a/test cases/unit/57 pkg_config_path option/meson.build b/test cases/unit/57 pkg_config_path option/meson.build new file mode 100644 index 0000000..f9ceead --- /dev/null +++ b/test cases/unit/57 pkg_config_path option/meson.build @@ -0,0 +1,7 @@ +project('pkg_config_path option') + +build = dependency('totally_made_up_dep', native: true, method : 'pkg-config') +host = dependency('totally_made_up_dep', native: false, method : 'pkg-config') + +assert(build.version() == '4.5.6', 'wrong version for build machine dependency') +assert(host.version() == '1.2.3', 'wrong version for host machine dependency') diff --git a/test cases/unit/58 introspect buildoptions/c_compiler.py b/test cases/unit/58 introspect buildoptions/c_compiler.py new file mode 100644 index 0000000..c7241e7 --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/c_compiler.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('c') diff --git a/test cases/unit/58 introspect buildoptions/main.c b/test cases/unit/58 introspect buildoptions/main.c new file mode 100644 index 0000000..709730f --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/main.c @@ -0,0 +1,6 @@ +#include + +int main(void) { + printf("Hello World"); + return 0; +} diff --git a/test cases/unit/58 introspect buildoptions/meson.build b/test cases/unit/58 introspect buildoptions/meson.build new file mode 100644 index 0000000..36e03e0 --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/meson.build @@ -0,0 +1,18 @@ +project('introspect buildargs', ['c'], default_options: ['c_std=c99', 'cpp_std=c++14', 'buildtype=release']) + +subA = subproject('projectA') + +target_name = 'MAIN' +target_src = ['main.c'] + +foo = false + +executable(target_name, target_src, build_by_default : foo) + +r = run_command(find_program('c_compiler.py'), check: false) +if r.returncode() != 0 + error('FAILED') +endif + +add_languages(r.stdout().strip(), required: true) +add_languages('afgggergearvearghergervergreaergaergasv', required: false) diff --git a/test cases/unit/58 introspect buildoptions/meson_options.txt b/test cases/unit/58 introspect buildoptions/meson_options.txt new file mode 100644 index 0000000..61f9a8d --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/meson_options.txt @@ -0,0 +1,2 @@ +option('max_register_count', type: 'integer', min: 0, value: 125) +option('use_external_fmt', type: 'boolean', value: false) diff --git a/test cases/unit/58 introspect buildoptions/subprojects/evilFile.txt b/test cases/unit/58 introspect buildoptions/subprojects/evilFile.txt new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/58 introspect buildoptions/subprojects/projectA/meson.build b/test cases/unit/58 introspect buildoptions/subprojects/projectA/meson.build new file mode 100644 index 0000000..1ab9ee8 --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/subprojects/projectA/meson.build @@ -0,0 +1,3 @@ +project('introspect subproject A', 'c', default_options: ['cpp_std=c++11', 'buildtype=debug']) + +add_languages('cpp') diff --git a/test cases/unit/58 introspect buildoptions/subprojects/projectA/meson_options.txt b/test cases/unit/58 introspect buildoptions/subprojects/projectA/meson_options.txt new file mode 100644 index 0000000..fa77f95 --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/subprojects/projectA/meson_options.txt @@ -0,0 +1 @@ +option('subproj_var', type: 'boolean', value: false) diff --git a/test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson.build b/test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson.build new file mode 100644 index 0000000..500c1b9 --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson.build @@ -0,0 +1,9 @@ +pfggggaergaeg(sdgrgjgn)aga + +rgqeh +th +thtr +e +tb +tbqebt +tbqebttrtt \ No newline at end of file diff --git a/test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson_options.txt b/test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson_options.txt new file mode 100644 index 0000000..f15d352 --- /dev/null +++ b/test cases/unit/58 introspect buildoptions/subprojects/projectBad/meson_options.txt @@ -0,0 +1 @@ +option('should_not_appear', type: 'integer', min: 0, value: 125) diff --git a/test cases/unit/58 pkg_config_path option/build_extra_path/totally_made_up_dep.pc b/test cases/unit/58 pkg_config_path option/build_extra_path/totally_made_up_dep.pc deleted file mode 100644 index 5b149f6..0000000 --- a/test cases/unit/58 pkg_config_path option/build_extra_path/totally_made_up_dep.pc +++ /dev/null @@ -1,7 +0,0 @@ -prefix=/ -libdir=${prefix}/lib -includedir=${prefix}/include - -Name: totally_made_up_dep -Description: completely and totally made up for a test case -Version: 4.5.6 diff --git a/test cases/unit/58 pkg_config_path option/host_extra_path/totally_made_up_dep.pc b/test cases/unit/58 pkg_config_path option/host_extra_path/totally_made_up_dep.pc deleted file mode 100644 index 6d08687..0000000 --- a/test cases/unit/58 pkg_config_path option/host_extra_path/totally_made_up_dep.pc +++ /dev/null @@ -1,7 +0,0 @@ -prefix=/ -libdir=${prefix}/lib -includedir=${prefix}/include - -Name: totally_made_up_dep -Description: completely and totally made up for a test case -Version: 1.2.3 \ No newline at end of file diff --git a/test cases/unit/58 pkg_config_path option/meson.build b/test cases/unit/58 pkg_config_path option/meson.build deleted file mode 100644 index f9ceead..0000000 --- a/test cases/unit/58 pkg_config_path option/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('pkg_config_path option') - -build = dependency('totally_made_up_dep', native: true, method : 'pkg-config') -host = dependency('totally_made_up_dep', native: false, method : 'pkg-config') - -assert(build.version() == '4.5.6', 'wrong version for build machine dependency') -assert(host.version() == '1.2.3', 'wrong version for host machine dependency') diff --git a/test cases/unit/59 introspect buildoptions/c_compiler.py b/test cases/unit/59 introspect buildoptions/c_compiler.py deleted file mode 100644 index c7241e7..0000000 --- a/test cases/unit/59 introspect buildoptions/c_compiler.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 - -print('c') diff --git a/test cases/unit/59 introspect buildoptions/main.c b/test cases/unit/59 introspect buildoptions/main.c deleted file mode 100644 index 709730f..0000000 --- a/test cases/unit/59 introspect buildoptions/main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) { - printf("Hello World"); - return 0; -} diff --git a/test cases/unit/59 introspect buildoptions/meson.build b/test cases/unit/59 introspect buildoptions/meson.build deleted file mode 100644 index 36e03e0..0000000 --- a/test cases/unit/59 introspect buildoptions/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -project('introspect buildargs', ['c'], default_options: ['c_std=c99', 'cpp_std=c++14', 'buildtype=release']) - -subA = subproject('projectA') - -target_name = 'MAIN' -target_src = ['main.c'] - -foo = false - -executable(target_name, target_src, build_by_default : foo) - -r = run_command(find_program('c_compiler.py'), check: false) -if r.returncode() != 0 - error('FAILED') -endif - -add_languages(r.stdout().strip(), required: true) -add_languages('afgggergearvearghergervergreaergaergasv', required: false) diff --git a/test cases/unit/59 introspect buildoptions/meson_options.txt b/test cases/unit/59 introspect buildoptions/meson_options.txt deleted file mode 100644 index 61f9a8d..0000000 --- a/test cases/unit/59 introspect buildoptions/meson_options.txt +++ /dev/null @@ -1,2 +0,0 @@ -option('max_register_count', type: 'integer', min: 0, value: 125) -option('use_external_fmt', type: 'boolean', value: false) diff --git a/test cases/unit/59 introspect buildoptions/subprojects/evilFile.txt b/test cases/unit/59 introspect buildoptions/subprojects/evilFile.txt deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/59 introspect buildoptions/subprojects/projectA/meson.build b/test cases/unit/59 introspect buildoptions/subprojects/projectA/meson.build deleted file mode 100644 index 1ab9ee8..0000000 --- a/test cases/unit/59 introspect buildoptions/subprojects/projectA/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('introspect subproject A', 'c', default_options: ['cpp_std=c++11', 'buildtype=debug']) - -add_languages('cpp') diff --git a/test cases/unit/59 introspect buildoptions/subprojects/projectA/meson_options.txt b/test cases/unit/59 introspect buildoptions/subprojects/projectA/meson_options.txt deleted file mode 100644 index fa77f95..0000000 --- a/test cases/unit/59 introspect buildoptions/subprojects/projectA/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('subproj_var', type: 'boolean', value: false) diff --git a/test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson.build b/test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson.build deleted file mode 100644 index 500c1b9..0000000 --- a/test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -pfggggaergaeg(sdgrgjgn)aga - -rgqeh -th -thtr -e -tb -tbqebt -tbqebttrtt \ No newline at end of file diff --git a/test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson_options.txt b/test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson_options.txt deleted file mode 100644 index f15d352..0000000 --- a/test cases/unit/59 introspect buildoptions/subprojects/projectBad/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('should_not_appear', type: 'integer', min: 0, value: 125) diff --git a/test cases/unit/59 native file override/crossfile b/test cases/unit/59 native file override/crossfile new file mode 100644 index 0000000..9dc4fbc --- /dev/null +++ b/test cases/unit/59 native file override/crossfile @@ -0,0 +1,16 @@ +[paths] +bindir = 'binbar' +datadir = 'databar' +includedir = 'includebar' +infodir = 'infobar' +libdir = 'libbar' +libexecdir = 'libexecbar' +localedir = 'localebar' +localstatedir = 'localstatebar' +mandir = 'manbar' +prefix = '/prefix' +sbindir = 'sbinbar' +sharedstatedir = 'sharedstatebar' +sysconfdir = 'sysconfbar' + +; vim: ft=dosini diff --git a/test cases/unit/59 native file override/crossfile2 b/test cases/unit/59 native file override/crossfile2 new file mode 100644 index 0000000..70946c9 --- /dev/null +++ b/test cases/unit/59 native file override/crossfile2 @@ -0,0 +1,4 @@ +[paths] +bindir = 'binbar2' + +; vim: ft=dosini diff --git a/test cases/unit/59 native file override/meson.build b/test cases/unit/59 native file override/meson.build new file mode 100644 index 0000000..6ada560 --- /dev/null +++ b/test cases/unit/59 native file override/meson.build @@ -0,0 +1,10 @@ +project('native file overrides') + +foreach o : ['bindir', 'datadir', 'includedir', 'infodir', 'libdir', + 'libexecdir', 'localedir', 'localstatedir', 'mandir', 'prefix', + 'sbindir', 'sharedstatedir', 'sysconfdir'] + expected = get_option('def_' + o) + actual = get_option(o) + assert(expected == actual, + '@0@ should have been @1@, but was @2@!'.format(o, expected, actual)) +endforeach diff --git a/test cases/unit/59 native file override/meson_options.txt b/test cases/unit/59 native file override/meson_options.txt new file mode 100644 index 0000000..4d2abf9 --- /dev/null +++ b/test cases/unit/59 native file override/meson_options.txt @@ -0,0 +1,13 @@ +option('def_bindir', type: 'string', value : 'binfoo',) +option('def_datadir', type: 'string', value : 'datafoo',) +option('def_includedir', type: 'string', value : 'includefoo',) +option('def_infodir', type: 'string', value : 'infofoo',) +option('def_libdir', type: 'string', value : 'libfoo',) +option('def_libexecdir', type: 'string', value : 'libexecfoo',) +option('def_localedir', type: 'string', value : 'localefoo',) +option('def_localstatedir', type: 'string', value : 'localstatefoo',) +option('def_mandir', type: 'string', value : 'manfoo',) +option('def_prefix', type: 'string', value : '/prefix',) +option('def_sbindir', type: 'string', value : 'sbinfoo',) +option('def_sharedstatedir', type: 'string', value : 'sharedstatefoo',) +option('def_sysconfdir', type: 'string', value : 'sysconffoo',) diff --git a/test cases/unit/59 native file override/nativefile b/test cases/unit/59 native file override/nativefile new file mode 100644 index 0000000..a390725 --- /dev/null +++ b/test cases/unit/59 native file override/nativefile @@ -0,0 +1,16 @@ +[paths] +bindir = 'binfoo' +datadir = 'datafoo' +includedir = 'includefoo' +infodir = 'infofoo' +libdir = 'libfoo' +libexecdir = 'libexecfoo' +localedir = 'localefoo' +localstatedir = 'localstatefoo' +mandir = 'manfoo' +prefix = '/prefix' +sbindir = 'sbinfoo' +sharedstatedir = 'sharedstatefoo' +sysconfdir = 'sysconffoo' + +; vim: ft=dosini diff --git a/test cases/unit/60 identity cross/build_wrapper.py b/test cases/unit/60 identity cross/build_wrapper.py new file mode 100755 index 0000000..15d5c07 --- /dev/null +++ b/test cases/unit/60 identity cross/build_wrapper.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import subprocess, sys, platform + +# Meson does not yet support Studio cc on Solaris, only gcc or clang +if platform.system() == 'SunOS': + cc = 'gcc' +else: + cc = 'cc' + +subprocess.call([cc, "-DEXTERNAL_BUILD"] + sys.argv[1:]) diff --git a/test cases/unit/60 identity cross/host_wrapper.py b/test cases/unit/60 identity cross/host_wrapper.py new file mode 100755 index 0000000..a3a694a --- /dev/null +++ b/test cases/unit/60 identity cross/host_wrapper.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import subprocess, sys, platform + +# Meson does not yet support Studio cc on Solaris, only gcc or clang +if platform.system() == 'SunOS': + cc = 'gcc' +else: + cc = 'cc' + +subprocess.call([cc, "-DEXTERNAL_HOST"] + sys.argv[1:]) diff --git a/test cases/unit/60 identity cross/meson.build b/test cases/unit/60 identity cross/meson.build new file mode 100644 index 0000000..950137a --- /dev/null +++ b/test cases/unit/60 identity cross/meson.build @@ -0,0 +1,15 @@ +project('identity cross test', 'c') + +assert(meson.get_compiler('c', native: true).get_define( + 'GOT', + args : [ '-DARG_BUILD' ], + prefix : '#include "stuff.h"', + include_directories: include_directories('.'), +) == 'BUILD', 'did not get BUILD from native: true compiler') + +assert(meson.get_compiler('c', native: false).get_define( + 'GOT', + args : [ '-DARG_HOST' ], + prefix : '#include "stuff.h"', + include_directories: include_directories('.'), +) == 'HOST', 'did not get HOST from native: false compiler') diff --git a/test cases/unit/60 identity cross/stuff.h b/test cases/unit/60 identity cross/stuff.h new file mode 100644 index 0000000..62f1cc9 --- /dev/null +++ b/test cases/unit/60 identity cross/stuff.h @@ -0,0 +1,27 @@ +#ifdef EXTERNAL_BUILD + #ifndef ARG_BUILD + #error "External is build but arg_build is not set." + #elif defined(ARG_HOST) + #error "External is build but arg_host is set." + #else + #define GOT BUILD + #endif +#endif + +#ifdef EXTERNAL_HOST + #ifndef ARG_HOST + #error "External is host but arg_host is not set." + #elif defined(ARG_BUILD) + #error "External is host but arg_build is set." + #else + #define GOT HOST + #endif +#endif + +#if defined(EXTERNAL_BUILD) && defined(EXTERNAL_HOST) + #error "Both external build and external host set." +#endif + +#if !defined(EXTERNAL_BUILD) && !defined(EXTERNAL_HOST) + #error "Neither external build nor external host is set." +#endif diff --git a/test cases/unit/60 native file override/crossfile b/test cases/unit/60 native file override/crossfile deleted file mode 100644 index 9dc4fbc..0000000 --- a/test cases/unit/60 native file override/crossfile +++ /dev/null @@ -1,16 +0,0 @@ -[paths] -bindir = 'binbar' -datadir = 'databar' -includedir = 'includebar' -infodir = 'infobar' -libdir = 'libbar' -libexecdir = 'libexecbar' -localedir = 'localebar' -localstatedir = 'localstatebar' -mandir = 'manbar' -prefix = '/prefix' -sbindir = 'sbinbar' -sharedstatedir = 'sharedstatebar' -sysconfdir = 'sysconfbar' - -; vim: ft=dosini diff --git a/test cases/unit/60 native file override/crossfile2 b/test cases/unit/60 native file override/crossfile2 deleted file mode 100644 index 70946c9..0000000 --- a/test cases/unit/60 native file override/crossfile2 +++ /dev/null @@ -1,4 +0,0 @@ -[paths] -bindir = 'binbar2' - -; vim: ft=dosini diff --git a/test cases/unit/60 native file override/meson.build b/test cases/unit/60 native file override/meson.build deleted file mode 100644 index 6ada560..0000000 --- a/test cases/unit/60 native file override/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('native file overrides') - -foreach o : ['bindir', 'datadir', 'includedir', 'infodir', 'libdir', - 'libexecdir', 'localedir', 'localstatedir', 'mandir', 'prefix', - 'sbindir', 'sharedstatedir', 'sysconfdir'] - expected = get_option('def_' + o) - actual = get_option(o) - assert(expected == actual, - '@0@ should have been @1@, but was @2@!'.format(o, expected, actual)) -endforeach diff --git a/test cases/unit/60 native file override/meson_options.txt b/test cases/unit/60 native file override/meson_options.txt deleted file mode 100644 index 4d2abf9..0000000 --- a/test cases/unit/60 native file override/meson_options.txt +++ /dev/null @@ -1,13 +0,0 @@ -option('def_bindir', type: 'string', value : 'binfoo',) -option('def_datadir', type: 'string', value : 'datafoo',) -option('def_includedir', type: 'string', value : 'includefoo',) -option('def_infodir', type: 'string', value : 'infofoo',) -option('def_libdir', type: 'string', value : 'libfoo',) -option('def_libexecdir', type: 'string', value : 'libexecfoo',) -option('def_localedir', type: 'string', value : 'localefoo',) -option('def_localstatedir', type: 'string', value : 'localstatefoo',) -option('def_mandir', type: 'string', value : 'manfoo',) -option('def_prefix', type: 'string', value : '/prefix',) -option('def_sbindir', type: 'string', value : 'sbinfoo',) -option('def_sharedstatedir', type: 'string', value : 'sharedstatefoo',) -option('def_sysconfdir', type: 'string', value : 'sysconffoo',) diff --git a/test cases/unit/60 native file override/nativefile b/test cases/unit/60 native file override/nativefile deleted file mode 100644 index a390725..0000000 --- a/test cases/unit/60 native file override/nativefile +++ /dev/null @@ -1,16 +0,0 @@ -[paths] -bindir = 'binfoo' -datadir = 'datafoo' -includedir = 'includefoo' -infodir = 'infofoo' -libdir = 'libfoo' -libexecdir = 'libexecfoo' -localedir = 'localefoo' -localstatedir = 'localstatefoo' -mandir = 'manfoo' -prefix = '/prefix' -sbindir = 'sbinfoo' -sharedstatedir = 'sharedstatefoo' -sysconfdir = 'sysconffoo' - -; vim: ft=dosini diff --git a/test cases/unit/61 identity cross/build_wrapper.py b/test cases/unit/61 identity cross/build_wrapper.py deleted file mode 100755 index 15d5c07..0000000 --- a/test cases/unit/61 identity cross/build_wrapper.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 - -import subprocess, sys, platform - -# Meson does not yet support Studio cc on Solaris, only gcc or clang -if platform.system() == 'SunOS': - cc = 'gcc' -else: - cc = 'cc' - -subprocess.call([cc, "-DEXTERNAL_BUILD"] + sys.argv[1:]) diff --git a/test cases/unit/61 identity cross/host_wrapper.py b/test cases/unit/61 identity cross/host_wrapper.py deleted file mode 100755 index a3a694a..0000000 --- a/test cases/unit/61 identity cross/host_wrapper.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 - -import subprocess, sys, platform - -# Meson does not yet support Studio cc on Solaris, only gcc or clang -if platform.system() == 'SunOS': - cc = 'gcc' -else: - cc = 'cc' - -subprocess.call([cc, "-DEXTERNAL_HOST"] + sys.argv[1:]) diff --git a/test cases/unit/61 identity cross/meson.build b/test cases/unit/61 identity cross/meson.build deleted file mode 100644 index 950137a..0000000 --- a/test cases/unit/61 identity cross/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project('identity cross test', 'c') - -assert(meson.get_compiler('c', native: true).get_define( - 'GOT', - args : [ '-DARG_BUILD' ], - prefix : '#include "stuff.h"', - include_directories: include_directories('.'), -) == 'BUILD', 'did not get BUILD from native: true compiler') - -assert(meson.get_compiler('c', native: false).get_define( - 'GOT', - args : [ '-DARG_HOST' ], - prefix : '#include "stuff.h"', - include_directories: include_directories('.'), -) == 'HOST', 'did not get HOST from native: false compiler') diff --git a/test cases/unit/61 identity cross/stuff.h b/test cases/unit/61 identity cross/stuff.h deleted file mode 100644 index 62f1cc9..0000000 --- a/test cases/unit/61 identity cross/stuff.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifdef EXTERNAL_BUILD - #ifndef ARG_BUILD - #error "External is build but arg_build is not set." - #elif defined(ARG_HOST) - #error "External is build but arg_host is set." - #else - #define GOT BUILD - #endif -#endif - -#ifdef EXTERNAL_HOST - #ifndef ARG_HOST - #error "External is host but arg_host is not set." - #elif defined(ARG_BUILD) - #error "External is host but arg_build is set." - #else - #define GOT HOST - #endif -#endif - -#if defined(EXTERNAL_BUILD) && defined(EXTERNAL_HOST) - #error "Both external build and external host set." -#endif - -#if !defined(EXTERNAL_BUILD) && !defined(EXTERNAL_HOST) - #error "Neither external build nor external host is set." -#endif diff --git a/test cases/unit/61 pkgconfig relative paths/pkgconfig/librelativepath.pc b/test cases/unit/61 pkgconfig relative paths/pkgconfig/librelativepath.pc new file mode 100644 index 0000000..dae1eed --- /dev/null +++ b/test cases/unit/61 pkgconfig relative paths/pkgconfig/librelativepath.pc @@ -0,0 +1,9 @@ +prefix=../relativepath +exec_prefix=${prefix} +libdir=${exec_prefix}/lib + +Name: Relative path +Description: Relative path library +Version: 0.0.1 +Libs: -L${libdir} -lrelativepath +Cflags: diff --git a/test cases/unit/62 cmake_prefix_path/meson.build b/test cases/unit/62 cmake_prefix_path/meson.build new file mode 100644 index 0000000..442bbd3 --- /dev/null +++ b/test cases/unit/62 cmake_prefix_path/meson.build @@ -0,0 +1,4 @@ +project('cmake prefix path test') + +d = dependency('mesontest', method : 'cmake') +assert(d.version() == '1.2.3', 'Got the wrong version!') diff --git a/test cases/unit/62 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake b/test cases/unit/62 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake new file mode 100644 index 0000000..289b349 --- /dev/null +++ b/test cases/unit/62 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake @@ -0,0 +1,4 @@ +set(MESONTEST_VERSION "1.2.3") +set(MESONTEST_LIBRARIES "foo.so") +set(MESONTEST_INCLUDE_DIR "") +set(MESONTEST_FOUND "TRUE") diff --git a/test cases/unit/62 pkgconfig relative paths/pkgconfig/librelativepath.pc b/test cases/unit/62 pkgconfig relative paths/pkgconfig/librelativepath.pc deleted file mode 100644 index dae1eed..0000000 --- a/test cases/unit/62 pkgconfig relative paths/pkgconfig/librelativepath.pc +++ /dev/null @@ -1,9 +0,0 @@ -prefix=../relativepath -exec_prefix=${prefix} -libdir=${exec_prefix}/lib - -Name: Relative path -Description: Relative path library -Version: 0.0.1 -Libs: -L${libdir} -lrelativepath -Cflags: diff --git a/test cases/unit/63 cmake parser/meson.build b/test cases/unit/63 cmake parser/meson.build new file mode 100644 index 0000000..061bab0 --- /dev/null +++ b/test cases/unit/63 cmake parser/meson.build @@ -0,0 +1,19 @@ +project('61 cmake parser') + +dep = dependency('mesontest') + +# Test a bunch of variations of the set() command +assert(dep.get_variable(cmake : 'VAR_WITHOUT_SPACES') == 'NoSpaces', 'set() without spaces incorrect') +assert(dep.get_variable(cmake : 'VAR_WITH_SPACES') == 'With Spaces', 'set() with spaces incorrect') + +assert(dep.get_variable(cmake : 'VAR_WITHOUT_SPACES_PS') == 'NoSpaces', 'set(PARENT_SCOPE) without spaces incorrect') +assert(dep.get_variable(cmake : 'VAR_WITH_SPACES_PS') == 'With Spaces', 'set(PARENT_SCOPE) with spaces incorrect') + +assert(dep.get_variable(cmake : 'VAR_THAT_IS_UNSET', default_value : 'sentinal') == 'sentinal', 'set() to unset is incorrect') +assert(dep.get_variable(cmake : 'CACHED_STRING_NS') == 'foo', 'set(CACHED) without spaces is incorrect') +assert(dep.get_variable(cmake : 'CACHED_STRING_WS') == 'foo bar', 'set(CACHED STRING) with spaces is incorrect') +assert(dep.get_variable(cmake : 'CACHED_STRING_ARRAY_NS') == ['foo', 'bar'], 'set(CACHED STRING) without spaces is incorrect') +assert(dep.get_variable(cmake : 'CACHED_STRING_ARRAY_WS') == ['foo', 'foo bar', 'bar'], 'set(CACHED STRING[]) with spaces is incorrect') + +# We don't support this, so it should be unset. +assert(dep.get_variable(cmake : 'ENV{var}', default_value : 'sentinal') == 'sentinal', 'set(ENV) should be ignored') \ No newline at end of file diff --git a/test cases/unit/63 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake b/test cases/unit/63 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake new file mode 100644 index 0000000..7474eb7 --- /dev/null +++ b/test cases/unit/63 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake @@ -0,0 +1,63 @@ +# This should be enough to satisfy the basic parser +set(MESONTEST_VERSION "1.2.3") +set(MESONTEST_LIBRARIES "foo.so") +set(MESONTEST_INCLUDE_DIR "") +set(MESONTEST_FOUND "TRUE") + +## Tests for set() in its various forms + +# Basic usage +set(VAR_WITHOUT_SPACES "NoSpaces") +set(VAR_WITH_SPACES "With Spaces") + +# test of PARENT_SCOPE, requires a function to have a parent scope obviously... +function(foo) + set(VAR_WITHOUT_SPACES_PS "NoSpaces" PARENT_SCOPE) + set(VAR_WITH_SPACES_PS "With Spaces" PARENT_SCOPE) +endfunction(foo) +foo() + +# Using set() to unset values +set(VAR_THAT_IS_UNSET "foo") +set(VAR_THAT_IS_UNSET) + +# The more advanced form that uses CACHE +# XXX: Why don't we read the type and use that instead of always treat things as strings? +set(CACHED_STRING_NS "foo" CACHE STRING "docstring") +set(CACHED_STRING_WS "foo bar" CACHE STRING "docstring") +set(CACHED_STRING_ARRAY_NS "foo;bar" CACHE STRING "doc string") +set(CACHED_STRING_ARRAY_WS "foo;foo bar;bar" CACHE STRING "stuff" FORCE) + +set(CACHED_BOOL ON CACHE BOOL "docstring") + +set(CACHED_PATH_NS "foo/bar" CACHE PATH "docstring") +set(CACHED_PATH_WS "foo bar/fin" CACHE PATH "docstring") + +set(CACHED_FILEPATH_NS "foo/bar.txt" CACHE FILEPATH "docstring") +set(CACHED_FILEPATH_WS "foo bar/fin.txt" CACHE FILEPATH "docstring") + +# Set ENV, we don't support this so it shouldn't be showing up +set(ENV{var}, "foo") + + +## Tests for set_properties() +# We need something to attach properties too +add_custom_target(MESONTEST_FOO ALL) + +set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value") +set_property(TARGET MESONTEST_FOO APPEND PROPERTY FOLDER "name") +set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value") +set_property(TARGET MESONTEST_FOO APPEND_STRING PROPERTY FOLDER "name") + +set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value space") +set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value space") +set_property(TARGET MESONTEST_FOO APPEND PROPERTY FOLDER "name space") +set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value space") +set_property(TARGET MESONTEST_FOO APPEND_STRING PROPERTY FOLDER "name space") + +## Tests for set_target_properties() +set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value") +set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value space") +set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value" OUTPUT_NAME "another value") +set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value space" OUTPUT_NAME "another value") +set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value space" OUTPUT_NAME "value") \ No newline at end of file diff --git a/test cases/unit/63 cmake_prefix_path/meson.build b/test cases/unit/63 cmake_prefix_path/meson.build deleted file mode 100644 index 442bbd3..0000000 --- a/test cases/unit/63 cmake_prefix_path/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('cmake prefix path test') - -d = dependency('mesontest', method : 'cmake') -assert(d.version() == '1.2.3', 'Got the wrong version!') diff --git a/test cases/unit/63 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake b/test cases/unit/63 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake deleted file mode 100644 index 289b349..0000000 --- a/test cases/unit/63 cmake_prefix_path/prefix/lib/cmake/mesontest/mesontest-config.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(MESONTEST_VERSION "1.2.3") -set(MESONTEST_LIBRARIES "foo.so") -set(MESONTEST_INCLUDE_DIR "") -set(MESONTEST_FOUND "TRUE") diff --git a/test cases/unit/64 alias target/main.c b/test cases/unit/64 alias target/main.c new file mode 100644 index 0000000..0fb4389 --- /dev/null +++ b/test cases/unit/64 alias target/main.c @@ -0,0 +1,3 @@ +int main(int argc, char *argv[]) { + return 0; +} diff --git a/test cases/unit/64 alias target/meson.build b/test cases/unit/64 alias target/meson.build new file mode 100644 index 0000000..bcd4005 --- /dev/null +++ b/test cases/unit/64 alias target/meson.build @@ -0,0 +1,17 @@ +project('alias target', 'c') + +python3 = import('python').find_installation() + +exe_target = executable('prog', 'main.c', + build_by_default : false) + +custom_target = custom_target('custom-target', + output : 'hello.txt', + command : [python3, '-c', 'print("hello")'], + capture : true, + build_by_default : false +) + +alias_target('build-all', [exe_target, custom_target]) + +subdir('subdir') diff --git a/test cases/unit/64 alias target/subdir/meson.build b/test cases/unit/64 alias target/subdir/meson.build new file mode 100644 index 0000000..b3f5480 --- /dev/null +++ b/test cases/unit/64 alias target/subdir/meson.build @@ -0,0 +1,6 @@ +r = run_target('run-target', + command: [python3, '-c', 'print("a run target was here")'] +) + +alias_target('aliased-run', r) + diff --git a/test cases/unit/64 cmake parser/meson.build b/test cases/unit/64 cmake parser/meson.build deleted file mode 100644 index 061bab0..0000000 --- a/test cases/unit/64 cmake parser/meson.build +++ /dev/null @@ -1,19 +0,0 @@ -project('61 cmake parser') - -dep = dependency('mesontest') - -# Test a bunch of variations of the set() command -assert(dep.get_variable(cmake : 'VAR_WITHOUT_SPACES') == 'NoSpaces', 'set() without spaces incorrect') -assert(dep.get_variable(cmake : 'VAR_WITH_SPACES') == 'With Spaces', 'set() with spaces incorrect') - -assert(dep.get_variable(cmake : 'VAR_WITHOUT_SPACES_PS') == 'NoSpaces', 'set(PARENT_SCOPE) without spaces incorrect') -assert(dep.get_variable(cmake : 'VAR_WITH_SPACES_PS') == 'With Spaces', 'set(PARENT_SCOPE) with spaces incorrect') - -assert(dep.get_variable(cmake : 'VAR_THAT_IS_UNSET', default_value : 'sentinal') == 'sentinal', 'set() to unset is incorrect') -assert(dep.get_variable(cmake : 'CACHED_STRING_NS') == 'foo', 'set(CACHED) without spaces is incorrect') -assert(dep.get_variable(cmake : 'CACHED_STRING_WS') == 'foo bar', 'set(CACHED STRING) with spaces is incorrect') -assert(dep.get_variable(cmake : 'CACHED_STRING_ARRAY_NS') == ['foo', 'bar'], 'set(CACHED STRING) without spaces is incorrect') -assert(dep.get_variable(cmake : 'CACHED_STRING_ARRAY_WS') == ['foo', 'foo bar', 'bar'], 'set(CACHED STRING[]) with spaces is incorrect') - -# We don't support this, so it should be unset. -assert(dep.get_variable(cmake : 'ENV{var}', default_value : 'sentinal') == 'sentinal', 'set(ENV) should be ignored') \ No newline at end of file diff --git a/test cases/unit/64 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake b/test cases/unit/64 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake deleted file mode 100644 index 7474eb7..0000000 --- a/test cases/unit/64 cmake parser/prefix/lib/cmake/mesontest/mesontest-config.cmake +++ /dev/null @@ -1,63 +0,0 @@ -# This should be enough to satisfy the basic parser -set(MESONTEST_VERSION "1.2.3") -set(MESONTEST_LIBRARIES "foo.so") -set(MESONTEST_INCLUDE_DIR "") -set(MESONTEST_FOUND "TRUE") - -## Tests for set() in its various forms - -# Basic usage -set(VAR_WITHOUT_SPACES "NoSpaces") -set(VAR_WITH_SPACES "With Spaces") - -# test of PARENT_SCOPE, requires a function to have a parent scope obviously... -function(foo) - set(VAR_WITHOUT_SPACES_PS "NoSpaces" PARENT_SCOPE) - set(VAR_WITH_SPACES_PS "With Spaces" PARENT_SCOPE) -endfunction(foo) -foo() - -# Using set() to unset values -set(VAR_THAT_IS_UNSET "foo") -set(VAR_THAT_IS_UNSET) - -# The more advanced form that uses CACHE -# XXX: Why don't we read the type and use that instead of always treat things as strings? -set(CACHED_STRING_NS "foo" CACHE STRING "docstring") -set(CACHED_STRING_WS "foo bar" CACHE STRING "docstring") -set(CACHED_STRING_ARRAY_NS "foo;bar" CACHE STRING "doc string") -set(CACHED_STRING_ARRAY_WS "foo;foo bar;bar" CACHE STRING "stuff" FORCE) - -set(CACHED_BOOL ON CACHE BOOL "docstring") - -set(CACHED_PATH_NS "foo/bar" CACHE PATH "docstring") -set(CACHED_PATH_WS "foo bar/fin" CACHE PATH "docstring") - -set(CACHED_FILEPATH_NS "foo/bar.txt" CACHE FILEPATH "docstring") -set(CACHED_FILEPATH_WS "foo bar/fin.txt" CACHE FILEPATH "docstring") - -# Set ENV, we don't support this so it shouldn't be showing up -set(ENV{var}, "foo") - - -## Tests for set_properties() -# We need something to attach properties too -add_custom_target(MESONTEST_FOO ALL) - -set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value") -set_property(TARGET MESONTEST_FOO APPEND PROPERTY FOLDER "name") -set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value") -set_property(TARGET MESONTEST_FOO APPEND_STRING PROPERTY FOLDER "name") - -set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value space") -set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value space") -set_property(TARGET MESONTEST_FOO APPEND PROPERTY FOLDER "name space") -set_property(TARGET MESONTEST_FOO PROPERTY FOLDER "value space") -set_property(TARGET MESONTEST_FOO APPEND_STRING PROPERTY FOLDER "name space") - -## Tests for set_target_properties() -set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value") -set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value space") -set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value" OUTPUT_NAME "another value") -set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value space" OUTPUT_NAME "another value") -set_target_properties(MESONTEST_FOO PROPERTIES FOLDER "value space" OUTPUT_NAME "value") \ No newline at end of file diff --git a/test cases/unit/65 alias target/main.c b/test cases/unit/65 alias target/main.c deleted file mode 100644 index 0fb4389..0000000 --- a/test cases/unit/65 alias target/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char *argv[]) { - return 0; -} diff --git a/test cases/unit/65 alias target/meson.build b/test cases/unit/65 alias target/meson.build deleted file mode 100644 index bcd4005..0000000 --- a/test cases/unit/65 alias target/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -project('alias target', 'c') - -python3 = import('python').find_installation() - -exe_target = executable('prog', 'main.c', - build_by_default : false) - -custom_target = custom_target('custom-target', - output : 'hello.txt', - command : [python3, '-c', 'print("hello")'], - capture : true, - build_by_default : false -) - -alias_target('build-all', [exe_target, custom_target]) - -subdir('subdir') diff --git a/test cases/unit/65 alias target/subdir/meson.build b/test cases/unit/65 alias target/subdir/meson.build deleted file mode 100644 index b3f5480..0000000 --- a/test cases/unit/65 alias target/subdir/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -r = run_target('run-target', - command: [python3, '-c', 'print("a run target was here")'] -) - -alias_target('aliased-run', r) - diff --git a/test cases/unit/65 static archive stripping/app/appA.c b/test cases/unit/65 static archive stripping/app/appA.c new file mode 100644 index 0000000..e44b54a --- /dev/null +++ b/test cases/unit/65 static archive stripping/app/appA.c @@ -0,0 +1,4 @@ +#include +#include + +int main(void) { printf("The answer is: %d\n", libA_func()); } diff --git a/test cases/unit/65 static archive stripping/app/appB.c b/test cases/unit/65 static archive stripping/app/appB.c new file mode 100644 index 0000000..0ec0b62 --- /dev/null +++ b/test cases/unit/65 static archive stripping/app/appB.c @@ -0,0 +1,4 @@ +#include +#include + +int main(void) { printf("The answer is: %d\n", libB_func()); } diff --git a/test cases/unit/65 static archive stripping/app/meson.build b/test cases/unit/65 static archive stripping/app/meson.build new file mode 100644 index 0000000..118719d --- /dev/null +++ b/test cases/unit/65 static archive stripping/app/meson.build @@ -0,0 +1,7 @@ +project('app', ['c']) + +a = dependency('test-a') +b = dependency('test-b') + +executable('appA', files('appA.c'), dependencies : a) +executable('appB', files('appB.c'), dependencies : b) diff --git a/test cases/unit/65 static archive stripping/lib/libA.c b/test cases/unit/65 static archive stripping/lib/libA.c new file mode 100644 index 0000000..a97185e --- /dev/null +++ b/test cases/unit/65 static archive stripping/lib/libA.c @@ -0,0 +1,5 @@ +#include + +static int libA_func_impl(void) { return 0; } + +int libA_func(void) { return libA_func_impl(); } diff --git a/test cases/unit/65 static archive stripping/lib/libA.h b/test cases/unit/65 static archive stripping/lib/libA.h new file mode 100644 index 0000000..e6450cd --- /dev/null +++ b/test cases/unit/65 static archive stripping/lib/libA.h @@ -0,0 +1 @@ +int libA_func(void); diff --git a/test cases/unit/65 static archive stripping/lib/libB.c b/test cases/unit/65 static archive stripping/lib/libB.c new file mode 100644 index 0000000..0200b1f --- /dev/null +++ b/test cases/unit/65 static archive stripping/lib/libB.c @@ -0,0 +1,5 @@ +#include + +static int libB_func_impl(void) { return 0; } + +int libB_func(void) { return libB_func_impl(); } diff --git a/test cases/unit/65 static archive stripping/lib/libB.h b/test cases/unit/65 static archive stripping/lib/libB.h new file mode 100644 index 0000000..065a4a4 --- /dev/null +++ b/test cases/unit/65 static archive stripping/lib/libB.h @@ -0,0 +1 @@ +int libB_func(void); diff --git a/test cases/unit/65 static archive stripping/lib/meson.build b/test cases/unit/65 static archive stripping/lib/meson.build new file mode 100644 index 0000000..ae50fa7 --- /dev/null +++ b/test cases/unit/65 static archive stripping/lib/meson.build @@ -0,0 +1,23 @@ +project('lib', ['c']) + +pkg = import('pkgconfig') + +a = library('test-a', files('libA.c'), install: true) +install_headers(files('libA.h'), subdir: 'libA') +pkg.generate( + a, + version: '0.0', + description: 'test library libA', + filebase: 'test-a', + name: 'test library libA', + subdirs: 'libA') + +b = static_library('test-b', files('libB.c'), install: true) +install_headers(files('libB.h'), subdir: 'libB') +pkg.generate( + b, + version: '0.0', + description: 'test library libB', + filebase: 'test-b', + name: 'test library libB', + subdirs: 'libB') diff --git a/test cases/unit/66 static archive stripping/app/appA.c b/test cases/unit/66 static archive stripping/app/appA.c deleted file mode 100644 index e44b54a..0000000 --- a/test cases/unit/66 static archive stripping/app/appA.c +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include - -int main(void) { printf("The answer is: %d\n", libA_func()); } diff --git a/test cases/unit/66 static archive stripping/app/appB.c b/test cases/unit/66 static archive stripping/app/appB.c deleted file mode 100644 index 0ec0b62..0000000 --- a/test cases/unit/66 static archive stripping/app/appB.c +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include - -int main(void) { printf("The answer is: %d\n", libB_func()); } diff --git a/test cases/unit/66 static archive stripping/app/meson.build b/test cases/unit/66 static archive stripping/app/meson.build deleted file mode 100644 index 118719d..0000000 --- a/test cases/unit/66 static archive stripping/app/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('app', ['c']) - -a = dependency('test-a') -b = dependency('test-b') - -executable('appA', files('appA.c'), dependencies : a) -executable('appB', files('appB.c'), dependencies : b) diff --git a/test cases/unit/66 static archive stripping/lib/libA.c b/test cases/unit/66 static archive stripping/lib/libA.c deleted file mode 100644 index a97185e..0000000 --- a/test cases/unit/66 static archive stripping/lib/libA.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -static int libA_func_impl(void) { return 0; } - -int libA_func(void) { return libA_func_impl(); } diff --git a/test cases/unit/66 static archive stripping/lib/libA.h b/test cases/unit/66 static archive stripping/lib/libA.h deleted file mode 100644 index e6450cd..0000000 --- a/test cases/unit/66 static archive stripping/lib/libA.h +++ /dev/null @@ -1 +0,0 @@ -int libA_func(void); diff --git a/test cases/unit/66 static archive stripping/lib/libB.c b/test cases/unit/66 static archive stripping/lib/libB.c deleted file mode 100644 index 0200b1f..0000000 --- a/test cases/unit/66 static archive stripping/lib/libB.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -static int libB_func_impl(void) { return 0; } - -int libB_func(void) { return libB_func_impl(); } diff --git a/test cases/unit/66 static archive stripping/lib/libB.h b/test cases/unit/66 static archive stripping/lib/libB.h deleted file mode 100644 index 065a4a4..0000000 --- a/test cases/unit/66 static archive stripping/lib/libB.h +++ /dev/null @@ -1 +0,0 @@ -int libB_func(void); diff --git a/test cases/unit/66 static archive stripping/lib/meson.build b/test cases/unit/66 static archive stripping/lib/meson.build deleted file mode 100644 index ae50fa7..0000000 --- a/test cases/unit/66 static archive stripping/lib/meson.build +++ /dev/null @@ -1,23 +0,0 @@ -project('lib', ['c']) - -pkg = import('pkgconfig') - -a = library('test-a', files('libA.c'), install: true) -install_headers(files('libA.h'), subdir: 'libA') -pkg.generate( - a, - version: '0.0', - description: 'test library libA', - filebase: 'test-a', - name: 'test library libA', - subdirs: 'libA') - -b = static_library('test-b', files('libB.c'), install: true) -install_headers(files('libB.h'), subdir: 'libB') -pkg.generate( - b, - version: '0.0', - description: 'test library libB', - filebase: 'test-b', - name: 'test library libB', - subdirs: 'libB') diff --git a/test cases/unit/66 static link/lib/func1.c b/test cases/unit/66 static link/lib/func1.c new file mode 100644 index 0000000..cc934ad --- /dev/null +++ b/test cases/unit/66 static link/lib/func1.c @@ -0,0 +1,9 @@ +int func1() +{ + return 1; +} + +int func1b() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func10.c b/test cases/unit/66 static link/lib/func10.c new file mode 100644 index 0000000..75a911f --- /dev/null +++ b/test cases/unit/66 static link/lib/func10.c @@ -0,0 +1,4 @@ +int func10() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func11.c b/test cases/unit/66 static link/lib/func11.c new file mode 100644 index 0000000..1d5119b --- /dev/null +++ b/test cases/unit/66 static link/lib/func11.c @@ -0,0 +1,6 @@ +int func10(); + +int func11() +{ + return func10() + 1; +} diff --git a/test cases/unit/66 static link/lib/func12.c b/test cases/unit/66 static link/lib/func12.c new file mode 100644 index 0000000..73db5c0 --- /dev/null +++ b/test cases/unit/66 static link/lib/func12.c @@ -0,0 +1,7 @@ +int func10(); +int func11(); + +int func12() +{ + return func10() + func11(); +} diff --git a/test cases/unit/66 static link/lib/func14.c b/test cases/unit/66 static link/lib/func14.c new file mode 100644 index 0000000..0277319 --- /dev/null +++ b/test cases/unit/66 static link/lib/func14.c @@ -0,0 +1,4 @@ +int func14() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func15.c b/test cases/unit/66 static link/lib/func15.c new file mode 100644 index 0000000..78303cc --- /dev/null +++ b/test cases/unit/66 static link/lib/func15.c @@ -0,0 +1,6 @@ +int func14(); + +int func15() +{ + return func14() + 1; +} diff --git a/test cases/unit/66 static link/lib/func16.c b/test cases/unit/66 static link/lib/func16.c new file mode 100644 index 0000000..379b682 --- /dev/null +++ b/test cases/unit/66 static link/lib/func16.c @@ -0,0 +1,6 @@ +int func15(); + +int func16() +{ + return func15() + 1; +} diff --git a/test cases/unit/66 static link/lib/func17.c b/test cases/unit/66 static link/lib/func17.c new file mode 100644 index 0000000..d1d8ec4 --- /dev/null +++ b/test cases/unit/66 static link/lib/func17.c @@ -0,0 +1,4 @@ +int func17() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func18.c b/test cases/unit/66 static link/lib/func18.c new file mode 100644 index 0000000..c149085 --- /dev/null +++ b/test cases/unit/66 static link/lib/func18.c @@ -0,0 +1,6 @@ +int func17(); + +int func18() +{ + return func17() + 1; +} diff --git a/test cases/unit/66 static link/lib/func19.c b/test cases/unit/66 static link/lib/func19.c new file mode 100644 index 0000000..69120e4 --- /dev/null +++ b/test cases/unit/66 static link/lib/func19.c @@ -0,0 +1,7 @@ +int func17(); +int func18(); + +int func19() +{ + return func17() + func18(); +} diff --git a/test cases/unit/66 static link/lib/func2.c b/test cases/unit/66 static link/lib/func2.c new file mode 100644 index 0000000..6b8f539 --- /dev/null +++ b/test cases/unit/66 static link/lib/func2.c @@ -0,0 +1,6 @@ +int func1(); + +int func2() +{ + return func1() + 1; +} diff --git a/test cases/unit/66 static link/lib/func3.c b/test cases/unit/66 static link/lib/func3.c new file mode 100644 index 0000000..04f9f89 --- /dev/null +++ b/test cases/unit/66 static link/lib/func3.c @@ -0,0 +1,4 @@ +int func3() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func4.c b/test cases/unit/66 static link/lib/func4.c new file mode 100644 index 0000000..c44c990 --- /dev/null +++ b/test cases/unit/66 static link/lib/func4.c @@ -0,0 +1,6 @@ +int func3(); + +int func4() +{ + return func3() + 1; +} diff --git a/test cases/unit/66 static link/lib/func5.c b/test cases/unit/66 static link/lib/func5.c new file mode 100644 index 0000000..8e07864 --- /dev/null +++ b/test cases/unit/66 static link/lib/func5.c @@ -0,0 +1,4 @@ +int func5() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func6.c b/test cases/unit/66 static link/lib/func6.c new file mode 100644 index 0000000..276fe7d --- /dev/null +++ b/test cases/unit/66 static link/lib/func6.c @@ -0,0 +1,6 @@ +int func5(); + +int func6() +{ + return func5() + 1; +} diff --git a/test cases/unit/66 static link/lib/func7.c b/test cases/unit/66 static link/lib/func7.c new file mode 100644 index 0000000..8c1a536 --- /dev/null +++ b/test cases/unit/66 static link/lib/func7.c @@ -0,0 +1,4 @@ +int func7() +{ + return 1; +} diff --git a/test cases/unit/66 static link/lib/func8.c b/test cases/unit/66 static link/lib/func8.c new file mode 100644 index 0000000..b7b6cd5 --- /dev/null +++ b/test cases/unit/66 static link/lib/func8.c @@ -0,0 +1,6 @@ +int func7(); + +int func8() +{ + return func7() + 1; +} diff --git a/test cases/unit/66 static link/lib/func9.c b/test cases/unit/66 static link/lib/func9.c new file mode 100644 index 0000000..852252d --- /dev/null +++ b/test cases/unit/66 static link/lib/func9.c @@ -0,0 +1,6 @@ +int func8(); + +int func9() +{ + return func8() + 1; +} diff --git a/test cases/unit/66 static link/lib/meson.build b/test cases/unit/66 static link/lib/meson.build new file mode 100644 index 0000000..8f95fc4 --- /dev/null +++ b/test cases/unit/66 static link/lib/meson.build @@ -0,0 +1,80 @@ +project('test static link libs', 'c') + +pkg = import('pkgconfig') + +# libfunc2 should contain both func1() and func2() symbols +libfunc1 = static_library('func1', 'func1.c', + install : false) +libfunc2 = static_library('func2', 'func2.c', + link_whole : libfunc1, + install : true) + +# Same as above, but with link_with instead of link_whole, +# libfunc4 should contain both func3() and func4() symbols +libfunc3 = static_library('func3', 'func3.c', + install : false) +libfunc4 = static_library('func4', 'func4.c', + link_with : libfunc3, + install : true) + +# Same as above, but also generate an pkg-config file. Use both_libraries() to +# make sure a complete .pc file gets generated. libfunc5 should not be mentioned +# into the .pc file because it's not installed. +libfunc5 = static_library('func5', 'func5.c', + install : false) +libfunc6 = both_libraries('func6', 'func6.c', + link_with : libfunc5, + install : true) +pkg.generate(libfunc6) + +# libfunc9 should contain both func8() and func9() but not func7() because that +# one gets installed. Also test that link_with and link_whole works the same way +# because libfunc8 is uninstalled. +libfunc7 = static_library('func7', 'func7.c', + install : true) +libfunc8 = static_library('func8', 'func8.c', + link_with : libfunc7, + install : false) +libfunc9_linkwith = static_library('func9_linkwith', 'func9.c', + link_with : libfunc8, + install : true) +libfunc9_linkwhole = static_library('func9_linkwhole', 'func9.c', + link_whole : libfunc8, + install : true) + +# Pattern found in mesa: +# - libfunc11 uses func10() +# - libfunc12 uses both func10() and func11() +# When a shared library link_whole on libfunc12, we ensure we don't include +# func10.c.o twice which would fail to link. +libfunc10 = static_library('func10', 'func10.c', + install : false) +libfunc11 = static_library('func11', 'func11.c', + link_with : libfunc10, + install : false) +libfunc12 = static_library('func12', 'func12.c', + link_with : [libfunc10, libfunc11], + install : false) +libfunc13 = shared_library('func13', link_whole : libfunc12) + +# libfunc16 should contain func14(), func15() and func16() +libfunc14 = static_library('func14', 'func14.c', + install : false) +libfunc15 = static_library('func15', 'func15.c', + link_with : libfunc14, + install : false) +libfunc16 = static_library('func16', 'func16.c', + link_with : libfunc15, + install : true) + +# Verify func17.c.o gets included only once into libfunc19, otherwise +# func19-shared would failed with duplicated symbol. +libfunc17 = static_library('func17', 'func17.c', + install : false) +libfunc18 = static_library('func18', 'func18.c', + link_with : libfunc17, + install : false) +libfunc19 = static_library('func19', 'func19.c', + link_whole : [libfunc17, libfunc18], + install : false) +shared_library('func19-shared', link_whole : [libfunc19]) diff --git a/test cases/unit/66 static link/meson.build b/test cases/unit/66 static link/meson.build new file mode 100644 index 0000000..dac17f8 --- /dev/null +++ b/test cases/unit/66 static link/meson.build @@ -0,0 +1,32 @@ +project('test static link', 'c') + +cc = meson.get_compiler('c') + +# Verify that installed libfunc2.a is usable +func2_dep = cc.find_library('func2') +test('test1', executable('test1', 'test1.c', dependencies : func2_dep)) + +# Verify that installed libfunc4.a is usable +func4_dep = cc.find_library('func4') +test('test2', executable('test2', 'test2.c', dependencies : func4_dep)) + +# Verify that installed pkg-config file is usable for both shared and static link +func6_static_dep = dependency('func6', static : true) +test('test3-static', executable('test3-static', 'test3.c', + dependencies : func6_static_dep)) +func6_shared_dep = dependency('func6', static : false) +test('test3-shared', executable('test3-shared', 'test3.c', + dependencies : func6_shared_dep)) + +# Verify that installed libfunc9.a contains func8() and func8() but not func7() +func7_dep = cc.find_library('func7') +func9_linkwhole_dep = cc.find_library('func9_linkwhole') +test('test4-linkwhole', executable('test4-linkwhole', 'test4.c', + dependencies : [func7_dep, func9_linkwhole_dep])) +func9_linkwith_dep = cc.find_library('func9_linkwith') +test('test4-linkwith', executable('test4-linkwith', 'test4.c', + dependencies : [func7_dep, func9_linkwith_dep])) + +# Verify that installed libfunc16.a is usable +libfunc16_dep = cc.find_library('func16') +test('test5', executable('test5', 'test5.c', dependencies: libfunc16_dep)) diff --git a/test cases/unit/66 static link/test1.c b/test cases/unit/66 static link/test1.c new file mode 100644 index 0000000..ffc9b9e --- /dev/null +++ b/test cases/unit/66 static link/test1.c @@ -0,0 +1,7 @@ +int func1b(); +int func2(); + +int main(int argc, char *argv[]) +{ + return func2() + func1b() == 3 ? 0 : 1; +} diff --git a/test cases/unit/66 static link/test2.c b/test cases/unit/66 static link/test2.c new file mode 100644 index 0000000..561422a --- /dev/null +++ b/test cases/unit/66 static link/test2.c @@ -0,0 +1,6 @@ +int func4(); + +int main(int argc, char *argv[]) +{ + return func4() == 2 ? 0 : 1; +} diff --git a/test cases/unit/66 static link/test3.c b/test cases/unit/66 static link/test3.c new file mode 100644 index 0000000..1216064 --- /dev/null +++ b/test cases/unit/66 static link/test3.c @@ -0,0 +1,6 @@ +int func6(); + +int main(int argc, char *argv[]) +{ + return func6() == 2 ? 0 : 1; +} diff --git a/test cases/unit/66 static link/test4.c b/test cases/unit/66 static link/test4.c new file mode 100644 index 0000000..7c281e0 --- /dev/null +++ b/test cases/unit/66 static link/test4.c @@ -0,0 +1,6 @@ +int func9(); + +int main(int argc, char *argv[]) +{ + return func9() == 3 ? 0 : 1; +} diff --git a/test cases/unit/66 static link/test5.c b/test cases/unit/66 static link/test5.c new file mode 100644 index 0000000..6020f0e --- /dev/null +++ b/test cases/unit/66 static link/test5.c @@ -0,0 +1,6 @@ +int func16(); + +int main(int argc, char *argv[]) +{ + return func16() == 3 ? 0 : 1; +} diff --git a/test cases/unit/67 static link/lib/func1.c b/test cases/unit/67 static link/lib/func1.c deleted file mode 100644 index cc934ad..0000000 --- a/test cases/unit/67 static link/lib/func1.c +++ /dev/null @@ -1,9 +0,0 @@ -int func1() -{ - return 1; -} - -int func1b() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func10.c b/test cases/unit/67 static link/lib/func10.c deleted file mode 100644 index 75a911f..0000000 --- a/test cases/unit/67 static link/lib/func10.c +++ /dev/null @@ -1,4 +0,0 @@ -int func10() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func11.c b/test cases/unit/67 static link/lib/func11.c deleted file mode 100644 index 1d5119b..0000000 --- a/test cases/unit/67 static link/lib/func11.c +++ /dev/null @@ -1,6 +0,0 @@ -int func10(); - -int func11() -{ - return func10() + 1; -} diff --git a/test cases/unit/67 static link/lib/func12.c b/test cases/unit/67 static link/lib/func12.c deleted file mode 100644 index 73db5c0..0000000 --- a/test cases/unit/67 static link/lib/func12.c +++ /dev/null @@ -1,7 +0,0 @@ -int func10(); -int func11(); - -int func12() -{ - return func10() + func11(); -} diff --git a/test cases/unit/67 static link/lib/func14.c b/test cases/unit/67 static link/lib/func14.c deleted file mode 100644 index 0277319..0000000 --- a/test cases/unit/67 static link/lib/func14.c +++ /dev/null @@ -1,4 +0,0 @@ -int func14() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func15.c b/test cases/unit/67 static link/lib/func15.c deleted file mode 100644 index 78303cc..0000000 --- a/test cases/unit/67 static link/lib/func15.c +++ /dev/null @@ -1,6 +0,0 @@ -int func14(); - -int func15() -{ - return func14() + 1; -} diff --git a/test cases/unit/67 static link/lib/func16.c b/test cases/unit/67 static link/lib/func16.c deleted file mode 100644 index 379b682..0000000 --- a/test cases/unit/67 static link/lib/func16.c +++ /dev/null @@ -1,6 +0,0 @@ -int func15(); - -int func16() -{ - return func15() + 1; -} diff --git a/test cases/unit/67 static link/lib/func17.c b/test cases/unit/67 static link/lib/func17.c deleted file mode 100644 index d1d8ec4..0000000 --- a/test cases/unit/67 static link/lib/func17.c +++ /dev/null @@ -1,4 +0,0 @@ -int func17() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func18.c b/test cases/unit/67 static link/lib/func18.c deleted file mode 100644 index c149085..0000000 --- a/test cases/unit/67 static link/lib/func18.c +++ /dev/null @@ -1,6 +0,0 @@ -int func17(); - -int func18() -{ - return func17() + 1; -} diff --git a/test cases/unit/67 static link/lib/func19.c b/test cases/unit/67 static link/lib/func19.c deleted file mode 100644 index 69120e4..0000000 --- a/test cases/unit/67 static link/lib/func19.c +++ /dev/null @@ -1,7 +0,0 @@ -int func17(); -int func18(); - -int func19() -{ - return func17() + func18(); -} diff --git a/test cases/unit/67 static link/lib/func2.c b/test cases/unit/67 static link/lib/func2.c deleted file mode 100644 index 6b8f539..0000000 --- a/test cases/unit/67 static link/lib/func2.c +++ /dev/null @@ -1,6 +0,0 @@ -int func1(); - -int func2() -{ - return func1() + 1; -} diff --git a/test cases/unit/67 static link/lib/func3.c b/test cases/unit/67 static link/lib/func3.c deleted file mode 100644 index 04f9f89..0000000 --- a/test cases/unit/67 static link/lib/func3.c +++ /dev/null @@ -1,4 +0,0 @@ -int func3() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func4.c b/test cases/unit/67 static link/lib/func4.c deleted file mode 100644 index c44c990..0000000 --- a/test cases/unit/67 static link/lib/func4.c +++ /dev/null @@ -1,6 +0,0 @@ -int func3(); - -int func4() -{ - return func3() + 1; -} diff --git a/test cases/unit/67 static link/lib/func5.c b/test cases/unit/67 static link/lib/func5.c deleted file mode 100644 index 8e07864..0000000 --- a/test cases/unit/67 static link/lib/func5.c +++ /dev/null @@ -1,4 +0,0 @@ -int func5() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func6.c b/test cases/unit/67 static link/lib/func6.c deleted file mode 100644 index 276fe7d..0000000 --- a/test cases/unit/67 static link/lib/func6.c +++ /dev/null @@ -1,6 +0,0 @@ -int func5(); - -int func6() -{ - return func5() + 1; -} diff --git a/test cases/unit/67 static link/lib/func7.c b/test cases/unit/67 static link/lib/func7.c deleted file mode 100644 index 8c1a536..0000000 --- a/test cases/unit/67 static link/lib/func7.c +++ /dev/null @@ -1,4 +0,0 @@ -int func7() -{ - return 1; -} diff --git a/test cases/unit/67 static link/lib/func8.c b/test cases/unit/67 static link/lib/func8.c deleted file mode 100644 index b7b6cd5..0000000 --- a/test cases/unit/67 static link/lib/func8.c +++ /dev/null @@ -1,6 +0,0 @@ -int func7(); - -int func8() -{ - return func7() + 1; -} diff --git a/test cases/unit/67 static link/lib/func9.c b/test cases/unit/67 static link/lib/func9.c deleted file mode 100644 index 852252d..0000000 --- a/test cases/unit/67 static link/lib/func9.c +++ /dev/null @@ -1,6 +0,0 @@ -int func8(); - -int func9() -{ - return func8() + 1; -} diff --git a/test cases/unit/67 static link/lib/meson.build b/test cases/unit/67 static link/lib/meson.build deleted file mode 100644 index 8f95fc4..0000000 --- a/test cases/unit/67 static link/lib/meson.build +++ /dev/null @@ -1,80 +0,0 @@ -project('test static link libs', 'c') - -pkg = import('pkgconfig') - -# libfunc2 should contain both func1() and func2() symbols -libfunc1 = static_library('func1', 'func1.c', - install : false) -libfunc2 = static_library('func2', 'func2.c', - link_whole : libfunc1, - install : true) - -# Same as above, but with link_with instead of link_whole, -# libfunc4 should contain both func3() and func4() symbols -libfunc3 = static_library('func3', 'func3.c', - install : false) -libfunc4 = static_library('func4', 'func4.c', - link_with : libfunc3, - install : true) - -# Same as above, but also generate an pkg-config file. Use both_libraries() to -# make sure a complete .pc file gets generated. libfunc5 should not be mentioned -# into the .pc file because it's not installed. -libfunc5 = static_library('func5', 'func5.c', - install : false) -libfunc6 = both_libraries('func6', 'func6.c', - link_with : libfunc5, - install : true) -pkg.generate(libfunc6) - -# libfunc9 should contain both func8() and func9() but not func7() because that -# one gets installed. Also test that link_with and link_whole works the same way -# because libfunc8 is uninstalled. -libfunc7 = static_library('func7', 'func7.c', - install : true) -libfunc8 = static_library('func8', 'func8.c', - link_with : libfunc7, - install : false) -libfunc9_linkwith = static_library('func9_linkwith', 'func9.c', - link_with : libfunc8, - install : true) -libfunc9_linkwhole = static_library('func9_linkwhole', 'func9.c', - link_whole : libfunc8, - install : true) - -# Pattern found in mesa: -# - libfunc11 uses func10() -# - libfunc12 uses both func10() and func11() -# When a shared library link_whole on libfunc12, we ensure we don't include -# func10.c.o twice which would fail to link. -libfunc10 = static_library('func10', 'func10.c', - install : false) -libfunc11 = static_library('func11', 'func11.c', - link_with : libfunc10, - install : false) -libfunc12 = static_library('func12', 'func12.c', - link_with : [libfunc10, libfunc11], - install : false) -libfunc13 = shared_library('func13', link_whole : libfunc12) - -# libfunc16 should contain func14(), func15() and func16() -libfunc14 = static_library('func14', 'func14.c', - install : false) -libfunc15 = static_library('func15', 'func15.c', - link_with : libfunc14, - install : false) -libfunc16 = static_library('func16', 'func16.c', - link_with : libfunc15, - install : true) - -# Verify func17.c.o gets included only once into libfunc19, otherwise -# func19-shared would failed with duplicated symbol. -libfunc17 = static_library('func17', 'func17.c', - install : false) -libfunc18 = static_library('func18', 'func18.c', - link_with : libfunc17, - install : false) -libfunc19 = static_library('func19', 'func19.c', - link_whole : [libfunc17, libfunc18], - install : false) -shared_library('func19-shared', link_whole : [libfunc19]) diff --git a/test cases/unit/67 static link/meson.build b/test cases/unit/67 static link/meson.build deleted file mode 100644 index dac17f8..0000000 --- a/test cases/unit/67 static link/meson.build +++ /dev/null @@ -1,32 +0,0 @@ -project('test static link', 'c') - -cc = meson.get_compiler('c') - -# Verify that installed libfunc2.a is usable -func2_dep = cc.find_library('func2') -test('test1', executable('test1', 'test1.c', dependencies : func2_dep)) - -# Verify that installed libfunc4.a is usable -func4_dep = cc.find_library('func4') -test('test2', executable('test2', 'test2.c', dependencies : func4_dep)) - -# Verify that installed pkg-config file is usable for both shared and static link -func6_static_dep = dependency('func6', static : true) -test('test3-static', executable('test3-static', 'test3.c', - dependencies : func6_static_dep)) -func6_shared_dep = dependency('func6', static : false) -test('test3-shared', executable('test3-shared', 'test3.c', - dependencies : func6_shared_dep)) - -# Verify that installed libfunc9.a contains func8() and func8() but not func7() -func7_dep = cc.find_library('func7') -func9_linkwhole_dep = cc.find_library('func9_linkwhole') -test('test4-linkwhole', executable('test4-linkwhole', 'test4.c', - dependencies : [func7_dep, func9_linkwhole_dep])) -func9_linkwith_dep = cc.find_library('func9_linkwith') -test('test4-linkwith', executable('test4-linkwith', 'test4.c', - dependencies : [func7_dep, func9_linkwith_dep])) - -# Verify that installed libfunc16.a is usable -libfunc16_dep = cc.find_library('func16') -test('test5', executable('test5', 'test5.c', dependencies: libfunc16_dep)) diff --git a/test cases/unit/67 static link/test1.c b/test cases/unit/67 static link/test1.c deleted file mode 100644 index ffc9b9e..0000000 --- a/test cases/unit/67 static link/test1.c +++ /dev/null @@ -1,7 +0,0 @@ -int func1b(); -int func2(); - -int main(int argc, char *argv[]) -{ - return func2() + func1b() == 3 ? 0 : 1; -} diff --git a/test cases/unit/67 static link/test2.c b/test cases/unit/67 static link/test2.c deleted file mode 100644 index 561422a..0000000 --- a/test cases/unit/67 static link/test2.c +++ /dev/null @@ -1,6 +0,0 @@ -int func4(); - -int main(int argc, char *argv[]) -{ - return func4() == 2 ? 0 : 1; -} diff --git a/test cases/unit/67 static link/test3.c b/test cases/unit/67 static link/test3.c deleted file mode 100644 index 1216064..0000000 --- a/test cases/unit/67 static link/test3.c +++ /dev/null @@ -1,6 +0,0 @@ -int func6(); - -int main(int argc, char *argv[]) -{ - return func6() == 2 ? 0 : 1; -} diff --git a/test cases/unit/67 static link/test4.c b/test cases/unit/67 static link/test4.c deleted file mode 100644 index 7c281e0..0000000 --- a/test cases/unit/67 static link/test4.c +++ /dev/null @@ -1,6 +0,0 @@ -int func9(); - -int main(int argc, char *argv[]) -{ - return func9() == 3 ? 0 : 1; -} diff --git a/test cases/unit/67 static link/test5.c b/test cases/unit/67 static link/test5.c deleted file mode 100644 index 6020f0e..0000000 --- a/test cases/unit/67 static link/test5.c +++ /dev/null @@ -1,6 +0,0 @@ -int func16(); - -int main(int argc, char *argv[]) -{ - return func16() == 3 ? 0 : 1; -} diff --git a/test cases/unit/67 test env value/meson.build b/test cases/unit/67 test env value/meson.build new file mode 100644 index 0000000..aa3dbc3 --- /dev/null +++ b/test cases/unit/67 test env value/meson.build @@ -0,0 +1,10 @@ +project('test env value') + +testpy = find_program('test.py') + +val = ['1', '2', '3'] +foreach v: val + test('check env', testpy, args: [v], env: {'TEST_VAR': v}) +endforeach +test('check env', testpy, args: ['4'], env: environment({'TEST_VAR': '4'})) +test('check env', testpy, args: ['5'], env: environment(['TEST_VAR=5'])) diff --git a/test cases/unit/67 test env value/test.py b/test cases/unit/67 test env value/test.py new file mode 100755 index 0000000..4adf62c --- /dev/null +++ b/test cases/unit/67 test env value/test.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import os +import sys + +assert os.environ['TEST_VAR'] == sys.argv[1] diff --git a/test cases/unit/68 clang-tidy/.clang-tidy b/test cases/unit/68 clang-tidy/.clang-tidy new file mode 100644 index 0000000..3935294 --- /dev/null +++ b/test cases/unit/68 clang-tidy/.clang-tidy @@ -0,0 +1 @@ +Checks: '-*,modernize-use-bool-literals' diff --git a/test cases/unit/68 clang-tidy/cttest.cpp b/test cases/unit/68 clang-tidy/cttest.cpp new file mode 100644 index 0000000..07b35a6 --- /dev/null +++ b/test cases/unit/68 clang-tidy/cttest.cpp @@ -0,0 +1,7 @@ +#include + +int main(int, char**) { + bool intbool = 1; + printf("Intbool is %d\n", (int)intbool); + return 0; +} diff --git a/test cases/unit/68 clang-tidy/dummydir.h/dummy.dat b/test cases/unit/68 clang-tidy/dummydir.h/dummy.dat new file mode 100644 index 0000000..80c6165 --- /dev/null +++ b/test cases/unit/68 clang-tidy/dummydir.h/dummy.dat @@ -0,0 +1 @@ +Placeholder to track enclosing directory in git. Not to be analyzed. diff --git a/test cases/unit/68 clang-tidy/meson.build b/test cases/unit/68 clang-tidy/meson.build new file mode 100644 index 0000000..737474b --- /dev/null +++ b/test cases/unit/68 clang-tidy/meson.build @@ -0,0 +1,3 @@ +project('clangtidytest', 'cpp', default_options: 'cpp_std=c++14') + +executable('cttest', 'cttest.cpp') diff --git a/test cases/unit/68 test env value/meson.build b/test cases/unit/68 test env value/meson.build deleted file mode 100644 index aa3dbc3..0000000 --- a/test cases/unit/68 test env value/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('test env value') - -testpy = find_program('test.py') - -val = ['1', '2', '3'] -foreach v: val - test('check env', testpy, args: [v], env: {'TEST_VAR': v}) -endforeach -test('check env', testpy, args: ['4'], env: environment({'TEST_VAR': '4'})) -test('check env', testpy, args: ['5'], env: environment(['TEST_VAR=5'])) diff --git a/test cases/unit/68 test env value/test.py b/test cases/unit/68 test env value/test.py deleted file mode 100755 index 4adf62c..0000000 --- a/test cases/unit/68 test env value/test.py +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys - -assert os.environ['TEST_VAR'] == sys.argv[1] diff --git a/test cases/unit/69 clang-tidy/.clang-tidy b/test cases/unit/69 clang-tidy/.clang-tidy deleted file mode 100644 index 3935294..0000000 --- a/test cases/unit/69 clang-tidy/.clang-tidy +++ /dev/null @@ -1 +0,0 @@ -Checks: '-*,modernize-use-bool-literals' diff --git a/test cases/unit/69 clang-tidy/cttest.cpp b/test cases/unit/69 clang-tidy/cttest.cpp deleted file mode 100644 index 07b35a6..0000000 --- a/test cases/unit/69 clang-tidy/cttest.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int, char**) { - bool intbool = 1; - printf("Intbool is %d\n", (int)intbool); - return 0; -} diff --git a/test cases/unit/69 clang-tidy/dummydir.h/dummy.dat b/test cases/unit/69 clang-tidy/dummydir.h/dummy.dat deleted file mode 100644 index 80c6165..0000000 --- a/test cases/unit/69 clang-tidy/dummydir.h/dummy.dat +++ /dev/null @@ -1 +0,0 @@ -Placeholder to track enclosing directory in git. Not to be analyzed. diff --git a/test cases/unit/69 clang-tidy/meson.build b/test cases/unit/69 clang-tidy/meson.build deleted file mode 100644 index 737474b..0000000 --- a/test cases/unit/69 clang-tidy/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('clangtidytest', 'cpp', default_options: 'cpp_std=c++14') - -executable('cttest', 'cttest.cpp') diff --git a/test cases/unit/69 cross/crossfile.in b/test cases/unit/69 cross/crossfile.in new file mode 100644 index 0000000..678e8d3 --- /dev/null +++ b/test cases/unit/69 cross/crossfile.in @@ -0,0 +1,5 @@ +[host_machine] +system = '@system@' +cpu_family = '@cpu_family@' +cpu = '@cpu@' +endian = '@endian@' diff --git a/test cases/unit/69 cross/meson.build b/test cases/unit/69 cross/meson.build new file mode 100644 index 0000000..acf4f0f --- /dev/null +++ b/test cases/unit/69 cross/meson.build @@ -0,0 +1,16 @@ +project('crosstest') + +if get_option('generate') + conf_data = configuration_data() + conf_data.set('system', build_machine.system()) + conf_data.set('cpu', build_machine.cpu()) + conf_data.set('cpu_family', build_machine.cpu_family()) + conf_data.set('endian', build_machine.endian()) + + configure_file(input: 'crossfile.in', + output: 'crossfile', + configuration: conf_data) + message('Written cross file') +else + assert(meson.is_cross_build(), 'not setup as cross build') +endif diff --git a/test cases/unit/69 cross/meson_options.txt b/test cases/unit/69 cross/meson_options.txt new file mode 100644 index 0000000..5896d63 --- /dev/null +++ b/test cases/unit/69 cross/meson_options.txt @@ -0,0 +1 @@ +option('generate', type : 'boolean', value : false) diff --git a/test cases/unit/70 cross test passed/exewrapper.py b/test cases/unit/70 cross test passed/exewrapper.py new file mode 100755 index 0000000..2c15ed6 --- /dev/null +++ b/test cases/unit/70 cross test passed/exewrapper.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +# Test that the MESON_EXE_WRAPPER environment variable is set + +import argparse +import os +import sys + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('binary') # unused, but needed for test behavior + parser.add_argument('--expected', action='store_true') + args = parser.parse_args() + + defined = 'MESON_EXE_WRAPPER' in os.environ + + if args.expected != defined: + print(os.environ, file=sys.stderr) + return 1 + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/test cases/unit/70 cross test passed/meson.build b/test cases/unit/70 cross test passed/meson.build new file mode 100644 index 0000000..4deb74b --- /dev/null +++ b/test cases/unit/70 cross test passed/meson.build @@ -0,0 +1,19 @@ +project( + 'cross test passed', + 'c', + version : '>= 0.51' +) + +e = executable('exec', 'src/main.c') + +py = import('python').find_installation() + +test('root', e) +test('main', py, args : [meson.current_source_dir() / 'script.py', e]) + +wrapper_args = [] +if get_option('expect') + wrapper_args += '--expected' +endif + +test('exe_wrapper in env', py, args : [meson.current_source_dir() / 'exewrapper.py', e, wrapper_args]) diff --git a/test cases/unit/70 cross test passed/meson_options.txt b/test cases/unit/70 cross test passed/meson_options.txt new file mode 100644 index 0000000..084c776 --- /dev/null +++ b/test cases/unit/70 cross test passed/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'expect', + type : 'boolean', + value : false, +) diff --git a/test cases/unit/70 cross test passed/script.py b/test cases/unit/70 cross test passed/script.py new file mode 100644 index 0000000..257cd30 --- /dev/null +++ b/test cases/unit/70 cross test passed/script.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import subprocess +import sys + +if __name__ == "__main__": + sys.exit(subprocess.run(sys.argv[1:]).returncode) diff --git a/test cases/unit/70 cross test passed/src/main.c b/test cases/unit/70 cross test passed/src/main.c new file mode 100644 index 0000000..490b4a6 --- /dev/null +++ b/test cases/unit/70 cross test passed/src/main.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char const *argv[]) +{ + return 0; +} diff --git a/test cases/unit/70 cross/crossfile.in b/test cases/unit/70 cross/crossfile.in deleted file mode 100644 index 678e8d3..0000000 --- a/test cases/unit/70 cross/crossfile.in +++ /dev/null @@ -1,5 +0,0 @@ -[host_machine] -system = '@system@' -cpu_family = '@cpu_family@' -cpu = '@cpu@' -endian = '@endian@' diff --git a/test cases/unit/70 cross/meson.build b/test cases/unit/70 cross/meson.build deleted file mode 100644 index acf4f0f..0000000 --- a/test cases/unit/70 cross/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('crosstest') - -if get_option('generate') - conf_data = configuration_data() - conf_data.set('system', build_machine.system()) - conf_data.set('cpu', build_machine.cpu()) - conf_data.set('cpu_family', build_machine.cpu_family()) - conf_data.set('endian', build_machine.endian()) - - configure_file(input: 'crossfile.in', - output: 'crossfile', - configuration: conf_data) - message('Written cross file') -else - assert(meson.is_cross_build(), 'not setup as cross build') -endif diff --git a/test cases/unit/70 cross/meson_options.txt b/test cases/unit/70 cross/meson_options.txt deleted file mode 100644 index 5896d63..0000000 --- a/test cases/unit/70 cross/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('generate', type : 'boolean', value : false) diff --git a/test cases/unit/71 cross test passed/exewrapper.py b/test cases/unit/71 cross test passed/exewrapper.py deleted file mode 100755 index 2c15ed6..0000000 --- a/test cases/unit/71 cross test passed/exewrapper.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python3 -# Test that the MESON_EXE_WRAPPER environment variable is set - -import argparse -import os -import sys - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('binary') # unused, but needed for test behavior - parser.add_argument('--expected', action='store_true') - args = parser.parse_args() - - defined = 'MESON_EXE_WRAPPER' in os.environ - - if args.expected != defined: - print(os.environ, file=sys.stderr) - return 1 - return 0 - - -if __name__ == "__main__": - sys.exit(main()) diff --git a/test cases/unit/71 cross test passed/meson.build b/test cases/unit/71 cross test passed/meson.build deleted file mode 100644 index 4deb74b..0000000 --- a/test cases/unit/71 cross test passed/meson.build +++ /dev/null @@ -1,19 +0,0 @@ -project( - 'cross test passed', - 'c', - version : '>= 0.51' -) - -e = executable('exec', 'src/main.c') - -py = import('python').find_installation() - -test('root', e) -test('main', py, args : [meson.current_source_dir() / 'script.py', e]) - -wrapper_args = [] -if get_option('expect') - wrapper_args += '--expected' -endif - -test('exe_wrapper in env', py, args : [meson.current_source_dir() / 'exewrapper.py', e, wrapper_args]) diff --git a/test cases/unit/71 cross test passed/meson_options.txt b/test cases/unit/71 cross test passed/meson_options.txt deleted file mode 100644 index 084c776..0000000 --- a/test cases/unit/71 cross test passed/meson_options.txt +++ /dev/null @@ -1,5 +0,0 @@ -option( - 'expect', - type : 'boolean', - value : false, -) diff --git a/test cases/unit/71 cross test passed/script.py b/test cases/unit/71 cross test passed/script.py deleted file mode 100644 index 257cd30..0000000 --- a/test cases/unit/71 cross test passed/script.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import subprocess -import sys - -if __name__ == "__main__": - sys.exit(subprocess.run(sys.argv[1:]).returncode) diff --git a/test cases/unit/71 cross test passed/src/main.c b/test cases/unit/71 cross test passed/src/main.c deleted file mode 100644 index 490b4a6..0000000 --- a/test cases/unit/71 cross test passed/src/main.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(int argc, char const *argv[]) -{ - return 0; -} diff --git a/test cases/unit/71 summary/meson.build b/test cases/unit/71 summary/meson.build new file mode 100644 index 0000000..6e0f69a --- /dev/null +++ b/test cases/unit/71 summary/meson.build @@ -0,0 +1,23 @@ +project('My Project', version : '1.0') + +subproject('sub') +subproject('sub2', required : false) + +summary({'Some boolean': false, + 'Another boolean': true, + 'Some string': 'Hello World', + 'A list': ['string', 1, true], + 'empty list': [], + 'enabled_opt': get_option('enabled_opt'), + }, section: 'Configuration') +summary({'missing prog': find_program('xyzzy', required: false), + 'existing prog': import('python').find_installation(), + 'missing dep': dependency('', required: false), + 'external dep': dependency('zlib', required: false), + 'internal dep': declare_dependency(), + }, section: 'Stuff') +summary('A number', 1, section: 'Configuration') +summary('yes', true, bool_yn : true, section: 'Configuration') +summary('no', false, bool_yn : true, section: 'Configuration') +summary('coma list', ['a', 'b', 'c'], list_sep: ', ', section: 'Configuration') +summary('long coma list', ['alpha', 'alphacolor', 'apetag', 'audiofx', 'audioparsers', 'auparse', 'autodetect', 'avi'], list_sep: ', ', section: 'Plugins') diff --git a/test cases/unit/71 summary/meson_options.txt b/test cases/unit/71 summary/meson_options.txt new file mode 100644 index 0000000..281c3b6 --- /dev/null +++ b/test cases/unit/71 summary/meson_options.txt @@ -0,0 +1 @@ +option('enabled_opt', type: 'feature', value: 'auto') diff --git a/test cases/unit/71 summary/subprojects/sub/meson.build b/test cases/unit/71 summary/subprojects/sub/meson.build new file mode 100644 index 0000000..e7d7833 --- /dev/null +++ b/test cases/unit/71 summary/subprojects/sub/meson.build @@ -0,0 +1,4 @@ +project('Some Subproject', version : '2.0') + +summary('string', 'bar') +summary({'integer': 1, 'boolean': true}) diff --git a/test cases/unit/71 summary/subprojects/sub2/meson.build b/test cases/unit/71 summary/subprojects/sub2/meson.build new file mode 100644 index 0000000..2560bd0 --- /dev/null +++ b/test cases/unit/71 summary/subprojects/sub2/meson.build @@ -0,0 +1,6 @@ +project('sub2') + +subproject('subsub') + +summary('Section', 'Should not be seen') +error('This subproject failed') diff --git a/test cases/unit/71 summary/subprojects/sub2/subprojects/subsub/meson.build b/test cases/unit/71 summary/subprojects/sub2/subprojects/subsub/meson.build new file mode 100644 index 0000000..98a5a26 --- /dev/null +++ b/test cases/unit/71 summary/subprojects/sub2/subprojects/subsub/meson.build @@ -0,0 +1,3 @@ +project('subsub') + +summary('Something', 'Some value') diff --git a/test cases/unit/72 summary/meson.build b/test cases/unit/72 summary/meson.build deleted file mode 100644 index 6e0f69a..0000000 --- a/test cases/unit/72 summary/meson.build +++ /dev/null @@ -1,23 +0,0 @@ -project('My Project', version : '1.0') - -subproject('sub') -subproject('sub2', required : false) - -summary({'Some boolean': false, - 'Another boolean': true, - 'Some string': 'Hello World', - 'A list': ['string', 1, true], - 'empty list': [], - 'enabled_opt': get_option('enabled_opt'), - }, section: 'Configuration') -summary({'missing prog': find_program('xyzzy', required: false), - 'existing prog': import('python').find_installation(), - 'missing dep': dependency('', required: false), - 'external dep': dependency('zlib', required: false), - 'internal dep': declare_dependency(), - }, section: 'Stuff') -summary('A number', 1, section: 'Configuration') -summary('yes', true, bool_yn : true, section: 'Configuration') -summary('no', false, bool_yn : true, section: 'Configuration') -summary('coma list', ['a', 'b', 'c'], list_sep: ', ', section: 'Configuration') -summary('long coma list', ['alpha', 'alphacolor', 'apetag', 'audiofx', 'audioparsers', 'auparse', 'autodetect', 'avi'], list_sep: ', ', section: 'Plugins') diff --git a/test cases/unit/72 summary/meson_options.txt b/test cases/unit/72 summary/meson_options.txt deleted file mode 100644 index 281c3b6..0000000 --- a/test cases/unit/72 summary/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('enabled_opt', type: 'feature', value: 'auto') diff --git a/test cases/unit/72 summary/subprojects/sub/meson.build b/test cases/unit/72 summary/subprojects/sub/meson.build deleted file mode 100644 index e7d7833..0000000 --- a/test cases/unit/72 summary/subprojects/sub/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('Some Subproject', version : '2.0') - -summary('string', 'bar') -summary({'integer': 1, 'boolean': true}) diff --git a/test cases/unit/72 summary/subprojects/sub2/meson.build b/test cases/unit/72 summary/subprojects/sub2/meson.build deleted file mode 100644 index 2560bd0..0000000 --- a/test cases/unit/72 summary/subprojects/sub2/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('sub2') - -subproject('subsub') - -summary('Section', 'Should not be seen') -error('This subproject failed') diff --git a/test cases/unit/72 summary/subprojects/sub2/subprojects/subsub/meson.build b/test cases/unit/72 summary/subprojects/sub2/subprojects/subsub/meson.build deleted file mode 100644 index 98a5a26..0000000 --- a/test cases/unit/72 summary/subprojects/sub2/subprojects/subsub/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('subsub') - -summary('Something', 'Some value') diff --git a/test cases/unit/72 wrap file url/meson.build b/test cases/unit/72 wrap file url/meson.build new file mode 100644 index 0000000..3bd3b25 --- /dev/null +++ b/test cases/unit/72 wrap file url/meson.build @@ -0,0 +1,4 @@ +project('test wrap with file url') + +exe = subproject('foo').get_variable('foo_exe') +test('test1', exe) diff --git a/test cases/unit/72 wrap file url/subprojects/foo-patch.tar.xz b/test cases/unit/72 wrap file url/subprojects/foo-patch.tar.xz new file mode 100644 index 0000000..fdb026c Binary files /dev/null and b/test cases/unit/72 wrap file url/subprojects/foo-patch.tar.xz differ diff --git a/test cases/unit/72 wrap file url/subprojects/foo.tar.xz b/test cases/unit/72 wrap file url/subprojects/foo.tar.xz new file mode 100644 index 0000000..2ed6ab4 Binary files /dev/null and b/test cases/unit/72 wrap file url/subprojects/foo.tar.xz differ diff --git a/test cases/unit/73 dep files/foo.c b/test cases/unit/73 dep files/foo.c new file mode 100644 index 0000000..e69de29 diff --git a/test cases/unit/73 dep files/meson.build b/test cases/unit/73 dep files/meson.build new file mode 100644 index 0000000..4829f56 --- /dev/null +++ b/test cases/unit/73 dep files/meson.build @@ -0,0 +1,16 @@ +project('test', 'c') + +python = import('python').find_installation() + +lib = library('foo', 'foo.c') + +# The library does not yet exist but we can already use its path during +# configuration. This should not trigger a reconfigure when the library is +# rebuilt. +configure_file( + output: 'out.txt', + capture: true, + command: [python, '-c', 'import sys; print(sys.argv[1])', lib.full_path()], +) + +message('Project configured') diff --git a/test cases/unit/73 wrap file url/meson.build b/test cases/unit/73 wrap file url/meson.build deleted file mode 100644 index 3bd3b25..0000000 --- a/test cases/unit/73 wrap file url/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('test wrap with file url') - -exe = subproject('foo').get_variable('foo_exe') -test('test1', exe) diff --git a/test cases/unit/73 wrap file url/subprojects/foo-patch.tar.xz b/test cases/unit/73 wrap file url/subprojects/foo-patch.tar.xz deleted file mode 100644 index fdb026c..0000000 Binary files a/test cases/unit/73 wrap file url/subprojects/foo-patch.tar.xz and /dev/null differ diff --git a/test cases/unit/73 wrap file url/subprojects/foo.tar.xz b/test cases/unit/73 wrap file url/subprojects/foo.tar.xz deleted file mode 100644 index 2ed6ab4..0000000 Binary files a/test cases/unit/73 wrap file url/subprojects/foo.tar.xz and /dev/null differ diff --git a/test cases/unit/74 dep files/foo.c b/test cases/unit/74 dep files/foo.c deleted file mode 100644 index e69de29..0000000 diff --git a/test cases/unit/74 dep files/meson.build b/test cases/unit/74 dep files/meson.build deleted file mode 100644 index 4829f56..0000000 --- a/test cases/unit/74 dep files/meson.build +++ /dev/null @@ -1,16 +0,0 @@ -project('test', 'c') - -python = import('python').find_installation() - -lib = library('foo', 'foo.c') - -# The library does not yet exist but we can already use its path during -# configuration. This should not trigger a reconfigure when the library is -# rebuilt. -configure_file( - output: 'out.txt', - capture: true, - command: [python, '-c', 'import sys; print(sys.argv[1])', lib.full_path()], -) - -message('Project configured') diff --git a/test cases/unit/74 pkgconfig prefixes/client/client.c b/test cases/unit/74 pkgconfig prefixes/client/client.c new file mode 100644 index 0000000..be9bead --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/client/client.c @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char **argv) +{ + printf("%d\n", val2()); + return 0; +} diff --git a/test cases/unit/74 pkgconfig prefixes/client/meson.build b/test cases/unit/74 pkgconfig prefixes/client/meson.build new file mode 100644 index 0000000..491937b --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/client/meson.build @@ -0,0 +1,3 @@ +project('client', 'c') +val2_dep = dependency('val2') +executable('client', 'client.c', dependencies : [val2_dep], install: true) diff --git a/test cases/unit/74 pkgconfig prefixes/val1/meson.build b/test cases/unit/74 pkgconfig prefixes/val1/meson.build new file mode 100644 index 0000000..cc63e31 --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/val1/meson.build @@ -0,0 +1,5 @@ +project('val1', 'c') +val1 = shared_library('val1', 'val1.c', install: true) +install_headers('val1.h') +pkgconfig = import('pkgconfig') +pkgconfig.generate(val1, libraries : ['-Wl,-rpath,${libdir}']) diff --git a/test cases/unit/74 pkgconfig prefixes/val1/val1.c b/test cases/unit/74 pkgconfig prefixes/val1/val1.c new file mode 100644 index 0000000..591e521 --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/val1/val1.c @@ -0,0 +1,3 @@ +#include "val1.h" + +int val1(void) { return 1; } diff --git a/test cases/unit/74 pkgconfig prefixes/val1/val1.h b/test cases/unit/74 pkgconfig prefixes/val1/val1.h new file mode 100644 index 0000000..6bd435e --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/val1/val1.h @@ -0,0 +1 @@ +int val1(void); diff --git a/test cases/unit/74 pkgconfig prefixes/val2/meson.build b/test cases/unit/74 pkgconfig prefixes/val2/meson.build new file mode 100644 index 0000000..ce69481 --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/val2/meson.build @@ -0,0 +1,8 @@ +project('val2', 'c') +val1_dep = dependency('val1') +val2 = shared_library('val2', 'val2.c', + dependencies : [val1_dep], + install: true) +install_headers('val2.h') +pkgconfig = import('pkgconfig') +pkgconfig.generate(val2, libraries : ['-Wl,-rpath,${libdir}']) diff --git a/test cases/unit/74 pkgconfig prefixes/val2/val2.c b/test cases/unit/74 pkgconfig prefixes/val2/val2.c new file mode 100644 index 0000000..d7d4857 --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/val2/val2.c @@ -0,0 +1,4 @@ +#include "val1.h" +#include "val2.h" + +int val2(void) { return val1() + 2; } diff --git a/test cases/unit/74 pkgconfig prefixes/val2/val2.h b/test cases/unit/74 pkgconfig prefixes/val2/val2.h new file mode 100644 index 0000000..995023d --- /dev/null +++ b/test cases/unit/74 pkgconfig prefixes/val2/val2.h @@ -0,0 +1 @@ +int val2(void); diff --git a/test cases/unit/75 pkgconfig prefixes/client/client.c b/test cases/unit/75 pkgconfig prefixes/client/client.c deleted file mode 100644 index be9bead..0000000 --- a/test cases/unit/75 pkgconfig prefixes/client/client.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) -{ - printf("%d\n", val2()); - return 0; -} diff --git a/test cases/unit/75 pkgconfig prefixes/client/meson.build b/test cases/unit/75 pkgconfig prefixes/client/meson.build deleted file mode 100644 index 491937b..0000000 --- a/test cases/unit/75 pkgconfig prefixes/client/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('client', 'c') -val2_dep = dependency('val2') -executable('client', 'client.c', dependencies : [val2_dep], install: true) diff --git a/test cases/unit/75 pkgconfig prefixes/val1/meson.build b/test cases/unit/75 pkgconfig prefixes/val1/meson.build deleted file mode 100644 index cc63e31..0000000 --- a/test cases/unit/75 pkgconfig prefixes/val1/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('val1', 'c') -val1 = shared_library('val1', 'val1.c', install: true) -install_headers('val1.h') -pkgconfig = import('pkgconfig') -pkgconfig.generate(val1, libraries : ['-Wl,-rpath,${libdir}']) diff --git a/test cases/unit/75 pkgconfig prefixes/val1/val1.c b/test cases/unit/75 pkgconfig prefixes/val1/val1.c deleted file mode 100644 index 591e521..0000000 --- a/test cases/unit/75 pkgconfig prefixes/val1/val1.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "val1.h" - -int val1(void) { return 1; } diff --git a/test cases/unit/75 pkgconfig prefixes/val1/val1.h b/test cases/unit/75 pkgconfig prefixes/val1/val1.h deleted file mode 100644 index 6bd435e..0000000 --- a/test cases/unit/75 pkgconfig prefixes/val1/val1.h +++ /dev/null @@ -1 +0,0 @@ -int val1(void); diff --git a/test cases/unit/75 pkgconfig prefixes/val2/meson.build b/test cases/unit/75 pkgconfig prefixes/val2/meson.build deleted file mode 100644 index ce69481..0000000 --- a/test cases/unit/75 pkgconfig prefixes/val2/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('val2', 'c') -val1_dep = dependency('val1') -val2 = shared_library('val2', 'val2.c', - dependencies : [val1_dep], - install: true) -install_headers('val2.h') -pkgconfig = import('pkgconfig') -pkgconfig.generate(val2, libraries : ['-Wl,-rpath,${libdir}']) diff --git a/test cases/unit/75 pkgconfig prefixes/val2/val2.c b/test cases/unit/75 pkgconfig prefixes/val2/val2.c deleted file mode 100644 index d7d4857..0000000 --- a/test cases/unit/75 pkgconfig prefixes/val2/val2.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "val1.h" -#include "val2.h" - -int val2(void) { return val1() + 2; } diff --git a/test cases/unit/75 pkgconfig prefixes/val2/val2.h b/test cases/unit/75 pkgconfig prefixes/val2/val2.h deleted file mode 100644 index 995023d..0000000 --- a/test cases/unit/75 pkgconfig prefixes/val2/val2.h +++ /dev/null @@ -1 +0,0 @@ -int val2(void); diff --git a/test cases/unit/75 subdir libdir/meson.build b/test cases/unit/75 subdir libdir/meson.build new file mode 100644 index 0000000..5099c91 --- /dev/null +++ b/test cases/unit/75 subdir libdir/meson.build @@ -0,0 +1,2 @@ +project('toplevel', 'c') +subproject('flub') diff --git a/test cases/unit/75 subdir libdir/subprojects/flub/meson.build b/test cases/unit/75 subdir libdir/subprojects/flub/meson.build new file mode 100644 index 0000000..7bfd2c5 --- /dev/null +++ b/test cases/unit/75 subdir libdir/subprojects/flub/meson.build @@ -0,0 +1 @@ +project('subflub', 'c') diff --git a/test cases/unit/76 as link whole/bar.c b/test cases/unit/76 as link whole/bar.c new file mode 100644 index 0000000..79dea9d --- /dev/null +++ b/test cases/unit/76 as link whole/bar.c @@ -0,0 +1,6 @@ +int bar(void); + +int bar(void) +{ + return 0; +} diff --git a/test cases/unit/76 as link whole/foo.c b/test cases/unit/76 as link whole/foo.c new file mode 100644 index 0000000..ffeee82 --- /dev/null +++ b/test cases/unit/76 as link whole/foo.c @@ -0,0 +1,6 @@ +int foo(void); + +int foo(void) +{ + return 0; +} diff --git a/test cases/unit/76 as link whole/meson.build b/test cases/unit/76 as link whole/meson.build new file mode 100644 index 0000000..6bc208f --- /dev/null +++ b/test cases/unit/76 as link whole/meson.build @@ -0,0 +1,11 @@ +project('as-link-whole', 'c') + +foo = static_library('foo', 'foo.c', install: true) +dep = declare_dependency(link_with: foo) +bar1 = library('bar1', 'bar.c', dependencies: dep) +bar2 = library('bar2', 'bar.c', dependencies: dep.as_link_whole()) + +# bar1.pc should have -lfoo but not bar2.pc +pkg = import('pkgconfig') +pkg.generate(bar1) +pkg.generate(bar2) diff --git a/test cases/unit/76 subdir libdir/meson.build b/test cases/unit/76 subdir libdir/meson.build deleted file mode 100644 index 5099c91..0000000 --- a/test cases/unit/76 subdir libdir/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('toplevel', 'c') -subproject('flub') diff --git a/test cases/unit/76 subdir libdir/subprojects/flub/meson.build b/test cases/unit/76 subdir libdir/subprojects/flub/meson.build deleted file mode 100644 index 7bfd2c5..0000000 --- a/test cases/unit/76 subdir libdir/subprojects/flub/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('subflub', 'c') diff --git a/test cases/unit/77 as link whole/bar.c b/test cases/unit/77 as link whole/bar.c deleted file mode 100644 index 79dea9d..0000000 --- a/test cases/unit/77 as link whole/bar.c +++ /dev/null @@ -1,6 +0,0 @@ -int bar(void); - -int bar(void) -{ - return 0; -} diff --git a/test cases/unit/77 as link whole/foo.c b/test cases/unit/77 as link whole/foo.c deleted file mode 100644 index ffeee82..0000000 --- a/test cases/unit/77 as link whole/foo.c +++ /dev/null @@ -1,6 +0,0 @@ -int foo(void); - -int foo(void) -{ - return 0; -} diff --git a/test cases/unit/77 as link whole/meson.build b/test cases/unit/77 as link whole/meson.build deleted file mode 100644 index 6bc208f..0000000 --- a/test cases/unit/77 as link whole/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('as-link-whole', 'c') - -foo = static_library('foo', 'foo.c', install: true) -dep = declare_dependency(link_with: foo) -bar1 = library('bar1', 'bar.c', dependencies: dep) -bar2 = library('bar2', 'bar.c', dependencies: dep.as_link_whole()) - -# bar1.pc should have -lfoo but not bar2.pc -pkg = import('pkgconfig') -pkg.generate(bar1) -pkg.generate(bar2) diff --git a/test cases/unit/77 nostdlib/meson.build b/test cases/unit/77 nostdlib/meson.build new file mode 100644 index 0000000..9c5f949 --- /dev/null +++ b/test cases/unit/77 nostdlib/meson.build @@ -0,0 +1,14 @@ +project('own libc', 'c') + +# Not related to this test, but could not find a better place for this test. +assert(meson.get_cross_property('nonexisting', 'defaultvalue') == 'defaultvalue', + 'Cross prop getting is broken.') + +# A simple project that uses its own libc. + +# Note that we don't need to specify anything, the flags to use +# stdlib come from the cross file. + +exe = executable('selfcontained', 'prog.c') + +test('standalone test', exe) diff --git a/test cases/unit/77 nostdlib/prog.c b/test cases/unit/77 nostdlib/prog.c new file mode 100644 index 0000000..b9216ee --- /dev/null +++ b/test cases/unit/77 nostdlib/prog.c @@ -0,0 +1,7 @@ + +#include + +int main(void) { + const char *message = "Hello without stdlib.\n"; + return simple_print(message, simple_strlen(message)); +} diff --git a/test cases/unit/77 nostdlib/subprojects/mylibc/libc.c b/test cases/unit/77 nostdlib/subprojects/mylibc/libc.c new file mode 100644 index 0000000..67261cb --- /dev/null +++ b/test cases/unit/77 nostdlib/subprojects/mylibc/libc.c @@ -0,0 +1,35 @@ +/* Do not use this as the basis of your own libc. + * The code is probably unoptimal or wonky, as I + * had no prior experience with this, but instead + * just fiddled with the code until it worked. + */ + +#include + +#define STDOUT 1 +#define SYS_WRITE 4 + +int simple_print(const char *msg, const long bufsize) { + int count; + long total_written = 0; + while(total_written < bufsize) { + asm( + "int $0x80\n\t" + : "=a"(count) + : "0"(SYS_WRITE), "b"(STDOUT), "c"(msg+total_written), "d"(bufsize-total_written) + :); + if(count == 0) { + return 1; + } + total_written += count; + } + return 0; +} + +int simple_strlen(const char *str) { + int len = 0; + while(str[len] != '\0') { + len++; + } + return len; +} diff --git a/test cases/unit/77 nostdlib/subprojects/mylibc/meson.build b/test cases/unit/77 nostdlib/subprojects/mylibc/meson.build new file mode 100644 index 0000000..ff4bdb2 --- /dev/null +++ b/test cases/unit/77 nostdlib/subprojects/mylibc/meson.build @@ -0,0 +1,13 @@ +project('own libc', 'c') + +# A very simple libc implementation + +# Do not specify -nostdlib & co. They come from cross specifications. + +libc = static_library('c', 'libc.c', 'stubstart.s') + +mylibc_dep = declare_dependency(link_with : libc, + include_directories : include_directories('.') +) + +meson.override_dependency('c_stdlib', mylibc_dep) diff --git a/test cases/unit/77 nostdlib/subprojects/mylibc/stdio.h b/test cases/unit/77 nostdlib/subprojects/mylibc/stdio.h new file mode 100644 index 0000000..c3f8f56 --- /dev/null +++ b/test cases/unit/77 nostdlib/subprojects/mylibc/stdio.h @@ -0,0 +1,5 @@ +#pragma once + +int simple_print(const char *msg, const long bufsize); + +int simple_strlen(const char *str); diff --git a/test cases/unit/77 nostdlib/subprojects/mylibc/stubstart.s b/test cases/unit/77 nostdlib/subprojects/mylibc/stubstart.s new file mode 100644 index 0000000..0a6d972 --- /dev/null +++ b/test cases/unit/77 nostdlib/subprojects/mylibc/stubstart.s @@ -0,0 +1,8 @@ +.globl _start + +_start: + + call main + movl %eax, %ebx + movl $1, %eax + int $0x80 diff --git a/test cases/unit/78 nostdlib/meson.build b/test cases/unit/78 nostdlib/meson.build deleted file mode 100644 index 9c5f949..0000000 --- a/test cases/unit/78 nostdlib/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('own libc', 'c') - -# Not related to this test, but could not find a better place for this test. -assert(meson.get_cross_property('nonexisting', 'defaultvalue') == 'defaultvalue', - 'Cross prop getting is broken.') - -# A simple project that uses its own libc. - -# Note that we don't need to specify anything, the flags to use -# stdlib come from the cross file. - -exe = executable('selfcontained', 'prog.c') - -test('standalone test', exe) diff --git a/test cases/unit/78 nostdlib/prog.c b/test cases/unit/78 nostdlib/prog.c deleted file mode 100644 index b9216ee..0000000 --- a/test cases/unit/78 nostdlib/prog.c +++ /dev/null @@ -1,7 +0,0 @@ - -#include - -int main(void) { - const char *message = "Hello without stdlib.\n"; - return simple_print(message, simple_strlen(message)); -} diff --git a/test cases/unit/78 nostdlib/subprojects/mylibc/libc.c b/test cases/unit/78 nostdlib/subprojects/mylibc/libc.c deleted file mode 100644 index 67261cb..0000000 --- a/test cases/unit/78 nostdlib/subprojects/mylibc/libc.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Do not use this as the basis of your own libc. - * The code is probably unoptimal or wonky, as I - * had no prior experience with this, but instead - * just fiddled with the code until it worked. - */ - -#include - -#define STDOUT 1 -#define SYS_WRITE 4 - -int simple_print(const char *msg, const long bufsize) { - int count; - long total_written = 0; - while(total_written < bufsize) { - asm( - "int $0x80\n\t" - : "=a"(count) - : "0"(SYS_WRITE), "b"(STDOUT), "c"(msg+total_written), "d"(bufsize-total_written) - :); - if(count == 0) { - return 1; - } - total_written += count; - } - return 0; -} - -int simple_strlen(const char *str) { - int len = 0; - while(str[len] != '\0') { - len++; - } - return len; -} diff --git a/test cases/unit/78 nostdlib/subprojects/mylibc/meson.build b/test cases/unit/78 nostdlib/subprojects/mylibc/meson.build deleted file mode 100644 index ff4bdb2..0000000 --- a/test cases/unit/78 nostdlib/subprojects/mylibc/meson.build +++ /dev/null @@ -1,13 +0,0 @@ -project('own libc', 'c') - -# A very simple libc implementation - -# Do not specify -nostdlib & co. They come from cross specifications. - -libc = static_library('c', 'libc.c', 'stubstart.s') - -mylibc_dep = declare_dependency(link_with : libc, - include_directories : include_directories('.') -) - -meson.override_dependency('c_stdlib', mylibc_dep) diff --git a/test cases/unit/78 nostdlib/subprojects/mylibc/stdio.h b/test cases/unit/78 nostdlib/subprojects/mylibc/stdio.h deleted file mode 100644 index c3f8f56..0000000 --- a/test cases/unit/78 nostdlib/subprojects/mylibc/stdio.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -int simple_print(const char *msg, const long bufsize); - -int simple_strlen(const char *str); diff --git a/test cases/unit/78 nostdlib/subprojects/mylibc/stubstart.s b/test cases/unit/78 nostdlib/subprojects/mylibc/stubstart.s deleted file mode 100644 index 0a6d972..0000000 --- a/test cases/unit/78 nostdlib/subprojects/mylibc/stubstart.s +++ /dev/null @@ -1,8 +0,0 @@ -.globl _start - -_start: - - call main - movl %eax, %ebx - movl $1, %eax - int $0x80 diff --git a/test cases/unit/78 user options for subproject/.gitignore b/test cases/unit/78 user options for subproject/.gitignore new file mode 100644 index 0000000..0bec5ea --- /dev/null +++ b/test cases/unit/78 user options for subproject/.gitignore @@ -0,0 +1 @@ +/subprojects diff --git a/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore b/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore new file mode 100644 index 0000000..4976afc --- /dev/null +++ b/test cases/unit/78 user options for subproject/75 user options for subproject/.gitignore @@ -0,0 +1 @@ +subprojects/* diff --git a/test cases/unit/78 user options for subproject/75 user options for subproject/meson.build b/test cases/unit/78 user options for subproject/75 user options for subproject/meson.build new file mode 100644 index 0000000..0bc395b --- /dev/null +++ b/test cases/unit/78 user options for subproject/75 user options for subproject/meson.build @@ -0,0 +1,3 @@ +project('user option for subproject') + +p = subproject('sub') diff --git a/test cases/unit/79 global-rpath/meson.build b/test cases/unit/79 global-rpath/meson.build new file mode 100644 index 0000000..c67d9e0 --- /dev/null +++ b/test cases/unit/79 global-rpath/meson.build @@ -0,0 +1,3 @@ +project('global-rpath', 'cpp') +yonder_dep = dependency('yonder') +executable('rpathified', 'rpathified.cpp', dependencies: [yonder_dep], install: true) diff --git a/test cases/unit/79 global-rpath/rpathified.cpp b/test cases/unit/79 global-rpath/rpathified.cpp new file mode 100644 index 0000000..3788906 --- /dev/null +++ b/test cases/unit/79 global-rpath/rpathified.cpp @@ -0,0 +1,6 @@ +#include +#include +int main(int argc, char **argv) +{ + return strcmp(yonder(), "AB54 6BR"); +} diff --git a/test cases/unit/79 global-rpath/yonder/meson.build b/test cases/unit/79 global-rpath/yonder/meson.build new file mode 100644 index 0000000..e32f383 --- /dev/null +++ b/test cases/unit/79 global-rpath/yonder/meson.build @@ -0,0 +1,5 @@ +project('yonder', 'cpp') +yonder = shared_library('yonder', 'yonder.cpp', install: true) +install_headers('yonder.h') +pkgconfig = import('pkgconfig') +pkgconfig.generate(yonder) diff --git a/test cases/unit/79 global-rpath/yonder/yonder.cpp b/test cases/unit/79 global-rpath/yonder/yonder.cpp new file mode 100644 index 0000000..b182d34 --- /dev/null +++ b/test cases/unit/79 global-rpath/yonder/yonder.cpp @@ -0,0 +1,3 @@ +#include "yonder.h" + +char *yonder(void) { return "AB54 6BR"; } diff --git a/test cases/unit/79 global-rpath/yonder/yonder.h b/test cases/unit/79 global-rpath/yonder/yonder.h new file mode 100644 index 0000000..9d9ad16 --- /dev/null +++ b/test cases/unit/79 global-rpath/yonder/yonder.h @@ -0,0 +1 @@ +char *yonder(void); diff --git a/test cases/unit/79 user options for subproject/.gitignore b/test cases/unit/79 user options for subproject/.gitignore deleted file mode 100644 index 0bec5ea..0000000 --- a/test cases/unit/79 user options for subproject/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/subprojects diff --git a/test cases/unit/79 user options for subproject/75 user options for subproject/.gitignore b/test cases/unit/79 user options for subproject/75 user options for subproject/.gitignore deleted file mode 100644 index 4976afc..0000000 --- a/test cases/unit/79 user options for subproject/75 user options for subproject/.gitignore +++ /dev/null @@ -1 +0,0 @@ -subprojects/* diff --git a/test cases/unit/79 user options for subproject/75 user options for subproject/meson.build b/test cases/unit/79 user options for subproject/75 user options for subproject/meson.build deleted file mode 100644 index 0bc395b..0000000 --- a/test cases/unit/79 user options for subproject/75 user options for subproject/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('user option for subproject') - -p = subproject('sub') diff --git a/test cases/unit/80 global-rpath/meson.build b/test cases/unit/80 global-rpath/meson.build deleted file mode 100644 index c67d9e0..0000000 --- a/test cases/unit/80 global-rpath/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('global-rpath', 'cpp') -yonder_dep = dependency('yonder') -executable('rpathified', 'rpathified.cpp', dependencies: [yonder_dep], install: true) diff --git a/test cases/unit/80 global-rpath/rpathified.cpp b/test cases/unit/80 global-rpath/rpathified.cpp deleted file mode 100644 index 3788906..0000000 --- a/test cases/unit/80 global-rpath/rpathified.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include -#include -int main(int argc, char **argv) -{ - return strcmp(yonder(), "AB54 6BR"); -} diff --git a/test cases/unit/80 global-rpath/yonder/meson.build b/test cases/unit/80 global-rpath/yonder/meson.build deleted file mode 100644 index e32f383..0000000 --- a/test cases/unit/80 global-rpath/yonder/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('yonder', 'cpp') -yonder = shared_library('yonder', 'yonder.cpp', install: true) -install_headers('yonder.h') -pkgconfig = import('pkgconfig') -pkgconfig.generate(yonder) diff --git a/test cases/unit/80 global-rpath/yonder/yonder.cpp b/test cases/unit/80 global-rpath/yonder/yonder.cpp deleted file mode 100644 index b182d34..0000000 --- a/test cases/unit/80 global-rpath/yonder/yonder.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "yonder.h" - -char *yonder(void) { return "AB54 6BR"; } diff --git a/test cases/unit/80 global-rpath/yonder/yonder.h b/test cases/unit/80 global-rpath/yonder/yonder.h deleted file mode 100644 index 9d9ad16..0000000 --- a/test cases/unit/80 global-rpath/yonder/yonder.h +++ /dev/null @@ -1 +0,0 @@ -char *yonder(void); diff --git a/test cases/unit/80 wrap-git/meson.build b/test cases/unit/80 wrap-git/meson.build new file mode 100644 index 0000000..b0af30a --- /dev/null +++ b/test cases/unit/80 wrap-git/meson.build @@ -0,0 +1,4 @@ +project('test-wrap-git') + +exe = subproject('wrap_git').get_variable('exe') +test('test1', exe) diff --git a/test cases/unit/80 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build b/test cases/unit/80 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build new file mode 100644 index 0000000..2570f77 --- /dev/null +++ b/test cases/unit/80 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build @@ -0,0 +1,3 @@ +project('foo', 'c') + +exe = executable('app', 'main.c') diff --git a/test cases/unit/80 wrap-git/subprojects/wrap_git_upstream/main.c b/test cases/unit/80 wrap-git/subprojects/wrap_git_upstream/main.c new file mode 100644 index 0000000..8488f4e --- /dev/null +++ b/test cases/unit/80 wrap-git/subprojects/wrap_git_upstream/main.c @@ -0,0 +1,4 @@ +int main(void) +{ + return 0; +} diff --git a/test cases/unit/81 meson version compare/meson.build b/test cases/unit/81 meson version compare/meson.build new file mode 100644 index 0000000..4affe21 --- /dev/null +++ b/test cases/unit/81 meson version compare/meson.build @@ -0,0 +1,19 @@ +project('version compare', meson_version: '>= 0.1') + +if meson.version().version_compare('>= 9999') + error('This should not be executed') +elif meson.version().version_compare('>= 0.55') and false + error('This should not be executed') +elif not meson.version().version_compare('>= 0.55') + error('This should not be executed') +elif meson.version().version_compare('>= 0.55') + # This Should not produce warning even when using function not available in + # meson 0.1. + foo_dep = declare_dependency() + meson.override_dependency('foo', foo_dep) +endif + +# This will error out if elif cause did not enter +assert(foo_dep.found(), 'meson.version_compare did not work') + +subproject('foo') diff --git a/test cases/unit/81 meson version compare/subprojects/foo/meson.build b/test cases/unit/81 meson version compare/subprojects/foo/meson.build new file mode 100644 index 0000000..4c66b70 --- /dev/null +++ b/test cases/unit/81 meson version compare/subprojects/foo/meson.build @@ -0,0 +1,8 @@ +project('foo', meson_version: '>= 0.1') + +if meson.version().version_compare('>= 0.55') + # This Should not produce warning even when using function not available in + # meson 0.1. + foo_dep = declare_dependency() + meson.override_dependency('foo2', foo_dep) +endif diff --git a/test cases/unit/81 wrap-git/meson.build b/test cases/unit/81 wrap-git/meson.build deleted file mode 100644 index b0af30a..0000000 --- a/test cases/unit/81 wrap-git/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('test-wrap-git') - -exe = subproject('wrap_git').get_variable('exe') -test('test1', exe) diff --git a/test cases/unit/81 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build b/test cases/unit/81 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build deleted file mode 100644 index 2570f77..0000000 --- a/test cases/unit/81 wrap-git/subprojects/packagefiles/wrap_git_builddef/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('foo', 'c') - -exe = executable('app', 'main.c') diff --git a/test cases/unit/81 wrap-git/subprojects/wrap_git_upstream/main.c b/test cases/unit/81 wrap-git/subprojects/wrap_git_upstream/main.c deleted file mode 100644 index 8488f4e..0000000 --- a/test cases/unit/81 wrap-git/subprojects/wrap_git_upstream/main.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(void) -{ - return 0; -} diff --git a/test cases/unit/82 cross only introspect/meson.build b/test cases/unit/82 cross only introspect/meson.build new file mode 100644 index 0000000..ed25441 --- /dev/null +++ b/test cases/unit/82 cross only introspect/meson.build @@ -0,0 +1,2 @@ +project('cross only introspect') +add_languages('c', native: false) diff --git a/test cases/unit/82 meson version compare/meson.build b/test cases/unit/82 meson version compare/meson.build deleted file mode 100644 index 4affe21..0000000 --- a/test cases/unit/82 meson version compare/meson.build +++ /dev/null @@ -1,19 +0,0 @@ -project('version compare', meson_version: '>= 0.1') - -if meson.version().version_compare('>= 9999') - error('This should not be executed') -elif meson.version().version_compare('>= 0.55') and false - error('This should not be executed') -elif not meson.version().version_compare('>= 0.55') - error('This should not be executed') -elif meson.version().version_compare('>= 0.55') - # This Should not produce warning even when using function not available in - # meson 0.1. - foo_dep = declare_dependency() - meson.override_dependency('foo', foo_dep) -endif - -# This will error out if elif cause did not enter -assert(foo_dep.found(), 'meson.version_compare did not work') - -subproject('foo') diff --git a/test cases/unit/82 meson version compare/subprojects/foo/meson.build b/test cases/unit/82 meson version compare/subprojects/foo/meson.build deleted file mode 100644 index 4c66b70..0000000 --- a/test cases/unit/82 meson version compare/subprojects/foo/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('foo', meson_version: '>= 0.1') - -if meson.version().version_compare('>= 0.55') - # This Should not produce warning even when using function not available in - # meson 0.1. - foo_dep = declare_dependency() - meson.override_dependency('foo2', foo_dep) -endif diff --git a/test cases/unit/83 change option choices/meson.build b/test cases/unit/83 change option choices/meson.build new file mode 100644 index 0000000..d056d65 --- /dev/null +++ b/test cases/unit/83 change option choices/meson.build @@ -0,0 +1 @@ +project('change option choices') diff --git a/test cases/unit/83 change option choices/meson_options.1.txt b/test cases/unit/83 change option choices/meson_options.1.txt new file mode 100644 index 0000000..d0326a5 --- /dev/null +++ b/test cases/unit/83 change option choices/meson_options.1.txt @@ -0,0 +1,13 @@ +option( + 'combo', + type : 'combo', + choices : ['a', 'b', 'c'], + value : 'a', +) + +option( + 'array', + type : 'array', + choices : ['a', 'b', 'c'], + value : ['a'], +) diff --git a/test cases/unit/83 change option choices/meson_options.2.txt b/test cases/unit/83 change option choices/meson_options.2.txt new file mode 100644 index 0000000..4684673 --- /dev/null +++ b/test cases/unit/83 change option choices/meson_options.2.txt @@ -0,0 +1,13 @@ +option( + 'combo', + type : 'combo', + choices : ['b', 'c', 'd'], + value : 'b', +) + +option( + 'array', + type : 'array', + choices : ['b', 'c', 'd'], + value : ['b'], +) diff --git a/test cases/unit/83 cross only introspect/meson.build b/test cases/unit/83 cross only introspect/meson.build deleted file mode 100644 index ed25441..0000000 --- a/test cases/unit/83 cross only introspect/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('cross only introspect') -add_languages('c', native: false) diff --git a/test cases/unit/84 change option choices/meson.build b/test cases/unit/84 change option choices/meson.build deleted file mode 100644 index d056d65..0000000 --- a/test cases/unit/84 change option choices/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('change option choices') diff --git a/test cases/unit/84 change option choices/meson_options.1.txt b/test cases/unit/84 change option choices/meson_options.1.txt deleted file mode 100644 index d0326a5..0000000 --- a/test cases/unit/84 change option choices/meson_options.1.txt +++ /dev/null @@ -1,13 +0,0 @@ -option( - 'combo', - type : 'combo', - choices : ['a', 'b', 'c'], - value : 'a', -) - -option( - 'array', - type : 'array', - choices : ['a', 'b', 'c'], - value : ['a'], -) diff --git a/test cases/unit/84 change option choices/meson_options.2.txt b/test cases/unit/84 change option choices/meson_options.2.txt deleted file mode 100644 index 4684673..0000000 --- a/test cases/unit/84 change option choices/meson_options.2.txt +++ /dev/null @@ -1,13 +0,0 @@ -option( - 'combo', - type : 'combo', - choices : ['b', 'c', 'd'], - value : 'b', -) - -option( - 'array', - type : 'array', - choices : ['b', 'c', 'd'], - value : ['b'], -) diff --git a/test cases/unit/84 nested subproject regenerate depends/main.c b/test cases/unit/84 nested subproject regenerate depends/main.c new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/test cases/unit/84 nested subproject regenerate depends/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/unit/84 nested subproject regenerate depends/meson.build b/test cases/unit/84 nested subproject regenerate depends/meson.build new file mode 100644 index 0000000..5698881 --- /dev/null +++ b/test cases/unit/84 nested subproject regenerate depends/meson.build @@ -0,0 +1,6 @@ +project('nested subproject regenerate depends', 'c') + +s = subproject('sub1') + +# This is needed to make msbuild noop check work correctly +executable('exe', 'main.c') diff --git a/test cases/unit/84 nested subproject regenerate depends/subprojects/sub1/meson.build b/test cases/unit/84 nested subproject regenerate depends/subprojects/sub1/meson.build new file mode 100644 index 0000000..a31db4a --- /dev/null +++ b/test cases/unit/84 nested subproject regenerate depends/subprojects/sub1/meson.build @@ -0,0 +1,4 @@ +project('sub1') + +cmake = import('cmake') +cmake.subproject('sub2') diff --git a/test cases/unit/84 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt b/test cases/unit/84 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt new file mode 100644 index 0000000..f91473a --- /dev/null +++ b/test cases/unit/84 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt @@ -0,0 +1 @@ +project(sub2) diff --git a/test cases/unit/85 cpp modules/main.cpp b/test cases/unit/85 cpp modules/main.cpp new file mode 100644 index 0000000..d825c7d --- /dev/null +++ b/test cases/unit/85 cpp modules/main.cpp @@ -0,0 +1,7 @@ +import M0; +#include + +int main() { + printf("The value is %d", func0()); + return 0; +} diff --git a/test cases/unit/85 cpp modules/meson.build b/test cases/unit/85 cpp modules/meson.build new file mode 100644 index 0000000..cdc296f --- /dev/null +++ b/test cases/unit/85 cpp modules/meson.build @@ -0,0 +1,17 @@ +project('cppmodules', 'cpp', default_options: ['cpp_std=c++latest']) + +e = executable('modtest', + 'main.cpp', + 'src0.ixx', + 'src1.ixx', + 'src2.ixx', + 'src3.ixx', + 'src4.ixx', + 'src5.ixx', + 'src6.ixx', + 'src7.ixx', + 'src8.ixx', + 'src9.ixx', + ) + +test('modtest', e) diff --git a/test cases/unit/85 cpp modules/src0.ixx b/test cases/unit/85 cpp modules/src0.ixx new file mode 100644 index 0000000..3ca4d14 --- /dev/null +++ b/test cases/unit/85 cpp modules/src0.ixx @@ -0,0 +1,7 @@ +export module M0; + +import M1; + +export int func0() { + return func1(); +} diff --git a/test cases/unit/85 cpp modules/src1.ixx b/test cases/unit/85 cpp modules/src1.ixx new file mode 100644 index 0000000..cea6696 --- /dev/null +++ b/test cases/unit/85 cpp modules/src1.ixx @@ -0,0 +1,7 @@ +export module M1; + +import M2; + +export int func1() { + return func2(); +} diff --git a/test cases/unit/85 cpp modules/src2.ixx b/test cases/unit/85 cpp modules/src2.ixx new file mode 100644 index 0000000..415714c --- /dev/null +++ b/test cases/unit/85 cpp modules/src2.ixx @@ -0,0 +1,7 @@ +export module M2; + +import M3; + +export int func2() { + return func3(); +} diff --git a/test cases/unit/85 cpp modules/src3.ixx b/test cases/unit/85 cpp modules/src3.ixx new file mode 100644 index 0000000..96f135c --- /dev/null +++ b/test cases/unit/85 cpp modules/src3.ixx @@ -0,0 +1,7 @@ +export module M3; + +import M4; + +export int func3() { + return func4(); +} diff --git a/test cases/unit/85 cpp modules/src4.ixx b/test cases/unit/85 cpp modules/src4.ixx new file mode 100644 index 0000000..1ac1a6a --- /dev/null +++ b/test cases/unit/85 cpp modules/src4.ixx @@ -0,0 +1,7 @@ +export module M4; + +import M5; + +export int func4() { + return func5(); +} diff --git a/test cases/unit/85 cpp modules/src5.ixx b/test cases/unit/85 cpp modules/src5.ixx new file mode 100644 index 0000000..96cf707 --- /dev/null +++ b/test cases/unit/85 cpp modules/src5.ixx @@ -0,0 +1,7 @@ +export module M5; + +import M6; + +export int func5() { + return func6(); +} diff --git a/test cases/unit/85 cpp modules/src6.ixx b/test cases/unit/85 cpp modules/src6.ixx new file mode 100644 index 0000000..760b71c --- /dev/null +++ b/test cases/unit/85 cpp modules/src6.ixx @@ -0,0 +1,7 @@ +export module M6; + +import M7; + +export int func6() { + return func7(); +} diff --git a/test cases/unit/85 cpp modules/src7.ixx b/test cases/unit/85 cpp modules/src7.ixx new file mode 100644 index 0000000..8ce6608 --- /dev/null +++ b/test cases/unit/85 cpp modules/src7.ixx @@ -0,0 +1,7 @@ +export module M7; + +import M8; + +export int func7() { + return func8(); +} diff --git a/test cases/unit/85 cpp modules/src8.ixx b/test cases/unit/85 cpp modules/src8.ixx new file mode 100644 index 0000000..6a3ef96 --- /dev/null +++ b/test cases/unit/85 cpp modules/src8.ixx @@ -0,0 +1,7 @@ +export module M8; + +import M9; + +export int func8() { + return func9(); +} diff --git a/test cases/unit/85 cpp modules/src9.ixx b/test cases/unit/85 cpp modules/src9.ixx new file mode 100644 index 0000000..3ecb3be --- /dev/null +++ b/test cases/unit/85 cpp modules/src9.ixx @@ -0,0 +1,5 @@ +export module M9; + +export int func9() { + return 42; +} diff --git a/test cases/unit/85 nested subproject regenerate depends/main.c b/test cases/unit/85 nested subproject regenerate depends/main.c deleted file mode 100644 index 9b6bdc2..0000000 --- a/test cases/unit/85 nested subproject regenerate depends/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} diff --git a/test cases/unit/85 nested subproject regenerate depends/meson.build b/test cases/unit/85 nested subproject regenerate depends/meson.build deleted file mode 100644 index 5698881..0000000 --- a/test cases/unit/85 nested subproject regenerate depends/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('nested subproject regenerate depends', 'c') - -s = subproject('sub1') - -# This is needed to make msbuild noop check work correctly -executable('exe', 'main.c') diff --git a/test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build b/test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build deleted file mode 100644 index a31db4a..0000000 --- a/test cases/unit/85 nested subproject regenerate depends/subprojects/sub1/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('sub1') - -cmake = import('cmake') -cmake.subproject('sub2') diff --git a/test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt b/test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt deleted file mode 100644 index f91473a..0000000 --- a/test cases/unit/85 nested subproject regenerate depends/subprojects/sub2/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -project(sub2) diff --git a/test cases/unit/86 cpp modules/main.cpp b/test cases/unit/86 cpp modules/main.cpp deleted file mode 100644 index d825c7d..0000000 --- a/test cases/unit/86 cpp modules/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -import M0; -#include - -int main() { - printf("The value is %d", func0()); - return 0; -} diff --git a/test cases/unit/86 cpp modules/meson.build b/test cases/unit/86 cpp modules/meson.build deleted file mode 100644 index cdc296f..0000000 --- a/test cases/unit/86 cpp modules/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -project('cppmodules', 'cpp', default_options: ['cpp_std=c++latest']) - -e = executable('modtest', - 'main.cpp', - 'src0.ixx', - 'src1.ixx', - 'src2.ixx', - 'src3.ixx', - 'src4.ixx', - 'src5.ixx', - 'src6.ixx', - 'src7.ixx', - 'src8.ixx', - 'src9.ixx', - ) - -test('modtest', e) diff --git a/test cases/unit/86 cpp modules/src0.ixx b/test cases/unit/86 cpp modules/src0.ixx deleted file mode 100644 index 3ca4d14..0000000 --- a/test cases/unit/86 cpp modules/src0.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M0; - -import M1; - -export int func0() { - return func1(); -} diff --git a/test cases/unit/86 cpp modules/src1.ixx b/test cases/unit/86 cpp modules/src1.ixx deleted file mode 100644 index cea6696..0000000 --- a/test cases/unit/86 cpp modules/src1.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M1; - -import M2; - -export int func1() { - return func2(); -} diff --git a/test cases/unit/86 cpp modules/src2.ixx b/test cases/unit/86 cpp modules/src2.ixx deleted file mode 100644 index 415714c..0000000 --- a/test cases/unit/86 cpp modules/src2.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M2; - -import M3; - -export int func2() { - return func3(); -} diff --git a/test cases/unit/86 cpp modules/src3.ixx b/test cases/unit/86 cpp modules/src3.ixx deleted file mode 100644 index 96f135c..0000000 --- a/test cases/unit/86 cpp modules/src3.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M3; - -import M4; - -export int func3() { - return func4(); -} diff --git a/test cases/unit/86 cpp modules/src4.ixx b/test cases/unit/86 cpp modules/src4.ixx deleted file mode 100644 index 1ac1a6a..0000000 --- a/test cases/unit/86 cpp modules/src4.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M4; - -import M5; - -export int func4() { - return func5(); -} diff --git a/test cases/unit/86 cpp modules/src5.ixx b/test cases/unit/86 cpp modules/src5.ixx deleted file mode 100644 index 96cf707..0000000 --- a/test cases/unit/86 cpp modules/src5.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M5; - -import M6; - -export int func5() { - return func6(); -} diff --git a/test cases/unit/86 cpp modules/src6.ixx b/test cases/unit/86 cpp modules/src6.ixx deleted file mode 100644 index 760b71c..0000000 --- a/test cases/unit/86 cpp modules/src6.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M6; - -import M7; - -export int func6() { - return func7(); -} diff --git a/test cases/unit/86 cpp modules/src7.ixx b/test cases/unit/86 cpp modules/src7.ixx deleted file mode 100644 index 8ce6608..0000000 --- a/test cases/unit/86 cpp modules/src7.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M7; - -import M8; - -export int func7() { - return func8(); -} diff --git a/test cases/unit/86 cpp modules/src8.ixx b/test cases/unit/86 cpp modules/src8.ixx deleted file mode 100644 index 6a3ef96..0000000 --- a/test cases/unit/86 cpp modules/src8.ixx +++ /dev/null @@ -1,7 +0,0 @@ -export module M8; - -import M9; - -export int func8() { - return func9(); -} diff --git a/test cases/unit/86 cpp modules/src9.ixx b/test cases/unit/86 cpp modules/src9.ixx deleted file mode 100644 index 3ecb3be..0000000 --- a/test cases/unit/86 cpp modules/src9.ixx +++ /dev/null @@ -1,5 +0,0 @@ -export module M9; - -export int func9() { - return 42; -} diff --git a/test cases/unit/86 prelinking/file1.c b/test cases/unit/86 prelinking/file1.c new file mode 100644 index 0000000..9f0e265 --- /dev/null +++ b/test cases/unit/86 prelinking/file1.c @@ -0,0 +1,14 @@ +#include +#include + +int public_func() { + return round1_a(); +} + +int round1_a() { + return round1_b(); +} + +int round2_a() { + return round2_b(); +} diff --git a/test cases/unit/86 prelinking/file2.c b/test cases/unit/86 prelinking/file2.c new file mode 100644 index 0000000..ce3b115 --- /dev/null +++ b/test cases/unit/86 prelinking/file2.c @@ -0,0 +1,9 @@ +#include + +int round1_b() { + return round1_c(); +} + +int round2_b() { + return round2_c(); +} diff --git a/test cases/unit/86 prelinking/file3.c b/test cases/unit/86 prelinking/file3.c new file mode 100644 index 0000000..85052be --- /dev/null +++ b/test cases/unit/86 prelinking/file3.c @@ -0,0 +1,9 @@ +#include + +int round1_c() { + return round1_d(); +} + +int round2_c() { + return round2_d(); +} diff --git a/test cases/unit/86 prelinking/file4.c b/test cases/unit/86 prelinking/file4.c new file mode 100644 index 0000000..622364e --- /dev/null +++ b/test cases/unit/86 prelinking/file4.c @@ -0,0 +1,9 @@ +#include + +int round1_d() { + return round2_a(); +} + +int round2_d() { + return 42; +} diff --git a/test cases/unit/86 prelinking/main.c b/test cases/unit/86 prelinking/main.c new file mode 100644 index 0000000..09a2e5c --- /dev/null +++ b/test cases/unit/86 prelinking/main.c @@ -0,0 +1,10 @@ +#include +#include + +int main(int argc, char **argv) { + if(public_func() != 42) { + printf("Something failed.\n"); + return 1; + } + return 0; +} diff --git a/test cases/unit/86 prelinking/meson.build b/test cases/unit/86 prelinking/meson.build new file mode 100644 index 0000000..baa9008 --- /dev/null +++ b/test cases/unit/86 prelinking/meson.build @@ -0,0 +1,7 @@ +project('prelinking', 'c') + +liba = static_library('prelinked', 'file1.c', 'file2.c', 'file3.c', 'file4.c', + prelink: true) +exe = executable('testprog', 'main.c', + link_with: liba) +test('prelinked', exe) diff --git a/test cases/unit/86 prelinking/private_header.h b/test cases/unit/86 prelinking/private_header.h new file mode 100644 index 0000000..f24b621 --- /dev/null +++ b/test cases/unit/86 prelinking/private_header.h @@ -0,0 +1,11 @@ +#pragma once + +int round1_a(); +int round1_b(); +int round1_c(); +int round1_d(); + +int round2_a(); +int round2_b(); +int round2_c(); +int round2_d(); diff --git a/test cases/unit/86 prelinking/public_header.h b/test cases/unit/86 prelinking/public_header.h new file mode 100644 index 0000000..0cd6786 --- /dev/null +++ b/test cases/unit/86 prelinking/public_header.h @@ -0,0 +1,3 @@ +#pragma once + +int public_func(); diff --git a/test cases/unit/87 prelinking/file1.c b/test cases/unit/87 prelinking/file1.c deleted file mode 100644 index 9f0e265..0000000 --- a/test cases/unit/87 prelinking/file1.c +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - -int public_func() { - return round1_a(); -} - -int round1_a() { - return round1_b(); -} - -int round2_a() { - return round2_b(); -} diff --git a/test cases/unit/87 prelinking/file2.c b/test cases/unit/87 prelinking/file2.c deleted file mode 100644 index ce3b115..0000000 --- a/test cases/unit/87 prelinking/file2.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int round1_b() { - return round1_c(); -} - -int round2_b() { - return round2_c(); -} diff --git a/test cases/unit/87 prelinking/file3.c b/test cases/unit/87 prelinking/file3.c deleted file mode 100644 index 85052be..0000000 --- a/test cases/unit/87 prelinking/file3.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int round1_c() { - return round1_d(); -} - -int round2_c() { - return round2_d(); -} diff --git a/test cases/unit/87 prelinking/file4.c b/test cases/unit/87 prelinking/file4.c deleted file mode 100644 index 622364e..0000000 --- a/test cases/unit/87 prelinking/file4.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int round1_d() { - return round2_a(); -} - -int round2_d() { - return 42; -} diff --git a/test cases/unit/87 prelinking/main.c b/test cases/unit/87 prelinking/main.c deleted file mode 100644 index 09a2e5c..0000000 --- a/test cases/unit/87 prelinking/main.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - if(public_func() != 42) { - printf("Something failed.\n"); - return 1; - } - return 0; -} diff --git a/test cases/unit/87 prelinking/meson.build b/test cases/unit/87 prelinking/meson.build deleted file mode 100644 index baa9008..0000000 --- a/test cases/unit/87 prelinking/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('prelinking', 'c') - -liba = static_library('prelinked', 'file1.c', 'file2.c', 'file3.c', 'file4.c', - prelink: true) -exe = executable('testprog', 'main.c', - link_with: liba) -test('prelinked', exe) diff --git a/test cases/unit/87 prelinking/private_header.h b/test cases/unit/87 prelinking/private_header.h deleted file mode 100644 index f24b621..0000000 --- a/test cases/unit/87 prelinking/private_header.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -int round1_a(); -int round1_b(); -int round1_c(); -int round1_d(); - -int round2_a(); -int round2_b(); -int round2_c(); -int round2_d(); diff --git a/test cases/unit/87 prelinking/public_header.h b/test cases/unit/87 prelinking/public_header.h deleted file mode 100644 index 0cd6786..0000000 --- a/test cases/unit/87 prelinking/public_header.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -int public_func(); diff --git a/test cases/unit/87 run native test/main.c b/test cases/unit/87 run native test/main.c new file mode 100644 index 0000000..3213780 --- /dev/null +++ b/test cases/unit/87 run native test/main.c @@ -0,0 +1,17 @@ +#include + +int main (int argc, char * argv[]) +{ + const char *out = "SUCCESS!"; + + if (argc != 2) { + printf ("%s\n", out); + } else { + int ret; + FILE *f = fopen (argv[1], "w"); + ret = fwrite (out, sizeof (out), 1, f); + if (ret != 1) + return -1; + } + return 0; +} diff --git a/test cases/unit/87 run native test/meson.build b/test cases/unit/87 run native test/meson.build new file mode 100644 index 0000000..3bf419c --- /dev/null +++ b/test cases/unit/87 run native test/meson.build @@ -0,0 +1,6 @@ +project('run native test', ['c']) + +executable('terget_exe', 'main.c') + +native_exe = executable('native_exe', 'main.c', native: true) +test('native_exe', native_exe, args: ['native_test_has_run.stamp']) diff --git a/test cases/unit/88 multiple envvars/meson.build b/test cases/unit/88 multiple envvars/meson.build new file mode 100644 index 0000000..ac57611 --- /dev/null +++ b/test cases/unit/88 multiple envvars/meson.build @@ -0,0 +1,4 @@ +project('multienv', 'c', 'cpp') + +executable('cexe', 'prog.c') +executable('cppexe', 'prog.cpp') diff --git a/test cases/unit/88 multiple envvars/prog.c b/test cases/unit/88 multiple envvars/prog.c new file mode 100644 index 0000000..38d3c12 --- /dev/null +++ b/test cases/unit/88 multiple envvars/prog.c @@ -0,0 +1,18 @@ +#include + +#ifndef CPPFLAG +#error CPPFLAG not set +#endif + +#ifndef CFLAG +#error CFLAGS not set +#endif + +#ifdef CXXFLAG +#error CXXFLAG is set +#endif + +int main(int argc, char **argv) { + printf("%d %s\n", argc, argv[0]); + return 0; +} diff --git a/test cases/unit/88 multiple envvars/prog.cpp b/test cases/unit/88 multiple envvars/prog.cpp new file mode 100644 index 0000000..61ccf3a --- /dev/null +++ b/test cases/unit/88 multiple envvars/prog.cpp @@ -0,0 +1,18 @@ +#include + +#ifndef CPPFLAG +#error CPPFLAG not set +#endif + +#ifdef CFLAG +#error CFLAG is set +#endif + +#ifndef CXXFLAG +#error CXXFLAG not set +#endif + +int main(int argc, char **argv) { + printf("%d %s\n", argc, argv[0]); + return 0; +} diff --git a/test cases/unit/88 run native test/main.c b/test cases/unit/88 run native test/main.c deleted file mode 100644 index 3213780..0000000 --- a/test cases/unit/88 run native test/main.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - -int main (int argc, char * argv[]) -{ - const char *out = "SUCCESS!"; - - if (argc != 2) { - printf ("%s\n", out); - } else { - int ret; - FILE *f = fopen (argv[1], "w"); - ret = fwrite (out, sizeof (out), 1, f); - if (ret != 1) - return -1; - } - return 0; -} diff --git a/test cases/unit/88 run native test/meson.build b/test cases/unit/88 run native test/meson.build deleted file mode 100644 index 3bf419c..0000000 --- a/test cases/unit/88 run native test/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('run native test', ['c']) - -executable('terget_exe', 'main.c') - -native_exe = executable('native_exe', 'main.c', native: true) -test('native_exe', native_exe, args: ['native_test_has_run.stamp']) diff --git a/test cases/unit/89 multiple envvars/meson.build b/test cases/unit/89 multiple envvars/meson.build deleted file mode 100644 index ac57611..0000000 --- a/test cases/unit/89 multiple envvars/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('multienv', 'c', 'cpp') - -executable('cexe', 'prog.c') -executable('cppexe', 'prog.cpp') diff --git a/test cases/unit/89 multiple envvars/prog.c b/test cases/unit/89 multiple envvars/prog.c deleted file mode 100644 index 38d3c12..0000000 --- a/test cases/unit/89 multiple envvars/prog.c +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#ifndef CPPFLAG -#error CPPFLAG not set -#endif - -#ifndef CFLAG -#error CFLAGS not set -#endif - -#ifdef CXXFLAG -#error CXXFLAG is set -#endif - -int main(int argc, char **argv) { - printf("%d %s\n", argc, argv[0]); - return 0; -} diff --git a/test cases/unit/89 multiple envvars/prog.cpp b/test cases/unit/89 multiple envvars/prog.cpp deleted file mode 100644 index 61ccf3a..0000000 --- a/test cases/unit/89 multiple envvars/prog.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include - -#ifndef CPPFLAG -#error CPPFLAG not set -#endif - -#ifdef CFLAG -#error CFLAG is set -#endif - -#ifndef CXXFLAG -#error CXXFLAG not set -#endif - -int main(int argc, char **argv) { - printf("%d %s\n", argc, argv[0]); - return 0; -} diff --git a/test cases/unit/89 pkgconfig build rpath order/dummy.pc b/test cases/unit/89 pkgconfig build rpath order/dummy.pc new file mode 100644 index 0000000..9e3048b --- /dev/null +++ b/test cases/unit/89 pkgconfig build rpath order/dummy.pc @@ -0,0 +1,7 @@ +prefix=/foo +libdir=${prefix}/dummy + +Name: dummy +Description: Nonexisting lib but add an rpath +Version: 1.0.0 +Libs: -Wl,-rpath,${libdir} diff --git a/test cases/unit/89 pkgconfig build rpath order/meson.build b/test cases/unit/89 pkgconfig build rpath order/meson.build new file mode 100644 index 0000000..76ed8de --- /dev/null +++ b/test cases/unit/89 pkgconfig build rpath order/meson.build @@ -0,0 +1,20 @@ +project('build rpath', 'c', 'cpp') + +subdir('sub') +pkgconf_dep = dependency('dummy') + +executable('prog', 'prog.c', + dependencies : pkgconf_dep, + link_with : l, + build_rpath : '/foo/bar', + install_rpath : '/baz', + install : true, + ) + +executable('progcxx', 'prog.cc', + dependencies : pkgconf_dep, + link_with : l, + build_rpath : '/foo/bar', + install_rpath : 'baz', + install : true, + ) diff --git a/test cases/unit/89 pkgconfig build rpath order/prog.c b/test cases/unit/89 pkgconfig build rpath order/prog.c new file mode 100644 index 0000000..45b2fa3 --- /dev/null +++ b/test cases/unit/89 pkgconfig build rpath order/prog.c @@ -0,0 +1,5 @@ +int get_stuff(); + +int main(int argc, char **argv) { + return get_stuff(); +} diff --git a/test cases/unit/89 pkgconfig build rpath order/prog.cc b/test cases/unit/89 pkgconfig build rpath order/prog.cc new file mode 100644 index 0000000..c7c2123 --- /dev/null +++ b/test cases/unit/89 pkgconfig build rpath order/prog.cc @@ -0,0 +1,8 @@ +#include +#include + +int main(int argc, char **argv) { + std::string* s = new std::string("Hello"); + delete s; + return 0; +} diff --git a/test cases/unit/89 pkgconfig build rpath order/sub/meson.build b/test cases/unit/89 pkgconfig build rpath order/sub/meson.build new file mode 100644 index 0000000..6879ec6 --- /dev/null +++ b/test cases/unit/89 pkgconfig build rpath order/sub/meson.build @@ -0,0 +1 @@ +l = shared_library('stuff', 'stuff.c') diff --git a/test cases/unit/89 pkgconfig build rpath order/sub/stuff.c b/test cases/unit/89 pkgconfig build rpath order/sub/stuff.c new file mode 100644 index 0000000..d56d8b0 --- /dev/null +++ b/test cases/unit/89 pkgconfig build rpath order/sub/stuff.c @@ -0,0 +1,3 @@ +int get_stuff() { + return 0; +} diff --git a/test cases/unit/90 devenv/main.c b/test cases/unit/90 devenv/main.c new file mode 100644 index 0000000..2710593 --- /dev/null +++ b/test cases/unit/90 devenv/main.c @@ -0,0 +1,14 @@ +#include + +#ifdef _WIN32 + #define DO_IMPORT __declspec(dllimport) +#else + #define DO_IMPORT +#endif + +DO_IMPORT int foo(void); + +int main(void) { + printf("This is text.\n"); + return foo(); +} diff --git a/test cases/unit/90 devenv/meson.build b/test cases/unit/90 devenv/meson.build new file mode 100644 index 0000000..3b0bb6a --- /dev/null +++ b/test cases/unit/90 devenv/meson.build @@ -0,0 +1,17 @@ +project('devenv', 'c') + +meson.add_devenv('TEST_A=1') +foo_dep = dependency('foo', fallback: 'sub') + +env = environment() +env.append('TEST_B', ['2', '3'], separator: '+') +meson.add_devenv(env) + +meson.add_devenv({'TEST_B': '0'}, separator: '+', method: 'prepend') + +env = environment({'TEST_B': ['4']}, separator: '+', method: 'append') +meson.add_devenv(env) + +# This exe links on a library built in another directory. On Windows this means +# PATH must contain builddir/subprojects/sub to be able to run it. +executable('app', 'main.c', dependencies: foo_dep, install: true) diff --git a/test cases/unit/90 devenv/subprojects/sub/foo.c b/test cases/unit/90 devenv/subprojects/sub/foo.c new file mode 100644 index 0000000..46cb845 --- /dev/null +++ b/test cases/unit/90 devenv/subprojects/sub/foo.c @@ -0,0 +1,10 @@ +#ifdef _WIN32 + #define DO_EXPORT __declspec(dllexport) +#else + #define DO_EXPORT +#endif + +DO_EXPORT int foo(void) +{ + return 0; +} diff --git a/test cases/unit/90 devenv/subprojects/sub/meson.build b/test cases/unit/90 devenv/subprojects/sub/meson.build new file mode 100644 index 0000000..5cb1232 --- /dev/null +++ b/test cases/unit/90 devenv/subprojects/sub/meson.build @@ -0,0 +1,6 @@ +project('sub', 'c') + +meson.add_devenv({'TEST_B': '1'}) + +libfoo = shared_library('foo', 'foo.c') +meson.override_dependency('foo', declare_dependency(link_with: libfoo)) diff --git a/test cases/unit/90 devenv/test-devenv.py b/test cases/unit/90 devenv/test-devenv.py new file mode 100755 index 0000000..75497ff --- /dev/null +++ b/test cases/unit/90 devenv/test-devenv.py @@ -0,0 +1,8 @@ +#! /usr/bin/python + +import os + +assert os.environ['MESON_DEVENV'] == '1' +assert os.environ['MESON_PROJECT_NAME'] == 'devenv' +assert os.environ['TEST_A'] == '1' +assert os.environ['TEST_B'] == '0+1+2+3+4' diff --git a/test cases/unit/90 pkgconfig build rpath order/dummy.pc b/test cases/unit/90 pkgconfig build rpath order/dummy.pc deleted file mode 100644 index 9e3048b..0000000 --- a/test cases/unit/90 pkgconfig build rpath order/dummy.pc +++ /dev/null @@ -1,7 +0,0 @@ -prefix=/foo -libdir=${prefix}/dummy - -Name: dummy -Description: Nonexisting lib but add an rpath -Version: 1.0.0 -Libs: -Wl,-rpath,${libdir} diff --git a/test cases/unit/90 pkgconfig build rpath order/meson.build b/test cases/unit/90 pkgconfig build rpath order/meson.build deleted file mode 100644 index 76ed8de..0000000 --- a/test cases/unit/90 pkgconfig build rpath order/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -project('build rpath', 'c', 'cpp') - -subdir('sub') -pkgconf_dep = dependency('dummy') - -executable('prog', 'prog.c', - dependencies : pkgconf_dep, - link_with : l, - build_rpath : '/foo/bar', - install_rpath : '/baz', - install : true, - ) - -executable('progcxx', 'prog.cc', - dependencies : pkgconf_dep, - link_with : l, - build_rpath : '/foo/bar', - install_rpath : 'baz', - install : true, - ) diff --git a/test cases/unit/90 pkgconfig build rpath order/prog.c b/test cases/unit/90 pkgconfig build rpath order/prog.c deleted file mode 100644 index 45b2fa3..0000000 --- a/test cases/unit/90 pkgconfig build rpath order/prog.c +++ /dev/null @@ -1,5 +0,0 @@ -int get_stuff(); - -int main(int argc, char **argv) { - return get_stuff(); -} diff --git a/test cases/unit/90 pkgconfig build rpath order/prog.cc b/test cases/unit/90 pkgconfig build rpath order/prog.cc deleted file mode 100644 index c7c2123..0000000 --- a/test cases/unit/90 pkgconfig build rpath order/prog.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(int argc, char **argv) { - std::string* s = new std::string("Hello"); - delete s; - return 0; -} diff --git a/test cases/unit/90 pkgconfig build rpath order/sub/meson.build b/test cases/unit/90 pkgconfig build rpath order/sub/meson.build deleted file mode 100644 index 6879ec6..0000000 --- a/test cases/unit/90 pkgconfig build rpath order/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -l = shared_library('stuff', 'stuff.c') diff --git a/test cases/unit/90 pkgconfig build rpath order/sub/stuff.c b/test cases/unit/90 pkgconfig build rpath order/sub/stuff.c deleted file mode 100644 index d56d8b0..0000000 --- a/test cases/unit/90 pkgconfig build rpath order/sub/stuff.c +++ /dev/null @@ -1,3 +0,0 @@ -int get_stuff() { - return 0; -} diff --git a/test cases/unit/91 devenv/main.c b/test cases/unit/91 devenv/main.c deleted file mode 100644 index 2710593..0000000 --- a/test cases/unit/91 devenv/main.c +++ /dev/null @@ -1,14 +0,0 @@ -#include - -#ifdef _WIN32 - #define DO_IMPORT __declspec(dllimport) -#else - #define DO_IMPORT -#endif - -DO_IMPORT int foo(void); - -int main(void) { - printf("This is text.\n"); - return foo(); -} diff --git a/test cases/unit/91 devenv/meson.build b/test cases/unit/91 devenv/meson.build deleted file mode 100644 index 3b0bb6a..0000000 --- a/test cases/unit/91 devenv/meson.build +++ /dev/null @@ -1,17 +0,0 @@ -project('devenv', 'c') - -meson.add_devenv('TEST_A=1') -foo_dep = dependency('foo', fallback: 'sub') - -env = environment() -env.append('TEST_B', ['2', '3'], separator: '+') -meson.add_devenv(env) - -meson.add_devenv({'TEST_B': '0'}, separator: '+', method: 'prepend') - -env = environment({'TEST_B': ['4']}, separator: '+', method: 'append') -meson.add_devenv(env) - -# This exe links on a library built in another directory. On Windows this means -# PATH must contain builddir/subprojects/sub to be able to run it. -executable('app', 'main.c', dependencies: foo_dep, install: true) diff --git a/test cases/unit/91 devenv/subprojects/sub/foo.c b/test cases/unit/91 devenv/subprojects/sub/foo.c deleted file mode 100644 index 46cb845..0000000 --- a/test cases/unit/91 devenv/subprojects/sub/foo.c +++ /dev/null @@ -1,10 +0,0 @@ -#ifdef _WIN32 - #define DO_EXPORT __declspec(dllexport) -#else - #define DO_EXPORT -#endif - -DO_EXPORT int foo(void) -{ - return 0; -} diff --git a/test cases/unit/91 devenv/subprojects/sub/meson.build b/test cases/unit/91 devenv/subprojects/sub/meson.build deleted file mode 100644 index 5cb1232..0000000 --- a/test cases/unit/91 devenv/subprojects/sub/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('sub', 'c') - -meson.add_devenv({'TEST_B': '1'}) - -libfoo = shared_library('foo', 'foo.c') -meson.override_dependency('foo', declare_dependency(link_with: libfoo)) diff --git a/test cases/unit/91 devenv/test-devenv.py b/test cases/unit/91 devenv/test-devenv.py deleted file mode 100755 index 75497ff..0000000 --- a/test cases/unit/91 devenv/test-devenv.py +++ /dev/null @@ -1,8 +0,0 @@ -#! /usr/bin/python - -import os - -assert os.environ['MESON_DEVENV'] == '1' -assert os.environ['MESON_PROJECT_NAME'] == 'devenv' -assert os.environ['TEST_A'] == '1' -assert os.environ['TEST_B'] == '0+1+2+3+4' 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..3d131e6 --- /dev/null +++ b/test cases/unit/98 install all targets/meson.build @@ -0,0 +1,88 @@ +project('install tag', 'c') + +subdir('subdir') + +# Those files should not be tagged +configure_file(input: 'foo.in', output: 'foo-notag.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +install_data('bar-notag.txt', + install_dir: get_option('datadir') +) +custom_target('ct1', + output: ['out1-notag.txt', 'out2-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) + +# Those files should be tagged as devel +install_headers('foo1-devel.h') +install_data('bar-devel.h', + install_dir: get_option('includedir'), +) +configure_file(input: 'foo.in', output: 'foo2-devel.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('includedir'), + install: true, +) +static_library('static', 'lib.c', + install: true, +) + +# Those files should have 'runtime' tag +executable('app', 'main.c', + install: true, +) +shared_library('shared', 'lib.c', + install: true, +) +both_libraries('both', 'lib.c', + install: true, +) + +# 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 3d131e6..0000000 --- a/test cases/unit/99 install all targets/meson.build +++ /dev/null @@ -1,88 +0,0 @@ -project('install tag', 'c') - -subdir('subdir') - -# Those files should not be tagged -configure_file(input: 'foo.in', output: 'foo-notag.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -install_data('bar-notag.txt', - install_dir: get_option('datadir') -) -custom_target('ct1', - output: ['out1-notag.txt', 'out2-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) - -# Those files should be tagged as devel -install_headers('foo1-devel.h') -install_data('bar-devel.h', - install_dir: get_option('includedir'), -) -configure_file(input: 'foo.in', output: 'foo2-devel.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('includedir'), - install: true, -) -static_library('static', 'lib.c', - install: true, -) - -# Those files should have 'runtime' tag -executable('app', 'main.c', - install: true, -) -shared_library('shared', 'lib.c', - install: true, -) -both_libraries('both', 'lib.c', - install: true, -) - -# 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 dd8fa66..8a7fcd7 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -539,7 +539,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']) @@ -645,7 +645,7 @@ class AllPlatformTests(BasePlatformTests): self.mtest_command + ['--setup=main:onlyinbar']) def test_testsetup_default(self): - testdir = os.path.join(self.unit_test_dir, '49 testsetup default') + testdir = os.path.join(self.unit_test_dir, '48 testsetup default') self.init(testdir) self.build() @@ -1716,7 +1716,7 @@ class AllPlatformTests(BasePlatformTests): def test_options_with_choices_changing(self) -> None: """Detect when options like arrays or combos have their choices change.""" - testdir = Path(os.path.join(self.unit_test_dir, '84 change option choices')) + testdir = Path(os.path.join(self.unit_test_dir, '83 change option choices')) options1 = str(testdir / 'meson_options.1.txt') options2 = str(testdir / 'meson_options.2.txt') @@ -1787,7 +1787,7 @@ class AllPlatformTests(BasePlatformTests): self.build() def test_subproject_promotion_wrap(self): - testdir = os.path.join(self.unit_test_dir, '44 promote wrap') + testdir = os.path.join(self.unit_test_dir, '43 promote wrap') workdir = os.path.join(self.builddir, 'work') shutil.copytree(testdir, workdir) spdir = os.path.join(workdir, 'subprojects') @@ -1834,9 +1834,9 @@ class AllPlatformTests(BasePlatformTests): for (t, f) in [ ('10 out of bounds', 'meson.build'), ('18 wrong plusassign', 'meson.build'), - ('60 bad option argument', 'meson_options.txt'), - ('98 subdir parse error', os.path.join('subdir', 'meson.build')), - ('99 invalid option file', 'meson_options.txt'), + ('59 bad option argument', 'meson_options.txt'), + ('97 subdir parse error', os.path.join('subdir', 'meson.build')), + ('98 invalid option file', 'meson_options.txt'), ]: tdir = os.path.join(self.src_root, 'test cases', 'failing', t) @@ -1960,7 +1960,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) @@ -2278,7 +2278,7 @@ class AllPlatformTests(BasePlatformTests): self.wipe() def test_feature_check_usage_subprojects(self): - testdir = os.path.join(self.unit_test_dir, '41 featurenew subprojects') + testdir = os.path.join(self.unit_test_dir, '40 featurenew subprojects') out = self.init(testdir) # Parent project warns correctly self.assertRegex(out, "WARNING: Project targeting '>=0.45'.*'0.47.0': dict") @@ -2360,7 +2360,7 @@ class AllPlatformTests(BasePlatformTests): @skipIf(is_windows(), 'Help needed with fixing this test on windows') def test_native_dep_pkgconfig(self): testdir = os.path.join(self.unit_test_dir, - '46 native dep pkgconfig var') + '45 native dep pkgconfig var') with tempfile.NamedTemporaryFile(mode='w', delete=False) as crossfile: crossfile.write(textwrap.dedent( '''[binaries] @@ -2387,7 +2387,7 @@ class AllPlatformTests(BasePlatformTests): @skipIf(is_windows(), 'Help needed with fixing this test on windows') def test_pkg_config_libdir(self): testdir = os.path.join(self.unit_test_dir, - '46 native dep pkgconfig var') + '45 native dep pkgconfig var') with tempfile.NamedTemporaryFile(mode='w', delete=False) as crossfile: crossfile.write(textwrap.dedent( '''[binaries] @@ -2421,7 +2421,7 @@ class AllPlatformTests(BasePlatformTests): pickle.dump(obj, f) def test_reconfigure(self): - testdir = os.path.join(self.unit_test_dir, '48 reconfigure') + testdir = os.path.join(self.unit_test_dir, '47 reconfigure') self.init(testdir, extra_args=['-Dopt1=val1', '-Dsub1:werror=true']) self.setconf('-Dopt2=val2') @@ -2572,7 +2572,7 @@ class AllPlatformTests(BasePlatformTests): def test_clang_format(self): if self.backend is not Backend.ninja: raise SkipTest(f'Clang-format is for now only supported on Ninja, not {self.backend.name}') - testdir = os.path.join(self.unit_test_dir, '54 clang-format') + testdir = os.path.join(self.unit_test_dir, '53 clang-format') # Ensure that test project is in git even when running meson from tarball. srcdir = os.path.join(self.builddir, 'src') @@ -2626,7 +2626,7 @@ class AllPlatformTests(BasePlatformTests): raise SkipTest('Clang-tidy breaks when ccache is used and "c++" not in path.') if is_osx(): raise SkipTest('Apple ships a broken clang-tidy that chokes on -pipe.') - testdir = os.path.join(self.unit_test_dir, '69 clang-tidy') + testdir = os.path.join(self.unit_test_dir, '68 clang-tidy') dummydir = os.path.join(testdir, 'dummydir.h') self.init(testdir, override_envvars={'CXX': 'c++'}) out = self.run_target('clang-tidy') @@ -2634,7 +2634,7 @@ class AllPlatformTests(BasePlatformTests): self.assertNotIn(dummydir, out) def test_identity_cross(self): - testdir = os.path.join(self.unit_test_dir, '70 cross') + testdir = os.path.join(self.unit_test_dir, '69 cross') # Do a build to generate a cross file where the host is this target self.init(testdir, extra_args=['-Dgenerate=true']) self.meson_cross_files = [os.path.join(self.builddir, "crossfile")] @@ -2644,7 +2644,7 @@ class AllPlatformTests(BasePlatformTests): self.init(testdir) def test_introspect_buildoptions_without_configured_build(self): - testdir = os.path.join(self.unit_test_dir, '59 introspect buildoptions') + testdir = os.path.join(self.unit_test_dir, '58 introspect buildoptions') testfile = os.path.join(testdir, 'meson.build') res_nb = self.introspect_directory(testfile, ['--buildoptions'] + self.meson_args) self.init(testdir, default_args=False) @@ -2654,11 +2654,11 @@ class AllPlatformTests(BasePlatformTests): self.assertListEqual(sorted(res_nb, key=lambda x: x['name']), sorted(res_wb, key=lambda x: x['name'])) def test_meson_configure_from_source_does_not_crash(self): - testdir = os.path.join(self.unit_test_dir, '59 introspect buildoptions') + testdir = os.path.join(self.unit_test_dir, '58 introspect buildoptions') self._run(self.mconf_command + [testdir]) def test_introspect_buildoptions_cross_only(self): - testdir = os.path.join(self.unit_test_dir, '83 cross only introspect') + testdir = os.path.join(self.unit_test_dir, '82 cross only introspect') testfile = os.path.join(testdir, 'meson.build') res = self.introspect_directory(testfile, ['--buildoptions'] + self.meson_args) optnames = [o['name'] for o in res] @@ -2666,7 +2666,7 @@ class AllPlatformTests(BasePlatformTests): self.assertNotIn('build.c_args', optnames) def test_introspect_json_flat(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') self.init(testdir, extra_args=['-Dlayout=flat']) infodir = os.path.join(self.builddir, 'meson-info') self.assertPathExists(infodir) @@ -2679,7 +2679,7 @@ class AllPlatformTests(BasePlatformTests): assert os.path.relpath(out, self.builddir).startswith('meson-out') def test_introspect_json_dump(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') self.init(testdir) infodir = os.path.join(self.builddir, 'meson-info') self.assertPathExists(infodir) @@ -2881,7 +2881,7 @@ class AllPlatformTests(BasePlatformTests): self.assertDictEqual(targets_to_find, {}) def test_introspect_file_dump_equals_all(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') self.init(testdir) res_all = self.introspect('--all') res_file = {} @@ -2909,7 +2909,7 @@ class AllPlatformTests(BasePlatformTests): self.assertEqual(res_all, res_file) def test_introspect_meson_info(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') introfile = os.path.join(self.builddir, 'meson-info', 'meson-info.json') self.init(testdir) self.assertPathExists(introfile) @@ -2923,7 +2923,7 @@ class AllPlatformTests(BasePlatformTests): self.assertEqual(res1['build_files_updated'], True) def test_introspect_config_update(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') introfile = os.path.join(self.builddir, 'meson-info', 'intro-buildoptions.json') self.init(testdir) self.assertPathExists(introfile) @@ -2951,7 +2951,7 @@ class AllPlatformTests(BasePlatformTests): self.assertListEqual(res1, res2) def test_introspect_targets_from_source(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') testfile = os.path.join(testdir, 'meson.build') introfile = os.path.join(self.builddir, 'meson-info', 'intro-targets.json') self.init(testdir) @@ -2983,7 +2983,7 @@ class AllPlatformTests(BasePlatformTests): self.assertListEqual(res_nb, res_wb) def test_introspect_ast_source(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') testfile = os.path.join(testdir, 'meson.build') res_nb = self.introspect_directory(testfile, ['--ast'] + self.meson_args) @@ -3061,7 +3061,7 @@ class AllPlatformTests(BasePlatformTests): self.assertEqual(node_counter[n], c) def test_introspect_dependencies_from_source(self): - testdir = os.path.join(self.unit_test_dir, '57 introspection') + testdir = os.path.join(self.unit_test_dir, '56 introspection') testfile = os.path.join(testdir, 'meson.build') res_nb = self.introspect_directory(testfile, ['--scan-dependencies'] + self.meson_args) expected = [ @@ -3112,16 +3112,16 @@ class AllPlatformTests(BasePlatformTests): @skip_if_no_cmake def test_cmake_prefix_path(self): - testdir = os.path.join(self.unit_test_dir, '63 cmake_prefix_path') + testdir = os.path.join(self.unit_test_dir, '62 cmake_prefix_path') self.init(testdir, extra_args=['-Dcmake_prefix_path=' + os.path.join(testdir, 'prefix')]) @skip_if_no_cmake def test_cmake_parser(self): - testdir = os.path.join(self.unit_test_dir, '64 cmake parser') + testdir = os.path.join(self.unit_test_dir, '63 cmake parser') self.init(testdir, extra_args=['-Dcmake_prefix_path=' + os.path.join(testdir, 'prefix')]) def test_alias_target(self): - testdir = os.path.join(self.unit_test_dir, '65 alias target') + testdir = os.path.join(self.unit_test_dir, '64 alias target') self.init(testdir) self.build() self.assertPathDoesNotExist(os.path.join(self.builddir, 'prog' + exe_suffix)) @@ -3138,7 +3138,7 @@ class AllPlatformTests(BasePlatformTests): self._run(self.mconf_command + [self.builddir]) def test_summary(self): - testdir = os.path.join(self.unit_test_dir, '72 summary') + testdir = os.path.join(self.unit_test_dir, '71 summary') out = self.init(testdir, extra_args=['-Denabled_opt=enabled']) expected = textwrap.dedent(r''' Some Subproject 2.0 @@ -3279,7 +3279,7 @@ class AllPlatformTests(BasePlatformTests): self.assertPathDoesNotExist(os.path.join(self.builddir, get_exe_name('trivialprog'))) def test_spurious_reconfigure_built_dep_file(self): - testdir = os.path.join(self.unit_test_dir, '74 dep files') + testdir = os.path.join(self.unit_test_dir, '73 dep files') # Regression test: Spurious reconfigure was happening when build # directory is inside source directory. @@ -3573,7 +3573,7 @@ class AllPlatformTests(BasePlatformTests): def test_wrap_git(self): with tempfile.TemporaryDirectory() as tmpdir: srcdir = os.path.join(tmpdir, 'src') - shutil.copytree(os.path.join(self.unit_test_dir, '81 wrap-git'), srcdir) + shutil.copytree(os.path.join(self.unit_test_dir, '80 wrap-git'), srcdir) upstream = os.path.join(srcdir, 'subprojects', 'wrap_git_upstream') upstream_uri = Path(upstream).as_uri() _git_init(upstream) @@ -3605,7 +3605,7 @@ class AllPlatformTests(BasePlatformTests): @skipUnless(is_linux() and (re.search('^i.86$|^x86$|^x64$|^x86_64$|^amd64$', platform.processor()) is not None), 'Requires ASM compiler for x86 or x86_64 platform currently only available on Linux CI runners') def test_nostdlib(self): - testdir = os.path.join(self.unit_test_dir, '78 nostdlib') + testdir = os.path.join(self.unit_test_dir, '77 nostdlib') machinefile = os.path.join(self.builddir, 'machine.txt') with open(machinefile, 'w', encoding='utf-8') as f: f.write(textwrap.dedent(''' @@ -3626,7 +3626,7 @@ class AllPlatformTests(BasePlatformTests): self.build() def test_meson_version_compare(self): - testdir = os.path.join(self.unit_test_dir, '82 meson version compare') + testdir = os.path.join(self.unit_test_dir, '81 meson version compare') out = self.init(testdir) self.assertNotRegex(out, r'WARNING') @@ -3683,7 +3683,7 @@ class AllPlatformTests(BasePlatformTests): # files for that project are changed if os.environ.get('MESON_CI_JOBNAME') == 'linux-bionic-gcc': raise SkipTest('Unsupported CMake version') - testdir = os.path.join(self.unit_test_dir, '85 nested subproject regenerate depends') + testdir = os.path.join(self.unit_test_dir, '84 nested subproject regenerate depends') cmakefile = Path(testdir) / 'subprojects' / 'sub2' / 'CMakeLists.txt' self.init(testdir) self.build() @@ -3701,7 +3701,7 @@ class AllPlatformTests(BasePlatformTests): envs = {'CPPFLAGS': '-DCPPFLAG', 'CFLAGS': '-DCFLAG', 'CXXFLAGS': '-DCXXFLAG'} - srcdir = os.path.join(self.unit_test_dir, '89 multiple envvars') + srcdir = os.path.join(self.unit_test_dir, '88 multiple envvars') self.init(srcdir, override_envvars=envs) self.build() @@ -3711,7 +3711,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() @@ -3757,14 +3757,14 @@ 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') self.build() def test_devenv(self): - testdir = os.path.join(self.unit_test_dir, '91 devenv') + testdir = os.path.join(self.unit_test_dir, '90 devenv') self.init(testdir) self.build() @@ -3780,7 +3780,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() @@ -3805,7 +3805,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() @@ -3845,7 +3845,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() @@ -3988,7 +3988,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) @@ -4180,7 +4180,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)) @@ -4200,7 +4200,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: diff --git a/unittests/linuxcrosstests.py b/unittests/linuxcrosstests.py index 16f7c24..28bf415 100644 --- a/unittests/linuxcrosstests.py +++ b/unittests/linuxcrosstests.py @@ -86,7 +86,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests): def test_cross_libdir_subproject(self): # Guard against a regression where calling "subproject" # would reset the value of libdir to its default value. - testdir = os.path.join(self.unit_test_dir, '76 subdir libdir') + testdir = os.path.join(self.unit_test_dir, '75 subdir libdir') self.init(testdir, extra_args=['--libdir=fuf']) for i in self.introspect('--buildoptions'): if i['name'] == 'libdir': @@ -96,7 +96,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests): def test_std_remains(self): # C_std defined in project options must be in effect also when cross compiling. - testdir = os.path.join(self.unit_test_dir, '51 noncross options') + testdir = os.path.join(self.unit_test_dir, '50 noncross options') self.init(testdir) compdb = self.get_compdb() self.assertRegex(compdb[0]['command'], '-std=c99') @@ -106,7 +106,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests): def test_pkg_config_option(self): if not shutil.which('arm-linux-gnueabihf-pkg-config'): raise unittest.SkipTest('Cross-pkgconfig not found.') - testdir = os.path.join(self.unit_test_dir, '58 pkg_config_path option') + testdir = os.path.join(self.unit_test_dir, '57 pkg_config_path option') self.init(testdir, extra_args=[ '-Dbuild.pkg_config_path=' + os.path.join(testdir, 'build_extra_path'), '-Dpkg_config_path=' + os.path.join(testdir, 'host_extra_path'), @@ -117,7 +117,7 @@ class LinuxCrossArmTests(BaseLinuxCrossTests): https://github.com/mesonbuild/meson/issues/7997 check run native test in crossbuild without exe wrapper ''' - testdir = os.path.join(self.unit_test_dir, '88 run native test') + testdir = os.path.join(self.unit_test_dir, '87 run native test') stamp_file = os.path.join(self.builddir, 'native_test_has_run.stamp') self.init(testdir) self.build() @@ -185,7 +185,7 @@ class LinuxCrossMingwTests(BaseLinuxCrossTests): @skipIfNoPkgconfig def test_cross_pkg_config_option(self): - testdir = os.path.join(self.unit_test_dir, '58 pkg_config_path option') + testdir = os.path.join(self.unit_test_dir, '57 pkg_config_path option') self.init(testdir, extra_args=[ '-Dbuild.pkg_config_path=' + os.path.join(testdir, 'build_extra_path'), '-Dpkg_config_path=' + os.path.join(testdir, 'host_extra_path'), diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index ecb653f..a942df1 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -945,7 +945,7 @@ class LinuxlikeTests(BasePlatformTests): ''' if is_cygwin(): raise SkipTest('Windows PE/COFF binaries do not use RPATH') - testdir = os.path.join(self.unit_test_dir, '90 pkgconfig build rpath order') + testdir = os.path.join(self.unit_test_dir, '89 pkgconfig build rpath order') self.init(testdir, override_envvars={'PKG_CONFIG_PATH': testdir}) self.build() build_rpath = get_rpath(os.path.join(self.builddir, 'prog')) @@ -964,7 +964,7 @@ class LinuxlikeTests(BasePlatformTests): if is_osx(): raise SkipTest('Global RPATHs via LDFLAGS not yet supported on MacOS (does anybody need it?)') - testdir = os.path.join(self.unit_test_dir, '80 global-rpath') + testdir = os.path.join(self.unit_test_dir, '79 global-rpath') oldinstalldir = self.installdir # Build and install an external library without DESTDIR. @@ -1129,7 +1129,7 @@ class LinuxlikeTests(BasePlatformTests): @skipIfNoPkgconfig def test_pkgconfig_relative_paths(self): - testdir = os.path.join(self.unit_test_dir, '62 pkgconfig relative paths') + testdir = os.path.join(self.unit_test_dir, '61 pkgconfig relative paths') pkg_dir = os.path.join(testdir, 'pkgconfig') self.assertPathExists(os.path.join(pkg_dir, 'librelativepath.pc')) @@ -1183,7 +1183,7 @@ class LinuxlikeTests(BasePlatformTests): Check that Meson produces valid static archives with --strip enabled ''' with tempfile.TemporaryDirectory() as tempdirname: - testdirbase = os.path.join(self.unit_test_dir, '66 static archive stripping') + testdirbase = os.path.join(self.unit_test_dir, '65 static archive stripping') # build lib self.new_builddir() @@ -1220,7 +1220,7 @@ class LinuxlikeTests(BasePlatformTests): @skipIfNoPkgconfig @skip_if_not_language('cs') def test_pkgconfig_csharp_library(self): - testdir = os.path.join(self.unit_test_dir, '50 pkgconfig csharp library') + testdir = os.path.join(self.unit_test_dir, '49 pkgconfig csharp library') self.init(testdir) myenv = os.environ.copy() myenv['PKG_CONFIG_PATH'] = _prepend_pkg_config_path(self.privatedir) @@ -1233,7 +1233,7 @@ class LinuxlikeTests(BasePlatformTests): ''' Test that libraries are listed before their dependencies. ''' - testdir = os.path.join(self.unit_test_dir, '53 pkgconfig static link order') + testdir = os.path.join(self.unit_test_dir, '52 pkgconfig static link order') self.init(testdir) myenv = os.environ.copy() myenv['PKG_CONFIG_PATH'] = _prepend_pkg_config_path(self.privatedir) @@ -1245,7 +1245,7 @@ class LinuxlikeTests(BasePlatformTests): ''' Test that the dependencies are always listed in a deterministic order. ''' - testdir = os.path.join(self.unit_test_dir, '43 dep order') + testdir = os.path.join(self.unit_test_dir, '42 dep order') self.init(testdir) with open(os.path.join(self.builddir, 'build.ninja'), encoding='utf-8') as bfile: for line in bfile: @@ -1260,7 +1260,7 @@ class LinuxlikeTests(BasePlatformTests): ''' if is_cygwin(): raise SkipTest('rpath are not used on Cygwin') - testdir = os.path.join(self.unit_test_dir, '42 rpath order') + testdir = os.path.join(self.unit_test_dir, '41 rpath order') self.init(testdir) if is_osx(): rpathre = re.compile(r'-rpath,.*/subprojects/sub1.*-rpath,.*/subprojects/sub2') @@ -1296,7 +1296,7 @@ class LinuxlikeTests(BasePlatformTests): ''' oldprefix = self.prefix # Install external library so we can find it - testdir = os.path.join(self.unit_test_dir, '40 external, internal library rpath', 'external library') + testdir = os.path.join(self.unit_test_dir, '39 external, internal library rpath', 'external library') # install into installdir without using DESTDIR installdir = self.installdir self.prefix = installdir @@ -1308,7 +1308,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, '40 external, internal library rpath', 'built library') + testdir = os.path.join(self.unit_test_dir, '39 external, internal library rpath', 'built library') # install into installdir without using DESTDIR self.prefix = self.installdir self.init(testdir, override_envvars=env) @@ -1348,7 +1348,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 @@ -1361,7 +1361,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 @@ -1394,7 +1394,7 @@ class LinuxlikeTests(BasePlatformTests): oldinstalldir = self.installdir # Build and install both external libraries without DESTDIR - val1dir = os.path.join(self.unit_test_dir, '75 pkgconfig prefixes', 'val1') + val1dir = os.path.join(self.unit_test_dir, '74 pkgconfig prefixes', 'val1') val1prefix = os.path.join(oldinstalldir, 'val1') self.prefix = val1prefix self.installdir = val1prefix @@ -1405,7 +1405,7 @@ class LinuxlikeTests(BasePlatformTests): env1 = {} env1['PKG_CONFIG_PATH'] = os.path.join(val1prefix, self.libdir, 'pkgconfig') - val2dir = os.path.join(self.unit_test_dir, '75 pkgconfig prefixes', 'val2') + val2dir = os.path.join(self.unit_test_dir, '74 pkgconfig prefixes', 'val2') val2prefix = os.path.join(oldinstalldir, 'val2') self.prefix = val2prefix self.installdir = val2prefix @@ -1417,7 +1417,7 @@ class LinuxlikeTests(BasePlatformTests): # Build, install, and run the client program env2 = {} env2['PKG_CONFIG_PATH'] = os.path.join(val2prefix, self.libdir, 'pkgconfig') - testdir = os.path.join(self.unit_test_dir, '75 pkgconfig prefixes', 'client') + testdir = os.path.join(self.unit_test_dir, '74 pkgconfig prefixes', 'client') testprefix = os.path.join(oldinstalldir, 'client') self.prefix = testprefix self.installdir = testprefix @@ -1471,7 +1471,7 @@ class LinuxlikeTests(BasePlatformTests): @skipIfNoPkgconfigDep('gmodule-2.0') def test_ldflag_dedup(self): - testdir = os.path.join(self.unit_test_dir, '52 ldflagdedup') + testdir = os.path.join(self.unit_test_dir, '51 ldflagdedup') if is_cygwin() or is_osx(): raise SkipTest('Not applicable on Cygwin or OSX.') env = get_fake_env() @@ -1489,7 +1489,7 @@ class LinuxlikeTests(BasePlatformTests): self.assertEqual(max_count, 1, 'Export dynamic incorrectly deduplicated.') def test_compiler_libs_static_dedup(self): - testdir = os.path.join(self.unit_test_dir, '56 dedup compiler libs') + testdir = os.path.join(self.unit_test_dir, '55 dedup compiler libs') self.init(testdir) build_ninja = os.path.join(self.builddir, 'build.ninja') with open(build_ninja, encoding='utf-8') as f: @@ -1504,7 +1504,7 @@ class LinuxlikeTests(BasePlatformTests): @skipIfNoPkgconfig def test_noncross_options(self): # C_std defined in project options must be in effect also when native compiling. - testdir = os.path.join(self.unit_test_dir, '51 noncross options') + testdir = os.path.join(self.unit_test_dir, '50 noncross options') self.init(testdir, extra_args=['-Dpkg_config_path=' + testdir]) compdb = self.get_compdb() self.assertEqual(len(compdb), 2) @@ -1513,7 +1513,7 @@ class LinuxlikeTests(BasePlatformTests): self.build() def test_identity_cross(self): - testdir = os.path.join(self.unit_test_dir, '61 identity cross') + testdir = os.path.join(self.unit_test_dir, '60 identity cross') constantsfile = tempfile.NamedTemporaryFile(mode='w') constantsfile.write(textwrap.dedent('''\ @@ -1542,7 +1542,7 @@ class LinuxlikeTests(BasePlatformTests): self.init(testdir) def test_identity_cross_env(self): - testdir = os.path.join(self.unit_test_dir, '61 identity cross') + testdir = os.path.join(self.unit_test_dir, '60 identity cross') env = { 'CC_FOR_BUILD': '"' + os.path.join(testdir, 'build_wrapper.py') + '"', } @@ -1562,7 +1562,7 @@ class LinuxlikeTests(BasePlatformTests): raise SkipTest("Cygwin doesn't support LD_LIBRARY_PATH.") # Build some libraries and install them - testdir = os.path.join(self.unit_test_dir, '67 static link/lib') + testdir = os.path.join(self.unit_test_dir, '66 static link/lib') libdir = os.path.join(self.installdir, self.libdir) oldprefix = self.prefix self.prefix = self.installdir @@ -1574,7 +1574,7 @@ class LinuxlikeTests(BasePlatformTests): self.prefix = oldprefix meson_args = [f'-Dc_link_args=-L{libdir}', '--fatal-meson-warnings'] - testdir = os.path.join(self.unit_test_dir, '67 static link') + testdir = os.path.join(self.unit_test_dir, '66 static link') env = {'PKG_CONFIG_LIBDIR': os.path.join(libdir, 'pkgconfig')} self.init(testdir, extra_args=meson_args, override_envvars=env) self.build() @@ -1648,7 +1648,7 @@ class LinuxlikeTests(BasePlatformTests): return hashlib.sha256(f.read()).hexdigest() def test_wrap_with_file_url(self): - testdir = os.path.join(self.unit_test_dir, '73 wrap file url') + testdir = os.path.join(self.unit_test_dir, '72 wrap file url') source_filename = os.path.join(testdir, 'subprojects', 'foo.tar.xz') patch_filename = os.path.join(testdir, 'subprojects', 'foo-patch.tar.xz') wrap_filename = os.path.join(testdir, 'subprojects', 'foo.wrap') @@ -1705,7 +1705,7 @@ class LinuxlikeTests(BasePlatformTests): self.init(d, override_envvars={'PKG_CONFIG_LIBDIR': privatedir}) def test_as_link_whole(self): - testdir = os.path.join(self.unit_test_dir, '77 as link whole') + testdir = os.path.join(self.unit_test_dir, '76 as link whole') self.init(testdir) with open(os.path.join(self.privatedir, 'bar1.pc'), encoding='utf-8') as f: content = f.read() @@ -1722,7 +1722,7 @@ class LinuxlikeTests(BasePlatformTests): raise SkipTest('Prelinking not supported on Darwin.') if 'clang' in os.environ.get('CC', 'dummy'): raise SkipTest('Prelinking not supported with Clang.') - testdir = os.path.join(self.unit_test_dir, '87 prelinking') + testdir = os.path.join(self.unit_test_dir, '86 prelinking') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) if cc.id == "gcc": @@ -1777,7 +1777,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/machinefiletests.py b/unittests/machinefiletests.py index 0a756b5..7d75ebc 100644 --- a/unittests/machinefiletests.py +++ b/unittests/machinefiletests.py @@ -62,7 +62,7 @@ class NativeFileTests(BasePlatformTests): def setUp(self): super().setUp() - self.testcase = os.path.join(self.unit_test_dir, '47 native file binary') + self.testcase = os.path.join(self.unit_test_dir, '46 native file binary') self.current_config = 0 self.current_wrapper = 0 @@ -379,12 +379,12 @@ class NativeFileTests(BasePlatformTests): self.assertEqual(compiler.version, '1.2345') def test_native_file_dirs(self): - testcase = os.path.join(self.unit_test_dir, '60 native file override') + testcase = os.path.join(self.unit_test_dir, '59 native file override') self.init(testcase, default_args=False, extra_args=['--native-file', os.path.join(testcase, 'nativefile')]) def test_native_file_dirs_overridden(self): - testcase = os.path.join(self.unit_test_dir, '60 native file override') + testcase = os.path.join(self.unit_test_dir, '59 native file override') self.init(testcase, default_args=False, extra_args=['--native-file', os.path.join(testcase, 'nativefile'), '-Ddef_libdir=liblib', '-Dlibdir=liblib']) @@ -422,7 +422,7 @@ class NativeFileTests(BasePlatformTests): self.init(testcase, extra_args=['--native-file', config, '-Dother_one=false']) def test_user_options_subproject(self): - testcase = os.path.join(self.unit_test_dir, '79 user options for subproject') + testcase = os.path.join(self.unit_test_dir, '78 user options for subproject') s = os.path.join(testcase, 'subprojects') if not os.path.exists(s): @@ -650,7 +650,7 @@ class CrossFileTests(BasePlatformTests): ''') def test_needs_exe_wrapper_true(self): - testdir = os.path.join(self.unit_test_dir, '71 cross test passed') + testdir = os.path.join(self.unit_test_dir, '70 cross test passed') with tempfile.TemporaryDirectory() as d: p = Path(d) / 'crossfile' with p.open('wt', encoding='utf-8') as f: @@ -660,7 +660,7 @@ class CrossFileTests(BasePlatformTests): self.assertRegex(out, r'Skipped:\s*1\s*\n') def test_needs_exe_wrapper_false(self): - testdir = os.path.join(self.unit_test_dir, '71 cross test passed') + testdir = os.path.join(self.unit_test_dir, '70 cross test passed') with tempfile.TemporaryDirectory() as d: p = Path(d) / 'crossfile' with p.open('wt', encoding='utf-8') as f: @@ -670,7 +670,7 @@ class CrossFileTests(BasePlatformTests): self.assertNotRegex(out, r'Skipped:\s*1\n') def test_needs_exe_wrapper_true_wrapper(self): - testdir = os.path.join(self.unit_test_dir, '71 cross test passed') + testdir = os.path.join(self.unit_test_dir, '70 cross test passed') with tempfile.TemporaryDirectory() as d: s = Path(d) / 'wrapper.py' with s.open('wt', encoding='utf-8') as f: @@ -687,7 +687,7 @@ class CrossFileTests(BasePlatformTests): self.assertRegex(out, r'Ok:\s*3\s*\n') def test_cross_exe_passed_no_wrapper(self): - testdir = os.path.join(self.unit_test_dir, '71 cross test passed') + testdir = os.path.join(self.unit_test_dir, '70 cross test passed') with tempfile.TemporaryDirectory() as d: p = Path(d) / 'crossfile' with p.open('wt', encoding='utf-8') as f: @@ -756,7 +756,7 @@ class CrossFileTests(BasePlatformTests): return filename def test_cross_file_dirs(self): - testcase = os.path.join(self.unit_test_dir, '60 native file override') + testcase = os.path.join(self.unit_test_dir, '59 native file override') self.init(testcase, default_args=False, extra_args=['--native-file', os.path.join(testcase, 'nativefile'), '--cross-file', os.path.join(testcase, 'crossfile'), @@ -774,7 +774,7 @@ class CrossFileTests(BasePlatformTests): '-Ddef_sysconfdir=sysconfbar']) def test_cross_file_dirs_overridden(self): - testcase = os.path.join(self.unit_test_dir, '60 native file override') + testcase = os.path.join(self.unit_test_dir, '59 native file override') self.init(testcase, default_args=False, extra_args=['--native-file', os.path.join(testcase, 'nativefile'), '--cross-file', os.path.join(testcase, 'crossfile'), @@ -793,7 +793,7 @@ class CrossFileTests(BasePlatformTests): def test_cross_file_dirs_chain(self): # crossfile2 overrides crossfile overrides nativefile - testcase = os.path.join(self.unit_test_dir, '60 native file override') + testcase = os.path.join(self.unit_test_dir, '59 native file override') self.init(testcase, default_args=False, extra_args=['--native-file', os.path.join(testcase, 'nativefile'), '--cross-file', os.path.join(testcase, 'crossfile'), diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index c5e5233..b5907a1 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -32,7 +32,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): @@ -68,5 +68,5 @@ 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'}) diff --git a/unittests/windowstests.py b/unittests/windowstests.py index d3ad932..7339ca8 100644 --- a/unittests/windowstests.py +++ b/unittests/windowstests.py @@ -169,7 +169,7 @@ class WindowsTests(BasePlatformTests): self.assertRebuiltTarget('prog_1') def test_msvc_cpp17(self): - testdir = os.path.join(self.unit_test_dir, '45 vscpp17') + testdir = os.path.join(self.unit_test_dir, '44 vscpp17') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) @@ -357,7 +357,7 @@ class WindowsTests(BasePlatformTests): raise SkipTest('C++ modules is only supported with Visual Studio.') if version_compare(os.environ['VSCMD_VER'], '<16.10.0'): raise SkipTest('C++ modules are only supported with VS 2019 Preview or newer.') - self.init(os.path.join(self.unit_test_dir, '86 cpp modules')) + self.init(os.path.join(self.unit_test_dir, '85 cpp modules')) self.build() def test_non_utf8_fails(self): -- cgit v1.1