From 3bbe66e971dfe84dcffa702c2673fb136da0a508 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 26 Oct 2023 19:23:20 +0300 Subject: Condense test directories for RC1. --- run_format_tests.py | 2 +- test cases/cmake/26 dependency fallback/main.cpp | 10 - .../cmake/26 dependency fallback/meson.build | 30 --- .../subprojects/broken_method.wrap | 2 - .../26 dependency fallback/subprojects/cmMod.wrap | 5 - .../subprojects/cmMod/CMakeLists.txt | 20 -- .../subprojects/cmMod/cmMod.cpp | 15 -- .../subprojects/cmMod/cmMod.hpp | 18 -- .../subprojects/cmMod/cpp_pch.hpp | 2 - .../subprojects/cmake_subp/CMakeLists.txt | 2 - .../subprojects/force_cmake.wrap | 2 - .../subprojects/force_cmake/CMakeLists.txt | 2 - .../subprojects/force_cmake/meson.build | 4 - .../subprojects/meson_method.wrap | 2 - .../subprojects/meson_subp/meson.build | 1 - test cases/cmake/27 dependency fallback/main.cpp | 10 + .../cmake/27 dependency fallback/meson.build | 30 +++ .../subprojects/broken_method.wrap | 2 + .../27 dependency fallback/subprojects/cmMod.wrap | 5 + .../subprojects/cmMod/CMakeLists.txt | 20 ++ .../subprojects/cmMod/cmMod.cpp | 15 ++ .../subprojects/cmMod/cmMod.hpp | 18 ++ .../subprojects/cmMod/cpp_pch.hpp | 2 + .../subprojects/cmake_subp/CMakeLists.txt | 2 + .../subprojects/force_cmake.wrap | 2 + .../subprojects/force_cmake/CMakeLists.txt | 2 + .../subprojects/force_cmake/meson.build | 4 + .../subprojects/meson_method.wrap | 2 + .../subprojects/meson_subp/meson.build | 1 + .../include/test_262_header.h | 1 - .../meson.build | 7 - .../meson.build | 67 ------ .../meson_options.txt | 1 - test cases/common/263 default_options dict/lib.c | 1 - .../common/263 default_options dict/meson.build | 22 -- .../263 default_options dict/meson_options.txt | 4 - .../include/test_262_header.h | 1 + .../meson.build | 7 + test cases/common/264 format string/meson.build | 20 -- .../common/264 format string/meson_options.txt | 1 - test cases/common/264 format string/test.json | 28 --- .../meson.build | 67 ++++++ .../meson_options.txt | 1 + test cases/common/265 default_options dict/lib.c | 1 + .../common/265 default_options dict/meson.build | 22 ++ .../265 default_options dict/meson_options.txt | 4 + .../meson.build | 5 - .../subprojects/dummy.wrap | 5 - .../subprojects/dummy/dummy.c | 3 - .../subprojects/dummy/meson.build | 6 - .../subprojects/dummy/meson_options.txt | 1 - test cases/common/266 format string/meson.build | 20 ++ .../common/266 format string/meson_options.txt | 1 + test cases/common/266 format string/test.json | 28 +++ .../foo/file1 | 1 - .../foo/link1 | 1 - .../foo/link2.h | 1 - .../meson.build | 38 ---- .../test.json | 14 -- .../meson.build | 5 + .../subprojects/dummy.wrap | 5 + .../subprojects/dummy/dummy.c | 3 + .../subprojects/dummy/meson.build | 6 + .../subprojects/dummy/meson_options.txt | 1 + .../foo/file1 | 1 + .../foo/link1 | 1 + .../foo/link2.h | 1 + .../meson.build | 38 ++++ .../test.json | 14 ++ .../271 env in generator.process/generate_main.py | 11 + .../271 env in generator.process/main.template | 3 + .../271 env in generator.process/meson.build | 21 ++ .../272 env in generator.process/generate_main.py | 11 - .../272 env in generator.process/main.template | 3 - .../272 env in generator.process/meson.build | 21 -- test cases/failing/100 bool in combo/meson.build | 1 + .../failing/100 bool in combo/meson_options.txt | 5 + .../failing/100 bool in combo/nativefile.ini | 2 + test cases/failing/100 bool in combo/test.json | 5 + .../100 no glib-compile-resources/meson.build | 8 - .../100 no glib-compile-resources/test.json | 7 - .../trivial.gresource.xml | 3 - .../failing/101 compiler no lang/meson.build | 2 + test cases/failing/101 compiler no lang/test.json | 7 + 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 no fallback/meson.build | 2 + .../102 no fallback/subprojects/foob/meson.build | 2 + test cases/failing/102 no fallback/test.json | 8 + .../failing/103 compiler no lang/meson.build | 2 - test cases/failing/103 compiler no lang/test.json | 7 - test cases/failing/103 feature require/meson.build | 2 + .../failing/103 feature require/meson_options.txt | 1 + test cases/failing/103 feature require/test.json | 8 + .../failing/104 feature require.bis/meson.build | 2 + .../104 feature require.bis/meson_options.txt | 1 + .../failing/104 feature require.bis/test.json | 8 + 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 - .../105 no build get_external_property/meson.build | 3 + .../105 no build get_external_property/test.json | 7 + .../failing/106 enter subdir twice/meson.build | 3 + .../failing/106 enter subdir twice/sub/meson.build | 1 + .../failing/106 enter subdir twice/test.json | 7 + .../failing/106 feature require.bis/meson.build | 2 - .../106 feature require.bis/meson_options.txt | 1 - .../failing/106 feature require.bis/test.json | 8 - .../109 invalid fstring/meson.build | 4 + .../109 invalid fstring/test.json | 7 + test cases/failing/107 invalid fstring/meson.build | 3 + test cases/failing/107 invalid fstring/test.json | 7 + .../107 no build get_external_property/meson.build | 3 - .../107 no build get_external_property/test.json | 7 - .../108 compiler argument checking/meson.build | 4 + .../108 compiler argument checking/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 - test cases/failing/109 empty fallback/meson.build | 6 + .../109 empty fallback/subprojects/foo/meson.build | 3 + test cases/failing/109 empty fallback/test.json | 8 + .../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 cmake executable dependency/meson.build | 9 + .../subprojects/cmlib/CMakeLists.txt | 5 + .../subprojects/cmlib/main.c | 3 + .../110 cmake executable dependency/test.json | 10 + .../110 compiler argument checking/meson.build | 4 - .../110 compiler argument checking/test.json | 7 - .../111 allow_fallback with fallback/meson.build | 3 + .../111 allow_fallback with fallback/test.json | 8 + 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 | 8 - .../112 cmake executable dependency/meson.build | 9 - .../subprojects/cmlib/CMakeLists.txt | 5 - .../subprojects/cmlib/main.c | 3 - .../112 cmake executable dependency/test.json | 10 - .../failing/112 nonsensical bindgen/meson.build | 20 ++ .../failing/112 nonsensical bindgen/src/header.h | 8 + .../failing/112 nonsensical bindgen/src/source.c | 8 + .../failing/112 nonsensical bindgen/test.json | 8 + .../113 allow_fallback with fallback/meson.build | 3 - .../113 allow_fallback with fallback/test.json | 8 - .../failing/113 run_target in test/meson.build | 7 + .../failing/113 run_target in test/test.json | 8 + .../failing/113 run_target in test/trivial.c | 6 + .../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 - .../meson.build | 7 + .../114 run_target in add_install_script/test.json | 8 + .../114 run_target in add_install_script/trivial.c | 11 + .../115 pathsep in install_symlink/meson.build | 3 + .../115 pathsep in install_symlink/test.json | 7 + .../failing/115 run_target in test/meson.build | 7 - .../failing/115 run_target in test/test.json | 8 - .../failing/115 run_target in test/trivial.c | 6 - .../meson.build | 7 - .../116 run_target in add_install_script/test.json | 8 - .../116 run_target in add_install_script/trivial.c | 11 - .../116 subproject version conflict/meson.build | 4 + .../subprojects/A/meson.build | 4 + .../subprojects/B/meson.build | 3 + .../116 subproject version conflict/test.json | 7 + .../117 pathsep in install_symlink/meson.build | 3 - .../117 pathsep in install_symlink/test.json | 7 - .../117 structured source empty string/main.rs | 0 .../117 structured source empty string/meson.build | 13 ++ .../117 structured source empty string/test.json | 7 + .../118 structured_sources conflicts/main.rs | 0 .../118 structured_sources conflicts/meson.build | 17 ++ .../118 structured_sources conflicts/test.json | 7 + .../118 subproject version conflict/meson.build | 4 - .../subprojects/A/meson.build | 4 - .../subprojects/B/meson.build | 3 - .../118 subproject version conflict/test.json | 7 - .../failing/119 missing compiler/meson.build | 3 + .../119 missing compiler/subprojects/sub/main.c | 1 + .../subprojects/sub/meson.build | 4 + test cases/failing/119 missing compiler/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 - .../failing/120 cmake subproject error/meson.build | 8 + .../subprojects/cmlib/CMakeLists.txt | 5 + .../failing/120 cmake subproject error/test.json | 10 + .../120 structured_sources conflicts/main.rs | 0 .../120 structured_sources conflicts/meson.build | 17 -- .../120 structured_sources conflicts/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 - .../meson.build | 22 ++ .../test.json | 8 + .../failing/122 cmake subproject error/meson.build | 8 - .../subprojects/cmlib/CMakeLists.txt | 5 - .../failing/122 cmake subproject error/test.json | 10 - .../122 subproject sandbox violation/meson.build | 34 +++ .../meson_options.txt | 1 + .../subprojects/subproj1/file.txt | 0 .../subprojects/subproj1/meson.build | 4 + .../subprojects/subproj1/nested/meson.build | 5 + .../subprojects/subproj2/file.txt | 0 .../subprojects/subproj2/meson.build | 7 + .../subprojects/subproj2/nested/meson.build | 0 .../subprojects/subproj3/file.txt | 0 .../subprojects/subproj3/meson.build | 3 + .../122 subproject sandbox violation/test.json | 16 ++ .../inc/lib.h | 2 + .../123 override and add_project_dependency/lib.c | 3 + .../meson.build | 8 + .../subprojects/a/meson.build | 10 + .../subprojects/a/prog.c | 6 + .../test.json | 7 + .../meson.build | 22 -- .../test.json | 8 - .../124 subproject sandbox violation/meson.build | 34 --- .../meson_options.txt | 1 - .../subprojects/subproj1/file.txt | 0 .../subprojects/subproj1/meson.build | 4 - .../subprojects/subproj1/nested/meson.build | 5 - .../subprojects/subproj2/file.txt | 0 .../subprojects/subproj2/meson.build | 7 - .../subprojects/subproj2/nested/meson.build | 0 .../subprojects/subproj3/file.txt | 0 .../subprojects/subproj3/meson.build | 3 - .../124 subproject sandbox violation/test.json | 16 -- .../inc/lib.h | 2 + .../lib.c | 3 + .../meson.build | 5 + .../test.json | 7 + .../failing/125 extract from unity/meson.build | 4 + test cases/failing/125 extract from unity/src1.c | 3 + test cases/failing/125 extract from unity/src2.c | 3 + .../failing/125 extract from unity/test.json | 7 + .../inc/lib.h | 2 - .../125 override and add_project_dependency/lib.c | 3 - .../meson.build | 8 - .../subprojects/a/meson.build | 10 - .../subprojects/a/prog.c | 6 - .../test.json | 7 - .../126 subproject object as a dependency/main.c | 1 + .../meson.build | 4 + .../subprojects/sub/meson.build | 1 + .../test.json | 7 + .../inc/lib.h | 2 - .../lib.c | 3 - .../meson.build | 5 - .../test.json | 7 - .../failing/127 extract from unity/meson.build | 4 - test cases/failing/127 extract from unity/src1.c | 3 - test cases/failing/127 extract from unity/src2.c | 3 - .../failing/127 extract from unity/test.json | 7 - test cases/failing/127 generator host binary/exe.c | 1 + .../failing/127 generator host binary/lib.in | 1 + .../failing/127 generator host binary/meson.build | 14 ++ .../failing/127 generator host binary/test.json | 5 + test cases/failing/128 invalid ast/meson.build | 3 + test cases/failing/128 invalid ast/test.json | 9 + .../128 subproject object as a dependency/main.c | 1 - .../meson.build | 4 - .../subprojects/sub/meson.build | 1 - .../test.json | 7 - test cases/failing/129 generator host binary/exe.c | 1 - .../failing/129 generator host binary/lib.in | 1 - .../failing/129 generator host binary/meson.build | 14 -- .../failing/129 generator host binary/test.json | 5 - .../129 invalid project function/meson.build | 1 + .../failing/129 invalid project function/test.json | 9 + test cases/failing/130 invalid ast/meson.build | 3 - test cases/failing/130 invalid ast/test.json | 9 - .../131 invalid project function/meson.build | 1 - .../failing/131 invalid project function/test.json | 9 - test cases/failing/53 or on new line/meson.build | 7 + .../failing/53 or on new line/meson_options.txt | 1 + test cases/failing/53 or on new line/test.json | 7 + .../failing/54 link with executable/meson.build | 4 + .../failing/54 link with executable/module.c | 4 + test cases/failing/54 link with executable/prog.c | 5 + .../failing/54 link with executable/test.json | 7 + .../55 assign custom target index/meson.build | 24 ++ .../55 assign custom target index/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 - test cases/failing/56 getoption prefix/meson.build | 5 + .../subprojects/abc/meson.build | 1 + .../subprojects/abc/meson_options.txt | 1 + test cases/failing/56 getoption prefix/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 - .../57 assign custom target index/meson.build | 24 -- .../57 assign custom target index/test.json | 7 - .../failing/57 bad option argument/meson.build | 3 + .../57 bad option argument/meson_options.txt | 1 + .../failing/57 bad option argument/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 - test cases/failing/58 subproj filegrab/meson.build | 5 + test cases/failing/58 subproj filegrab/prog.c | 1 + .../58 subproj filegrab/subprojects/a/meson.build | 3 + test cases/failing/58 subproj filegrab/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 grab subproj/meson.build | 7 + .../59 grab subproj/subprojects/foo/meson.build | 3 + .../failing/59 grab subproj/subprojects/foo/sub.c | 6 + test cases/failing/59 grab subproj/test.json | 7 + test cases/failing/60 grab sibling/meson.build | 3 + .../60 grab sibling/subprojects/a/meson.build | 3 + .../60 grab sibling/subprojects/b/meson.build | 3 + .../failing/60 grab sibling/subprojects/b/sneaky.c | 6 + test cases/failing/60 grab sibling/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 - .../failing/61 string as link target/meson.build | 2 + test cases/failing/61 string as link target/prog.c | 1 + .../failing/61 string as link target/test.json | 7 + .../meson.build | 2 + .../62 dependency not-found and required/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 - .../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 - .../failing/63 subproj different versions/main.c | 9 + .../63 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 + .../63 subproj different versions/test.json | 7 + .../meson.build | 2 - .../64 dependency not-found and required/test.json | 7 - .../failing/64 wrong boost module/meson.build | 9 + test cases/failing/64 wrong boost module/test.json | 7 + .../65 install_data rename bad size/file1.txt | 0 .../65 install_data rename bad size/file2.txt | 0 .../65 install_data rename bad size/meson.build | 3 + .../65 install_data rename bad size/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 - test cases/failing/66 skip only subdir/meson.build | 8 + .../failing/66 skip only subdir/subdir/meson.build | 3 + test cases/failing/66 skip only subdir/test.json | 7 + .../failing/66 wrong boost module/meson.build | 9 - test cases/failing/66 wrong boost module/test.json | 7 - test cases/failing/67 dual override/meson.build | 5 + test cases/failing/67 dual override/overrides.py | 4 + test cases/failing/67 dual override/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 - test cases/failing/68 override used/meson.build | 5 + test cases/failing/68 override used/other.py | 3 + test cases/failing/68 override used/something.py | 3 + test cases/failing/68 override used/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 - .../69 run_command unclean exit/meson.build | 4 + .../69 run_command unclean exit/returncode.py | 4 + .../failing/69 run_command unclean exit/test.json | 8 + .../70 int literal leading zero/meson.build | 5 + .../failing/70 int literal leading zero/test.json | 8 + 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 - .../failing/71 configuration immutable/input | 0 .../failing/71 configuration immutable/meson.build | 12 + .../failing/71 configuration immutable/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 link with shared module on osx/meson.build | 8 + .../72 link with shared module on osx/module.c | 3 + .../72 link with shared module on osx/prog.c | 4 + .../72 link with shared module on osx/test.json | 7 + .../failing/73 configuration immutable/input | 0 .../failing/73 configuration immutable/meson.build | 12 - .../failing/73 configuration immutable/test.json | 7 - .../config9.h.in | 1 + .../meson.build | 10 + .../test.json | 8 + .../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 - .../meson.build | 2 + .../test.json | 7 + .../config9.h.in | 1 - .../meson.build | 10 - .../test.json | 8 - test cases/failing/75 unfound run/meson.build | 4 + test cases/failing/75 unfound run/test.json | 7 + .../meson.build | 8 + .../76 framework dependency with version/test.json | 7 + .../meson.build | 2 - .../test.json | 7 - test cases/failing/77 override exe config/foo.c | 3 + .../failing/77 override exe config/meson.build | 6 + .../failing/77 override exe config/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 - .../78 gl dependency with version/meson.build | 9 + .../78 gl 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 - .../79 threads dependency with version/meson.build | 3 + .../79 threads dependency with version/test.json | 7 + .../80 gl dependency with version/meson.build | 9 - .../80 gl dependency with version/test.json | 7 - .../80 gtest dependency with version/meson.build | 8 + .../80 gtest dependency with version/test.json | 7 + test cases/failing/81 dub library/meson.build | 11 + test cases/failing/81 dub library/test.json | 7 + .../81 threads dependency with version/meson.build | 3 - .../81 threads dependency with version/test.json | 7 - test cases/failing/82 dub executable/meson.build | 11 + test cases/failing/82 dub executable/test.json | 7 + .../82 gtest dependency with version/meson.build | 8 - .../82 gtest dependency with version/test.json | 7 - test cases/failing/83 dub compiler/meson.build | 17 ++ test cases/failing/83 dub compiler/test.json | 19 ++ test cases/failing/83 dub library/meson.build | 11 - test cases/failing/83 dub library/test.json | 7 - test cases/failing/84 dub executable/meson.build | 11 - test cases/failing/84 dub executable/test.json | 7 - .../failing/84 subproj not-found dep/meson.build | 2 + .../subprojects/somesubproj/meson.build | 3 + .../failing/84 subproj not-found dep/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 invalid configure file/input | 0 .../failing/85 invalid configure file/meson.build | 9 + .../failing/85 invalid configure file/test.json | 7 + test cases/failing/86 kwarg dupe/meson.build | 6 + test cases/failing/86 kwarg dupe/prog.c | 6 + test cases/failing/86 kwarg dupe/test.json | 7 + .../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 - test cases/failing/87 missing pch file/meson.build | 3 + test cases/failing/87 missing pch file/prog.c | 3 + test cases/failing/87 missing pch file/test.json | 8 + 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 - .../88 pch source different folder/include/pch.h | 0 .../88 pch source different folder/meson.build | 5 + .../failing/88 pch source different folder/prog.c | 1 + .../88 pch source different folder/src/pch.c | 0 .../88 pch source different folder/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 - .../failing/89 unknown config tool/meson.build | 2 + .../failing/89 unknown config tool/test.json | 7 + .../90 custom target install data/Info.plist.cpp | 1 + .../90 custom target install data/meson.build | 11 + .../90 custom target install data/preproc.py | 13 ++ .../90 custom target install data/test.json | 7 + .../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 - .../failing/91 add dict non string key/meson.build | 9 + .../failing/91 add dict non string key/test.json | 7 + .../failing/91 unknown config tool/meson.build | 2 - .../failing/91 unknown config tool/test.json | 7 - .../failing/92 add dict duplicate keys/meson.build | 9 + .../failing/92 add dict duplicate keys/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/93 add dict non string key/meson.build | 9 - .../failing/93 add dict non string key/test.json | 7 - .../93 no host get_external_property/meson.build | 3 + .../93 no host get_external_property/test.json | 7 + .../failing/94 add dict duplicate keys/meson.build | 9 - .../failing/94 add dict duplicate keys/test.json | 7 - test cases/failing/94 no native compiler/main.c | 3 + .../failing/94 no native compiler/meson.build | 12 + test cases/failing/94 no native compiler/test.json | 7 + .../95 no host get_external_property/meson.build | 3 - .../95 no host get_external_property/test.json | 7 - .../failing/95 subdir parse error/meson.build | 2 + .../95 subdir parse error/subdir/meson.build | 1 + test cases/failing/95 subdir parse error/test.json | 7 + .../failing/96 invalid option file/meson.build | 1 + .../96 invalid option file/meson_options.txt | 1 + .../failing/96 invalid option file/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 lang/main.c | 3 + test cases/failing/97 no lang/meson.build | 2 + test cases/failing/97 no lang/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 - .../98 no glib-compile-resources/meson.build | 8 + .../failing/98 no glib-compile-resources/test.json | 7 + .../trivial.gresource.xml | 3 + 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/failing/99 number in combo/meson.build | 1 + .../failing/99 number in combo/nativefile.ini | 2 + test cases/failing/99 number in combo/test.json | 5 + test cases/unit/100 custom target name/file.txt.in | 0 test cases/unit/100 custom target name/meson.build | 14 -- .../unit/100 custom target name/subdir/meson.build | 9 - test cases/unit/100 relative find program/foo.py | 3 + .../unit/100 relative find program/meson.build | 3 + .../100 relative find program/subdir/meson.build | 2 + test cases/unit/101 relative find program/foo.py | 3 - .../unit/101 relative find program/meson.build | 3 - .../101 relative find program/subdir/meson.build | 2 - test cases/unit/101 rlib linkage/lib2.rs | 5 + test cases/unit/101 rlib linkage/main.rs | 5 + test cases/unit/101 rlib linkage/meson.build | 22 ++ .../unit/102 python without pkgconfig/meson.build | 4 + test cases/unit/102 rlib linkage/lib2.rs | 5 - test cases/unit/102 rlib linkage/main.rs | 5 - test cases/unit/102 rlib linkage/meson.build | 22 -- .../unit/103 python without pkgconfig/meson.build | 4 - test cases/unit/103 strip/lib.c | 3 + test cases/unit/103 strip/meson.build | 3 + test cases/unit/104 debug function/meson.build | 4 + test cases/unit/104 strip/lib.c | 3 - test cases/unit/104 strip/meson.build | 3 - test cases/unit/105 debug function/meson.build | 4 - .../meson.build | 15 ++ .../meson.build | 15 -- .../110 replace unencodable xml chars/meson.build | 4 - .../110 replace unencodable xml chars/script.py | 37 ---- .../unit/111 classpath/com/mesonbuild/Simple.java | 7 - test cases/unit/111 classpath/meson.build | 14 -- .../111 replace unencodable xml chars/meson.build | 4 + .../111 replace unencodable xml chars/script.py | 37 ++++ .../unit/112 classpath/com/mesonbuild/Simple.java | 7 + test cases/unit/112 classpath/meson.build | 14 ++ test cases/unit/112 list build options/meson.build | 6 - .../unit/112 list build options/meson_options.txt | 1 - test cases/unit/113 complex link cases/main.c | 6 - test cases/unit/113 complex link cases/meson.build | 111 ---------- test cases/unit/113 complex link cases/s1.c | 3 - test cases/unit/113 complex link cases/s2.c | 5 - test cases/unit/113 complex link cases/s3.c | 5 - test cases/unit/113 list build options/meson.build | 6 + .../unit/113 list build options/meson_options.txt | 1 + test cases/unit/114 c cpp stds/meson.build | 6 - test cases/unit/114 complex link cases/main.c | 6 + test cases/unit/114 complex link cases/meson.build | 111 ++++++++++ test cases/unit/114 complex link cases/s1.c | 3 + test cases/unit/114 complex link cases/s2.c | 5 + test cases/unit/114 complex link cases/s3.c | 5 + .../unit/114 empty project/expected_mods.json | 242 --------------------- test cases/unit/114 empty project/meson.build | 1 - test cases/unit/115 c cpp stds/meson.build | 6 + test cases/unit/115 genvslite/main.cpp | 10 - test cases/unit/115 genvslite/meson.build | 5 - .../unit/116 empty project/expected_mods.json | 242 +++++++++++++++++++++ test cases/unit/116 empty project/meson.build | 1 + .../cache_dir/bar/meson.build | 1 - .../116 meson package cache dir/cache_dir/foo.zip | Bin 373 -> 0 bytes .../unit/116 meson package cache dir/meson.build | 4 - .../subprojects/bar.wrap | 3 - .../subprojects/foo.wrap | 5 - test cases/unit/117 genvslite/main.cpp | 10 + test cases/unit/117 genvslite/meson.build | 5 + test cases/unit/117 openssl cmake bug/meson.build | 5 - .../unit/117 openssl cmake bug/nativefile.ini | 7 - .../cache_dir/bar/meson.build | 1 + .../118 meson package cache dir/cache_dir/foo.zip | Bin 0 -> 373 bytes .../unit/118 meson package cache dir/meson.build | 4 + .../subprojects/bar.wrap | 3 + .../subprojects/foo.wrap | 5 + test cases/unit/118 rewrite/meson.build | 189 ---------------- test cases/unit/119 executable suffix/main.c | 1 - test cases/unit/119 executable suffix/meson.build | 3 - test cases/unit/119 openssl cmake bug/meson.build | 5 + .../unit/119 openssl cmake bug/nativefile.ini | 7 + test cases/unit/120 rewrite/meson.build | 189 ++++++++++++++++ test cases/unit/121 executable suffix/main.c | 1 + test cases/unit/121 executable suffix/meson.build | 3 + test cases/unit/91 install skip subprojects/foo.c | 4 + .../unit/91 install skip subprojects/foo.dat | 1 + test cases/unit/91 install skip subprojects/foo.h | 1 + .../unit/91 install skip subprojects/foo/foofile | 0 .../unit/91 install skip subprojects/meson.build | 8 + .../subprojects/bar/bar.c | 4 + .../subprojects/bar/bar.dat | 1 + .../subprojects/bar/bar.h | 1 + .../subprojects/bar/bar/barfile | 1 + .../subprojects/bar/meson.build | 6 + test cases/unit/92 install skip subprojects/foo.c | 4 - .../unit/92 install skip subprojects/foo.dat | 1 - test cases/unit/92 install skip subprojects/foo.h | 1 - .../unit/92 install skip subprojects/foo/foofile | 0 .../unit/92 install skip subprojects/meson.build | 8 - .../subprojects/bar/bar.c | 4 - .../subprojects/bar/bar.dat | 1 - .../subprojects/bar/bar.h | 1 - .../subprojects/bar/bar/barfile | 1 - .../subprojects/bar/meson.build | 6 - .../meson.build | 7 + .../meson_options.txt | 3 + .../subprojects/sub/foo.c | 6 + .../subprojects/sub/meson.build | 7 + test cases/unit/93 clangformat/.clang-format | 4 + .../unit/93 clangformat/.clang-format-ignore | 3 + .../unit/93 clangformat/.clang-format-include | 3 + test cases/unit/93 clangformat/meson.build | 1 + .../unit/93 clangformat/not-included/badformat.cpp | 2 + test cases/unit/93 clangformat/src/badformat.c | 2 + test cases/unit/93 clangformat/src/badformat.cpp | 2 + .../meson.build | 7 - .../meson_options.txt | 3 - .../subprojects/sub/foo.c | 6 - .../subprojects/sub/meson.build | 7 - test cases/unit/94 clangformat/.clang-format | 4 - .../unit/94 clangformat/.clang-format-ignore | 3 - .../unit/94 clangformat/.clang-format-include | 3 - test cases/unit/94 clangformat/meson.build | 1 - .../unit/94 clangformat/not-included/badformat.cpp | 2 - test cases/unit/94 clangformat/src/badformat.c | 2 - test cases/unit/94 clangformat/src/badformat.cpp | 2 - test cases/unit/94 custominc/easytogrepfor/genh.py | 7 + .../unit/94 custominc/easytogrepfor/meson.build | 3 + test cases/unit/94 custominc/helper.c | 5 + test cases/unit/94 custominc/meson.build | 9 + test cases/unit/94 custominc/prog.c | 9 + test cases/unit/94 custominc/prog2.c | 10 + test cases/unit/95 custominc/easytogrepfor/genh.py | 7 - .../unit/95 custominc/easytogrepfor/meson.build | 3 - test cases/unit/95 custominc/helper.c | 5 - test cases/unit/95 custominc/meson.build | 9 - test cases/unit/95 custominc/prog.c | 9 - test cases/unit/95 custominc/prog2.c | 10 - .../unit/95 implicit force fallback/meson.build | 8 + .../subprojects/something/meson.build | 3 + .../unit/96 compiler.links file arg/meson.build | 11 + test cases/unit/96 compiler.links file arg/test.c | 1 + .../unit/96 implicit force fallback/meson.build | 8 - .../subprojects/something/meson.build | 3 - .../unit/97 compiler.links file arg/meson.build | 11 - test cases/unit/97 compiler.links file arg/test.c | 1 - test cases/unit/97 link full name/.gitignore | 5 + .../97 link full name/libtestprovider/meson.build | 20 ++ .../97 link full name/libtestprovider/provider.c | 12 + .../unit/97 link full name/proguser/meson.build | 11 + .../unit/97 link full name/proguser/receiver.c | 18 ++ .../unit/98 install all targets/bar-custom.txt | 0 test cases/unit/98 install all targets/bar-devel.h | 0 .../unit/98 install all targets/bar-notag.txt | 0 .../98 install all targets/custom_files/data.txt | 1 + .../98 install all targets/excludes/excluded.txt | 1 + .../excludes/excluded/placeholder.txt | 1 + .../98 install all targets/excludes/installed.txt | 1 + test cases/unit/98 install all targets/foo.in | 0 .../unit/98 install all targets/foo1-devel.h | 0 test cases/unit/98 install all targets/lib.c | 9 + test cases/unit/98 install all targets/main.c | 3 + test cases/unit/98 install all targets/meson.build | 116 ++++++++++ test cases/unit/98 install all targets/script.py | 7 + .../98 install all targets/subdir/bar2-devel.h | 0 .../unit/98 install all targets/subdir/foo2.in | 0 .../98 install all targets/subdir/foo3-devel.h | 0 .../unit/98 install all targets/subdir/lib.c | 9 + .../unit/98 install all targets/subdir/main.c | 3 + .../unit/98 install all targets/subdir/meson.build | 21 ++ .../unit/98 install all targets/subdir/script.py | 7 + .../subprojects/subproject/aaa.txt | 1 + .../subprojects/subproject/bbb.txt | 1 + .../subprojects/subproject/meson.build | 5 + test cases/unit/98 link full name/.gitignore | 5 - .../98 link full name/libtestprovider/meson.build | 20 -- .../98 link full name/libtestprovider/provider.c | 12 - .../unit/98 link full name/proguser/meson.build | 11 - .../unit/98 link full name/proguser/receiver.c | 18 -- test cases/unit/99 custom target name/file.txt.in | 0 test cases/unit/99 custom target name/meson.build | 14 ++ .../unit/99 custom target name/subdir/meson.build | 9 + .../unit/99 install all targets/bar-custom.txt | 0 test cases/unit/99 install all targets/bar-devel.h | 0 .../unit/99 install all targets/bar-notag.txt | 0 .../99 install all targets/custom_files/data.txt | 1 - .../99 install all targets/excludes/excluded.txt | 1 - .../excludes/excluded/placeholder.txt | 1 - .../99 install all targets/excludes/installed.txt | 1 - test cases/unit/99 install all targets/foo.in | 0 .../unit/99 install all targets/foo1-devel.h | 0 test cases/unit/99 install all targets/lib.c | 9 - test cases/unit/99 install all targets/main.c | 3 - test cases/unit/99 install all targets/meson.build | 116 ---------- test cases/unit/99 install all targets/script.py | 7 - .../99 install all targets/subdir/bar2-devel.h | 0 .../unit/99 install all targets/subdir/foo2.in | 0 .../99 install all targets/subdir/foo3-devel.h | 0 .../unit/99 install all targets/subdir/lib.c | 9 - .../unit/99 install all targets/subdir/main.c | 3 - .../unit/99 install all targets/subdir/meson.build | 21 -- .../unit/99 install all targets/subdir/script.py | 7 - .../subprojects/subproject/aaa.txt | 1 - .../subprojects/subproject/bbb.txt | 1 - .../subprojects/subproject/meson.build | 5 - unittests/allplatformstests.py | 36 +-- unittests/linuxliketests.py | 8 +- unittests/machinefiletests.py | 2 +- unittests/platformagnostictests.py | 12 +- unittests/rewritetests.py | 2 +- unittests/windowstests.py | 2 +- 773 files changed, 2963 insertions(+), 2963 deletions(-) delete mode 100644 test cases/cmake/26 dependency fallback/main.cpp delete mode 100644 test cases/cmake/26 dependency fallback/meson.build delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/broken_method.wrap delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/cmMod.wrap delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/cmMod/CMakeLists.txt delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.cpp delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.hpp delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/cmMod/cpp_pch.hpp delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/cmake_subp/CMakeLists.txt delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/force_cmake.wrap delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/force_cmake/CMakeLists.txt delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/force_cmake/meson.build delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/meson_method.wrap delete mode 100644 test cases/cmake/26 dependency fallback/subprojects/meson_subp/meson.build create mode 100644 test cases/cmake/27 dependency fallback/main.cpp create mode 100644 test cases/cmake/27 dependency fallback/meson.build create mode 100644 test cases/cmake/27 dependency fallback/subprojects/broken_method.wrap create mode 100644 test cases/cmake/27 dependency fallback/subprojects/cmMod.wrap create mode 100644 test cases/cmake/27 dependency fallback/subprojects/cmMod/CMakeLists.txt create mode 100644 test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.cpp create mode 100644 test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.hpp create mode 100644 test cases/cmake/27 dependency fallback/subprojects/cmMod/cpp_pch.hpp create mode 100644 test cases/cmake/27 dependency fallback/subprojects/cmake_subp/CMakeLists.txt create mode 100644 test cases/cmake/27 dependency fallback/subprojects/force_cmake.wrap create mode 100644 test cases/cmake/27 dependency fallback/subprojects/force_cmake/CMakeLists.txt create mode 100644 test cases/cmake/27 dependency fallback/subprojects/force_cmake/meson.build create mode 100644 test cases/cmake/27 dependency fallback/subprojects/meson_method.wrap create mode 100644 test cases/cmake/27 dependency fallback/subprojects/meson_subp/meson.build delete mode 100644 test cases/common/262 internal dependency includes in checks/include/test_262_header.h delete mode 100644 test cases/common/262 internal dependency includes in checks/meson.build delete mode 100644 test cases/common/262 required keyword in has functions/meson.build delete mode 100644 test cases/common/262 required keyword in has functions/meson_options.txt delete mode 100644 test cases/common/263 default_options dict/lib.c delete mode 100644 test cases/common/263 default_options dict/meson.build delete mode 100644 test cases/common/263 default_options dict/meson_options.txt create mode 100644 test cases/common/263 internal dependency includes in checks/include/test_262_header.h create mode 100644 test cases/common/263 internal dependency includes in checks/meson.build delete mode 100644 test cases/common/264 format string/meson.build delete mode 100644 test cases/common/264 format string/meson_options.txt delete mode 100644 test cases/common/264 format string/test.json create mode 100644 test cases/common/264 required keyword in has functions/meson.build create mode 100644 test cases/common/264 required keyword in has functions/meson_options.txt create mode 100644 test cases/common/265 default_options dict/lib.c create mode 100644 test cases/common/265 default_options dict/meson.build create mode 100644 test cases/common/265 default_options dict/meson_options.txt delete mode 100644 test cases/common/265 default_options in find_program/meson.build delete mode 100644 test cases/common/265 default_options in find_program/subprojects/dummy.wrap delete mode 100644 test cases/common/265 default_options in find_program/subprojects/dummy/dummy.c delete mode 100644 test cases/common/265 default_options in find_program/subprojects/dummy/meson.build delete mode 100644 test cases/common/265 default_options in find_program/subprojects/dummy/meson_options.txt create mode 100644 test cases/common/266 format string/meson.build create mode 100644 test cases/common/266 format string/meson_options.txt create mode 100644 test cases/common/266 format string/test.json delete mode 100644 test cases/common/266 install functions and follow_symlinks/foo/file1 delete mode 120000 test cases/common/266 install functions and follow_symlinks/foo/link1 delete mode 120000 test cases/common/266 install functions and follow_symlinks/foo/link2.h delete mode 100644 test cases/common/266 install functions and follow_symlinks/meson.build delete mode 100644 test cases/common/266 install functions and follow_symlinks/test.json create mode 100644 test cases/common/267 default_options in find_program/meson.build create mode 100644 test cases/common/267 default_options in find_program/subprojects/dummy.wrap create mode 100644 test cases/common/267 default_options in find_program/subprojects/dummy/dummy.c create mode 100644 test cases/common/267 default_options in find_program/subprojects/dummy/meson.build create mode 100644 test cases/common/267 default_options in find_program/subprojects/dummy/meson_options.txt create mode 100644 test cases/common/268 install functions and follow_symlinks/foo/file1 create mode 120000 test cases/common/268 install functions and follow_symlinks/foo/link1 create mode 120000 test cases/common/268 install functions and follow_symlinks/foo/link2.h create mode 100644 test cases/common/268 install functions and follow_symlinks/meson.build create mode 100644 test cases/common/268 install functions and follow_symlinks/test.json create mode 100644 test cases/common/271 env in generator.process/generate_main.py create mode 100644 test cases/common/271 env in generator.process/main.template create mode 100644 test cases/common/271 env in generator.process/meson.build delete mode 100644 test cases/common/272 env in generator.process/generate_main.py delete mode 100644 test cases/common/272 env in generator.process/main.template delete mode 100644 test cases/common/272 env in generator.process/meson.build create mode 100644 test cases/failing/100 bool in combo/meson.build create mode 100644 test cases/failing/100 bool in combo/meson_options.txt create mode 100644 test cases/failing/100 bool in combo/nativefile.ini create mode 100644 test cases/failing/100 bool in combo/test.json delete mode 100644 test cases/failing/100 no glib-compile-resources/meson.build delete mode 100644 test cases/failing/100 no glib-compile-resources/test.json delete mode 100644 test cases/failing/100 no glib-compile-resources/trivial.gresource.xml create mode 100644 test cases/failing/101 compiler no lang/meson.build create mode 100644 test cases/failing/101 compiler no lang/test.json delete mode 100644 test cases/failing/101 number in combo/meson.build delete mode 100644 test cases/failing/101 number in combo/nativefile.ini delete mode 100644 test cases/failing/101 number in combo/test.json delete mode 100644 test cases/failing/102 bool in combo/meson.build delete mode 100644 test cases/failing/102 bool in combo/meson_options.txt delete mode 100644 test cases/failing/102 bool in combo/nativefile.ini delete mode 100644 test cases/failing/102 bool in combo/test.json create mode 100644 test cases/failing/102 no fallback/meson.build create mode 100644 test cases/failing/102 no fallback/subprojects/foob/meson.build create mode 100644 test cases/failing/102 no fallback/test.json delete mode 100644 test cases/failing/103 compiler no lang/meson.build delete mode 100644 test cases/failing/103 compiler no lang/test.json create mode 100644 test cases/failing/103 feature require/meson.build create mode 100644 test cases/failing/103 feature require/meson_options.txt create mode 100644 test cases/failing/103 feature require/test.json create mode 100644 test cases/failing/104 feature require.bis/meson.build create mode 100644 test cases/failing/104 feature require.bis/meson_options.txt create mode 100644 test cases/failing/104 feature require.bis/test.json delete mode 100644 test cases/failing/104 no fallback/meson.build delete mode 100644 test cases/failing/104 no fallback/subprojects/foob/meson.build delete mode 100644 test cases/failing/104 no fallback/test.json delete mode 100644 test cases/failing/105 feature require/meson.build delete mode 100644 test cases/failing/105 feature require/meson_options.txt delete mode 100644 test cases/failing/105 feature require/test.json create mode 100644 test cases/failing/105 no build get_external_property/meson.build create mode 100644 test cases/failing/105 no build get_external_property/test.json create mode 100644 test cases/failing/106 enter subdir twice/meson.build create mode 100644 test cases/failing/106 enter subdir twice/sub/meson.build create mode 100644 test cases/failing/106 enter subdir twice/test.json delete mode 100644 test cases/failing/106 feature require.bis/meson.build delete mode 100644 test cases/failing/106 feature require.bis/meson_options.txt delete mode 100644 test cases/failing/106 feature require.bis/test.json create mode 100644 test cases/failing/107 invalid fstring/109 invalid fstring/meson.build create mode 100644 test cases/failing/107 invalid fstring/109 invalid fstring/test.json create mode 100644 test cases/failing/107 invalid fstring/meson.build create mode 100644 test cases/failing/107 invalid fstring/test.json delete mode 100644 test cases/failing/107 no build get_external_property/meson.build delete mode 100644 test cases/failing/107 no build get_external_property/test.json create mode 100644 test cases/failing/108 compiler argument checking/meson.build create mode 100644 test cases/failing/108 compiler argument checking/test.json delete mode 100644 test cases/failing/108 enter subdir twice/meson.build delete mode 100644 test cases/failing/108 enter subdir twice/sub/meson.build delete mode 100644 test cases/failing/108 enter subdir twice/test.json create mode 100644 test cases/failing/109 empty fallback/meson.build create mode 100644 test cases/failing/109 empty fallback/subprojects/foo/meson.build create mode 100644 test cases/failing/109 empty fallback/test.json delete mode 100644 test cases/failing/109 invalid fstring/109 invalid fstring/meson.build delete mode 100644 test cases/failing/109 invalid fstring/109 invalid fstring/test.json delete mode 100644 test cases/failing/109 invalid fstring/meson.build delete mode 100644 test cases/failing/109 invalid fstring/test.json create mode 100644 test cases/failing/110 cmake executable dependency/meson.build create mode 100644 test cases/failing/110 cmake executable dependency/subprojects/cmlib/CMakeLists.txt create mode 100644 test cases/failing/110 cmake executable dependency/subprojects/cmlib/main.c create mode 100644 test cases/failing/110 cmake executable dependency/test.json delete mode 100644 test cases/failing/110 compiler argument checking/meson.build delete mode 100644 test cases/failing/110 compiler argument checking/test.json create mode 100644 test cases/failing/111 allow_fallback with fallback/meson.build create mode 100644 test cases/failing/111 allow_fallback with fallback/test.json delete mode 100644 test cases/failing/111 empty fallback/meson.build delete mode 100644 test cases/failing/111 empty fallback/subprojects/foo/meson.build delete mode 100644 test cases/failing/111 empty fallback/test.json delete mode 100644 test cases/failing/112 cmake executable dependency/meson.build delete mode 100644 test cases/failing/112 cmake executable dependency/subprojects/cmlib/CMakeLists.txt delete mode 100644 test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c delete mode 100644 test cases/failing/112 cmake executable dependency/test.json create mode 100644 test cases/failing/112 nonsensical bindgen/meson.build create mode 100644 test cases/failing/112 nonsensical bindgen/src/header.h create mode 100644 test cases/failing/112 nonsensical bindgen/src/source.c create mode 100644 test cases/failing/112 nonsensical bindgen/test.json delete mode 100644 test cases/failing/113 allow_fallback with fallback/meson.build delete mode 100644 test cases/failing/113 allow_fallback with fallback/test.json create mode 100644 test cases/failing/113 run_target in test/meson.build create mode 100644 test cases/failing/113 run_target in test/test.json create mode 100644 test cases/failing/113 run_target in test/trivial.c delete mode 100644 test cases/failing/114 nonsensical bindgen/meson.build delete mode 100644 test cases/failing/114 nonsensical bindgen/src/header.h delete mode 100644 test cases/failing/114 nonsensical bindgen/src/source.c delete mode 100644 test cases/failing/114 nonsensical bindgen/test.json create mode 100644 test cases/failing/114 run_target in add_install_script/meson.build create mode 100644 test cases/failing/114 run_target in add_install_script/test.json create mode 100644 test cases/failing/114 run_target in add_install_script/trivial.c create mode 100644 test cases/failing/115 pathsep in install_symlink/meson.build create mode 100644 test cases/failing/115 pathsep in install_symlink/test.json delete mode 100644 test cases/failing/115 run_target in test/meson.build delete mode 100644 test cases/failing/115 run_target in test/test.json delete mode 100644 test cases/failing/115 run_target in test/trivial.c delete mode 100644 test cases/failing/116 run_target in add_install_script/meson.build delete mode 100644 test cases/failing/116 run_target in add_install_script/test.json delete mode 100644 test cases/failing/116 run_target in add_install_script/trivial.c create mode 100644 test cases/failing/116 subproject version conflict/meson.build create mode 100644 test cases/failing/116 subproject version conflict/subprojects/A/meson.build create mode 100644 test cases/failing/116 subproject version conflict/subprojects/B/meson.build create mode 100644 test cases/failing/116 subproject version conflict/test.json delete mode 100644 test cases/failing/117 pathsep in install_symlink/meson.build delete mode 100644 test cases/failing/117 pathsep in install_symlink/test.json create mode 100644 test cases/failing/117 structured source empty string/main.rs create mode 100644 test cases/failing/117 structured source empty string/meson.build create mode 100644 test cases/failing/117 structured source empty string/test.json create mode 100644 test cases/failing/118 structured_sources conflicts/main.rs create mode 100644 test cases/failing/118 structured_sources conflicts/meson.build create mode 100644 test cases/failing/118 structured_sources conflicts/test.json delete mode 100644 test cases/failing/118 subproject version conflict/meson.build delete mode 100644 test cases/failing/118 subproject version conflict/subprojects/A/meson.build delete mode 100644 test cases/failing/118 subproject version conflict/subprojects/B/meson.build delete mode 100644 test cases/failing/118 subproject version conflict/test.json create mode 100644 test cases/failing/119 missing compiler/meson.build create mode 100644 test cases/failing/119 missing compiler/subprojects/sub/main.c create mode 100644 test cases/failing/119 missing compiler/subprojects/sub/meson.build create mode 100644 test cases/failing/119 missing compiler/test.json delete mode 100644 test cases/failing/119 structured source empty string/main.rs delete mode 100644 test cases/failing/119 structured source empty string/meson.build delete mode 100644 test cases/failing/119 structured source empty string/test.json create mode 100644 test cases/failing/120 cmake subproject error/meson.build create mode 100644 test cases/failing/120 cmake subproject error/subprojects/cmlib/CMakeLists.txt create mode 100644 test cases/failing/120 cmake subproject error/test.json delete mode 100644 test cases/failing/120 structured_sources conflicts/main.rs delete mode 100644 test cases/failing/120 structured_sources conflicts/meson.build delete mode 100644 test cases/failing/120 structured_sources conflicts/test.json delete mode 100644 test cases/failing/121 missing compiler/meson.build delete mode 100644 test cases/failing/121 missing compiler/subprojects/sub/main.c delete mode 100644 test cases/failing/121 missing compiler/subprojects/sub/meson.build delete mode 100644 test cases/failing/121 missing compiler/test.json create mode 100644 test cases/failing/121 pkgconfig not relocatable outside prefix/meson.build create mode 100644 test cases/failing/121 pkgconfig not relocatable outside prefix/test.json delete mode 100644 test cases/failing/122 cmake subproject error/meson.build delete mode 100644 test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt delete mode 100644 test cases/failing/122 cmake subproject error/test.json create mode 100644 test cases/failing/122 subproject sandbox violation/meson.build create mode 100644 test cases/failing/122 subproject sandbox violation/meson_options.txt create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj1/file.txt create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj1/meson.build create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj1/nested/meson.build create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj2/file.txt create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj2/meson.build create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj2/nested/meson.build create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj3/file.txt create mode 100644 test cases/failing/122 subproject sandbox violation/subprojects/subproj3/meson.build create mode 100644 test cases/failing/122 subproject sandbox violation/test.json create mode 100644 test cases/failing/123 override and add_project_dependency/inc/lib.h create mode 100644 test cases/failing/123 override and add_project_dependency/lib.c create mode 100644 test cases/failing/123 override and add_project_dependency/meson.build create mode 100644 test cases/failing/123 override and add_project_dependency/subprojects/a/meson.build create mode 100644 test cases/failing/123 override and add_project_dependency/subprojects/a/prog.c create mode 100644 test cases/failing/123 override and add_project_dependency/test.json delete mode 100644 test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build delete mode 100644 test cases/failing/123 pkgconfig not relocatable outside prefix/test.json delete mode 100644 test cases/failing/124 subproject sandbox violation/meson.build delete mode 100644 test cases/failing/124 subproject sandbox violation/meson_options.txt delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt delete mode 100644 test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build delete mode 100644 test cases/failing/124 subproject sandbox violation/test.json create mode 100644 test cases/failing/124 targets before add_project_dependency/inc/lib.h create mode 100644 test cases/failing/124 targets before add_project_dependency/lib.c create mode 100644 test cases/failing/124 targets before add_project_dependency/meson.build create mode 100644 test cases/failing/124 targets before add_project_dependency/test.json create mode 100644 test cases/failing/125 extract from unity/meson.build create mode 100644 test cases/failing/125 extract from unity/src1.c create mode 100644 test cases/failing/125 extract from unity/src2.c create mode 100644 test cases/failing/125 extract from unity/test.json delete mode 100644 test cases/failing/125 override and add_project_dependency/inc/lib.h delete mode 100644 test cases/failing/125 override and add_project_dependency/lib.c delete mode 100644 test cases/failing/125 override and add_project_dependency/meson.build delete mode 100644 test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build delete mode 100644 test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c delete mode 100644 test cases/failing/125 override and add_project_dependency/test.json create mode 100644 test cases/failing/126 subproject object as a dependency/main.c create mode 100644 test cases/failing/126 subproject object as a dependency/meson.build create mode 100644 test cases/failing/126 subproject object as a dependency/subprojects/sub/meson.build create mode 100644 test cases/failing/126 subproject object as a dependency/test.json delete mode 100644 test cases/failing/126 targets before add_project_dependency/inc/lib.h delete mode 100644 test cases/failing/126 targets before add_project_dependency/lib.c delete mode 100644 test cases/failing/126 targets before add_project_dependency/meson.build delete mode 100644 test cases/failing/126 targets before add_project_dependency/test.json delete mode 100644 test cases/failing/127 extract from unity/meson.build delete mode 100644 test cases/failing/127 extract from unity/src1.c delete mode 100644 test cases/failing/127 extract from unity/src2.c delete mode 100644 test cases/failing/127 extract from unity/test.json create mode 100644 test cases/failing/127 generator host binary/exe.c create mode 100644 test cases/failing/127 generator host binary/lib.in create mode 100644 test cases/failing/127 generator host binary/meson.build create mode 100644 test cases/failing/127 generator host binary/test.json create mode 100644 test cases/failing/128 invalid ast/meson.build create mode 100644 test cases/failing/128 invalid ast/test.json delete mode 100644 test cases/failing/128 subproject object as a dependency/main.c delete mode 100644 test cases/failing/128 subproject object as a dependency/meson.build delete mode 100644 test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build delete mode 100644 test cases/failing/128 subproject object as a dependency/test.json delete mode 100644 test cases/failing/129 generator host binary/exe.c delete mode 100644 test cases/failing/129 generator host binary/lib.in delete mode 100644 test cases/failing/129 generator host binary/meson.build delete mode 100644 test cases/failing/129 generator host binary/test.json create mode 100644 test cases/failing/129 invalid project function/meson.build create mode 100644 test cases/failing/129 invalid project function/test.json delete mode 100644 test cases/failing/130 invalid ast/meson.build delete mode 100644 test cases/failing/130 invalid ast/test.json delete mode 100644 test cases/failing/131 invalid project function/meson.build delete mode 100644 test cases/failing/131 invalid project function/test.json create mode 100644 test cases/failing/53 or on new line/meson.build create mode 100644 test cases/failing/53 or on new line/meson_options.txt create mode 100644 test cases/failing/53 or on new line/test.json create mode 100644 test cases/failing/54 link with executable/meson.build create mode 100644 test cases/failing/54 link with executable/module.c create mode 100644 test cases/failing/54 link with executable/prog.c create mode 100644 test cases/failing/54 link with executable/test.json create mode 100644 test cases/failing/55 assign custom target index/meson.build create mode 100644 test cases/failing/55 assign custom target index/test.json delete mode 100644 test cases/failing/55 or on new line/meson.build delete mode 100644 test cases/failing/55 or on new line/meson_options.txt delete mode 100644 test cases/failing/55 or on new line/test.json create mode 100644 test cases/failing/56 getoption prefix/meson.build create mode 100644 test cases/failing/56 getoption prefix/subprojects/abc/meson.build create mode 100644 test cases/failing/56 getoption prefix/subprojects/abc/meson_options.txt create mode 100644 test cases/failing/56 getoption prefix/test.json delete mode 100644 test cases/failing/56 link with executable/meson.build delete mode 100644 test cases/failing/56 link with executable/module.c delete mode 100644 test cases/failing/56 link with executable/prog.c delete mode 100644 test cases/failing/56 link with executable/test.json delete mode 100644 test cases/failing/57 assign custom target index/meson.build delete mode 100644 test cases/failing/57 assign custom target index/test.json create mode 100644 test cases/failing/57 bad option argument/meson.build create mode 100644 test cases/failing/57 bad option argument/meson_options.txt create mode 100644 test cases/failing/57 bad option argument/test.json delete mode 100644 test cases/failing/58 getoption prefix/meson.build delete mode 100644 test cases/failing/58 getoption prefix/subprojects/abc/meson.build delete mode 100644 test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt delete mode 100644 test cases/failing/58 getoption prefix/test.json create mode 100644 test cases/failing/58 subproj filegrab/meson.build create mode 100644 test cases/failing/58 subproj filegrab/prog.c create mode 100644 test cases/failing/58 subproj filegrab/subprojects/a/meson.build create mode 100644 test cases/failing/58 subproj filegrab/test.json delete mode 100644 test cases/failing/59 bad option argument/meson.build delete mode 100644 test cases/failing/59 bad option argument/meson_options.txt delete mode 100644 test cases/failing/59 bad option argument/test.json create mode 100644 test cases/failing/59 grab subproj/meson.build create mode 100644 test cases/failing/59 grab subproj/subprojects/foo/meson.build create mode 100644 test cases/failing/59 grab subproj/subprojects/foo/sub.c create mode 100644 test cases/failing/59 grab subproj/test.json create mode 100644 test cases/failing/60 grab sibling/meson.build create mode 100644 test cases/failing/60 grab sibling/subprojects/a/meson.build create mode 100644 test cases/failing/60 grab sibling/subprojects/b/meson.build create mode 100644 test cases/failing/60 grab sibling/subprojects/b/sneaky.c create mode 100644 test cases/failing/60 grab sibling/test.json delete mode 100644 test cases/failing/60 subproj filegrab/meson.build delete mode 100644 test cases/failing/60 subproj filegrab/prog.c delete mode 100644 test cases/failing/60 subproj filegrab/subprojects/a/meson.build delete mode 100644 test cases/failing/60 subproj filegrab/test.json delete mode 100644 test cases/failing/61 grab subproj/meson.build delete mode 100644 test cases/failing/61 grab subproj/subprojects/foo/meson.build delete mode 100644 test cases/failing/61 grab subproj/subprojects/foo/sub.c delete mode 100644 test cases/failing/61 grab subproj/test.json create mode 100644 test cases/failing/61 string as link target/meson.build create mode 100644 test cases/failing/61 string as link target/prog.c create mode 100644 test cases/failing/61 string as link target/test.json create mode 100644 test cases/failing/62 dependency not-found and required/meson.build create mode 100644 test cases/failing/62 dependency not-found and required/test.json delete mode 100644 test cases/failing/62 grab sibling/meson.build delete mode 100644 test cases/failing/62 grab sibling/subprojects/a/meson.build delete mode 100644 test cases/failing/62 grab sibling/subprojects/b/meson.build delete mode 100644 test cases/failing/62 grab sibling/subprojects/b/sneaky.c delete mode 100644 test cases/failing/62 grab sibling/test.json delete mode 100644 test cases/failing/63 string as link target/meson.build delete mode 100644 test cases/failing/63 string as link target/prog.c delete mode 100644 test cases/failing/63 string as link target/test.json create mode 100644 test cases/failing/63 subproj different versions/main.c create mode 100644 test cases/failing/63 subproj different versions/meson.build create mode 100644 test cases/failing/63 subproj different versions/subprojects/a/a.c create mode 100644 test cases/failing/63 subproj different versions/subprojects/a/a.h create mode 100644 test cases/failing/63 subproj different versions/subprojects/a/meson.build create mode 100644 test cases/failing/63 subproj different versions/subprojects/b/b.c create mode 100644 test cases/failing/63 subproj different versions/subprojects/b/b.h create mode 100644 test cases/failing/63 subproj different versions/subprojects/b/meson.build create mode 100644 test cases/failing/63 subproj different versions/subprojects/c/c.h create mode 100644 test cases/failing/63 subproj different versions/subprojects/c/meson.build create mode 100644 test cases/failing/63 subproj different versions/test.json delete mode 100644 test cases/failing/64 dependency not-found and required/meson.build delete mode 100644 test cases/failing/64 dependency not-found and required/test.json create mode 100644 test cases/failing/64 wrong boost module/meson.build create mode 100644 test cases/failing/64 wrong boost module/test.json create mode 100644 test cases/failing/65 install_data rename bad size/file1.txt create mode 100644 test cases/failing/65 install_data rename bad size/file2.txt create mode 100644 test cases/failing/65 install_data rename bad size/meson.build create mode 100644 test cases/failing/65 install_data rename bad size/test.json delete mode 100644 test cases/failing/65 subproj different versions/main.c delete mode 100644 test cases/failing/65 subproj different versions/meson.build delete mode 100644 test cases/failing/65 subproj different versions/subprojects/a/a.c delete mode 100644 test cases/failing/65 subproj different versions/subprojects/a/a.h delete mode 100644 test cases/failing/65 subproj different versions/subprojects/a/meson.build delete mode 100644 test cases/failing/65 subproj different versions/subprojects/b/b.c delete mode 100644 test cases/failing/65 subproj different versions/subprojects/b/b.h delete mode 100644 test cases/failing/65 subproj different versions/subprojects/b/meson.build delete mode 100644 test cases/failing/65 subproj different versions/subprojects/c/c.h delete mode 100644 test cases/failing/65 subproj different versions/subprojects/c/meson.build delete mode 100644 test cases/failing/65 subproj different versions/test.json create mode 100644 test cases/failing/66 skip only subdir/meson.build create mode 100644 test cases/failing/66 skip only subdir/subdir/meson.build create mode 100644 test cases/failing/66 skip only subdir/test.json delete mode 100644 test cases/failing/66 wrong boost module/meson.build delete mode 100644 test cases/failing/66 wrong boost module/test.json create mode 100644 test cases/failing/67 dual override/meson.build create mode 100644 test cases/failing/67 dual override/overrides.py create mode 100644 test cases/failing/67 dual override/test.json delete mode 100644 test cases/failing/67 install_data rename bad size/file1.txt delete mode 100644 test cases/failing/67 install_data rename bad size/file2.txt delete mode 100644 test cases/failing/67 install_data rename bad size/meson.build delete mode 100644 test cases/failing/67 install_data rename bad size/test.json create mode 100644 test cases/failing/68 override used/meson.build create mode 100755 test cases/failing/68 override used/other.py create mode 100755 test cases/failing/68 override used/something.py create mode 100644 test cases/failing/68 override used/test.json delete mode 100644 test cases/failing/68 skip only subdir/meson.build delete mode 100644 test cases/failing/68 skip only subdir/subdir/meson.build delete mode 100644 test cases/failing/68 skip only subdir/test.json delete mode 100644 test cases/failing/69 dual override/meson.build delete mode 100644 test cases/failing/69 dual override/overrides.py delete mode 100644 test cases/failing/69 dual override/test.json create mode 100644 test cases/failing/69 run_command unclean exit/meson.build create mode 100755 test cases/failing/69 run_command unclean exit/returncode.py create mode 100644 test cases/failing/69 run_command unclean exit/test.json create mode 100644 test cases/failing/70 int literal leading zero/meson.build create mode 100644 test cases/failing/70 int literal leading zero/test.json delete mode 100644 test cases/failing/70 override used/meson.build delete mode 100755 test cases/failing/70 override used/other.py delete mode 100755 test cases/failing/70 override used/something.py delete mode 100644 test cases/failing/70 override used/test.json create mode 100644 test cases/failing/71 configuration immutable/input create mode 100644 test cases/failing/71 configuration immutable/meson.build create mode 100644 test cases/failing/71 configuration immutable/test.json delete mode 100644 test cases/failing/71 run_command unclean exit/meson.build delete mode 100755 test cases/failing/71 run_command unclean exit/returncode.py delete mode 100644 test cases/failing/71 run_command unclean exit/test.json delete mode 100644 test cases/failing/72 int literal leading zero/meson.build delete mode 100644 test cases/failing/72 int literal leading zero/test.json create mode 100644 test cases/failing/72 link with shared module on osx/meson.build create mode 100644 test cases/failing/72 link with shared module on osx/module.c create mode 100644 test cases/failing/72 link with shared module on osx/prog.c create mode 100644 test cases/failing/72 link with shared module on osx/test.json delete mode 100644 test cases/failing/73 configuration immutable/input delete mode 100644 test cases/failing/73 configuration immutable/meson.build delete mode 100644 test cases/failing/73 configuration immutable/test.json create mode 100644 test cases/failing/73 non-ascii in ascii encoded configure file/config9.h.in create mode 100644 test cases/failing/73 non-ascii in ascii encoded configure file/meson.build create mode 100644 test cases/failing/73 non-ascii in ascii encoded configure file/test.json delete mode 100644 test cases/failing/74 link with shared module on osx/meson.build delete mode 100644 test cases/failing/74 link with shared module on osx/module.c delete mode 100644 test cases/failing/74 link with shared module on osx/prog.c delete mode 100644 test cases/failing/74 link with shared module on osx/test.json create mode 100644 test cases/failing/74 subproj dependency not-found and required/meson.build create mode 100644 test cases/failing/74 subproj dependency not-found and required/test.json delete mode 100644 test cases/failing/75 non-ascii in ascii encoded configure file/config9.h.in delete mode 100644 test cases/failing/75 non-ascii in ascii encoded configure file/meson.build delete mode 100644 test cases/failing/75 non-ascii in ascii encoded configure file/test.json create mode 100644 test cases/failing/75 unfound run/meson.build create mode 100644 test cases/failing/75 unfound run/test.json create mode 100644 test cases/failing/76 framework dependency with version/meson.build create mode 100644 test cases/failing/76 framework dependency with version/test.json delete mode 100644 test cases/failing/76 subproj dependency not-found and required/meson.build delete mode 100644 test cases/failing/76 subproj dependency not-found and required/test.json create mode 100644 test cases/failing/77 override exe config/foo.c create mode 100644 test cases/failing/77 override exe config/meson.build create mode 100644 test cases/failing/77 override exe config/test.json delete mode 100644 test cases/failing/77 unfound run/meson.build delete mode 100644 test cases/failing/77 unfound run/test.json delete mode 100644 test cases/failing/78 framework dependency with version/meson.build delete mode 100644 test cases/failing/78 framework dependency with version/test.json create mode 100644 test cases/failing/78 gl dependency with version/meson.build create mode 100644 test cases/failing/78 gl dependency with version/test.json delete mode 100644 test cases/failing/79 override exe config/foo.c delete mode 100644 test cases/failing/79 override exe config/meson.build delete mode 100644 test cases/failing/79 override exe config/test.json create mode 100644 test cases/failing/79 threads dependency with version/meson.build create mode 100644 test cases/failing/79 threads dependency with version/test.json delete mode 100644 test cases/failing/80 gl dependency with version/meson.build delete mode 100644 test cases/failing/80 gl dependency with version/test.json create mode 100644 test cases/failing/80 gtest dependency with version/meson.build create mode 100644 test cases/failing/80 gtest dependency with version/test.json create mode 100644 test cases/failing/81 dub library/meson.build create mode 100644 test cases/failing/81 dub library/test.json delete mode 100644 test cases/failing/81 threads dependency with version/meson.build delete mode 100644 test cases/failing/81 threads dependency with version/test.json create mode 100644 test cases/failing/82 dub executable/meson.build create mode 100644 test cases/failing/82 dub executable/test.json delete mode 100644 test cases/failing/82 gtest dependency with version/meson.build delete mode 100644 test cases/failing/82 gtest dependency with version/test.json create mode 100644 test cases/failing/83 dub compiler/meson.build create mode 100644 test cases/failing/83 dub compiler/test.json delete mode 100644 test cases/failing/83 dub library/meson.build delete mode 100644 test cases/failing/83 dub library/test.json delete mode 100644 test cases/failing/84 dub executable/meson.build delete mode 100644 test cases/failing/84 dub executable/test.json create mode 100644 test cases/failing/84 subproj not-found dep/meson.build create mode 100644 test cases/failing/84 subproj not-found dep/subprojects/somesubproj/meson.build create mode 100644 test cases/failing/84 subproj not-found dep/test.json delete mode 100644 test cases/failing/85 dub compiler/meson.build delete mode 100644 test cases/failing/85 dub compiler/test.json create mode 100644 test cases/failing/85 invalid configure file/input create mode 100644 test cases/failing/85 invalid configure file/meson.build create mode 100644 test cases/failing/85 invalid configure file/test.json create mode 100644 test cases/failing/86 kwarg dupe/meson.build create mode 100644 test cases/failing/86 kwarg dupe/prog.c create mode 100644 test cases/failing/86 kwarg dupe/test.json delete mode 100644 test cases/failing/86 subproj not-found dep/meson.build delete mode 100644 test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build delete mode 100644 test cases/failing/86 subproj not-found dep/test.json delete mode 100644 test cases/failing/87 invalid configure file/input delete mode 100644 test cases/failing/87 invalid configure file/meson.build delete mode 100644 test cases/failing/87 invalid configure file/test.json create mode 100644 test cases/failing/87 missing pch file/meson.build create mode 100644 test cases/failing/87 missing pch file/prog.c create mode 100644 test cases/failing/87 missing pch file/test.json delete mode 100644 test cases/failing/88 kwarg dupe/meson.build delete mode 100644 test cases/failing/88 kwarg dupe/prog.c delete mode 100644 test cases/failing/88 kwarg dupe/test.json create mode 100644 test cases/failing/88 pch source different folder/include/pch.h create mode 100644 test cases/failing/88 pch source different folder/meson.build create mode 100644 test cases/failing/88 pch source different folder/prog.c create mode 100644 test cases/failing/88 pch source different folder/src/pch.c create mode 100644 test cases/failing/88 pch source different folder/test.json delete mode 100644 test cases/failing/89 missing pch file/meson.build delete mode 100644 test cases/failing/89 missing pch file/prog.c delete mode 100644 test cases/failing/89 missing pch file/test.json create mode 100644 test cases/failing/89 unknown config tool/meson.build create mode 100644 test cases/failing/89 unknown config tool/test.json create mode 100644 test cases/failing/90 custom target install data/Info.plist.cpp create mode 100644 test cases/failing/90 custom target install data/meson.build create mode 100644 test cases/failing/90 custom target install data/preproc.py create mode 100644 test cases/failing/90 custom target install data/test.json delete mode 100644 test cases/failing/90 pch source different folder/include/pch.h delete mode 100644 test cases/failing/90 pch source different folder/meson.build delete mode 100644 test cases/failing/90 pch source different folder/prog.c delete mode 100644 test cases/failing/90 pch source different folder/src/pch.c delete mode 100644 test cases/failing/90 pch source different folder/test.json create mode 100644 test cases/failing/91 add dict non string key/meson.build create mode 100644 test cases/failing/91 add dict non string key/test.json delete mode 100644 test cases/failing/91 unknown config tool/meson.build delete mode 100644 test cases/failing/91 unknown config tool/test.json create mode 100644 test cases/failing/92 add dict duplicate keys/meson.build create mode 100644 test cases/failing/92 add dict duplicate keys/test.json delete mode 100644 test cases/failing/92 custom target install data/Info.plist.cpp delete mode 100644 test cases/failing/92 custom target install data/meson.build delete mode 100644 test cases/failing/92 custom target install data/preproc.py delete mode 100644 test cases/failing/92 custom target install data/test.json delete mode 100644 test cases/failing/93 add dict non string key/meson.build delete mode 100644 test cases/failing/93 add dict non string key/test.json create mode 100644 test cases/failing/93 no host get_external_property/meson.build create mode 100644 test cases/failing/93 no host get_external_property/test.json delete mode 100644 test cases/failing/94 add dict duplicate keys/meson.build delete mode 100644 test cases/failing/94 add dict duplicate keys/test.json create mode 100644 test cases/failing/94 no native compiler/main.c create mode 100644 test cases/failing/94 no native compiler/meson.build create mode 100644 test cases/failing/94 no native compiler/test.json delete mode 100644 test cases/failing/95 no host get_external_property/meson.build delete mode 100644 test cases/failing/95 no host get_external_property/test.json create mode 100644 test cases/failing/95 subdir parse error/meson.build create mode 100644 test cases/failing/95 subdir parse error/subdir/meson.build create mode 100644 test cases/failing/95 subdir parse error/test.json create mode 100644 test cases/failing/96 invalid option file/meson.build create mode 100644 test cases/failing/96 invalid option file/meson_options.txt create mode 100644 test cases/failing/96 invalid option file/test.json delete mode 100644 test cases/failing/96 no native compiler/main.c delete mode 100644 test cases/failing/96 no native compiler/meson.build delete mode 100644 test cases/failing/96 no native compiler/test.json create mode 100644 test cases/failing/97 no lang/main.c create mode 100644 test cases/failing/97 no lang/meson.build create mode 100644 test cases/failing/97 no lang/test.json delete mode 100644 test cases/failing/97 subdir parse error/meson.build delete mode 100644 test cases/failing/97 subdir parse error/subdir/meson.build delete mode 100644 test cases/failing/97 subdir parse error/test.json delete mode 100644 test cases/failing/98 invalid option file/meson.build delete mode 100644 test cases/failing/98 invalid option file/meson_options.txt delete mode 100644 test cases/failing/98 invalid option file/test.json create mode 100644 test cases/failing/98 no glib-compile-resources/meson.build create mode 100644 test cases/failing/98 no glib-compile-resources/test.json create mode 100644 test cases/failing/98 no glib-compile-resources/trivial.gresource.xml delete mode 100644 test cases/failing/99 no lang/main.c delete mode 100644 test cases/failing/99 no lang/meson.build delete mode 100644 test cases/failing/99 no lang/test.json create mode 100644 test cases/failing/99 number in combo/meson.build create mode 100644 test cases/failing/99 number in combo/nativefile.ini create mode 100644 test cases/failing/99 number in combo/test.json delete mode 100644 test cases/unit/100 custom target name/file.txt.in delete mode 100644 test cases/unit/100 custom target name/meson.build delete mode 100644 test cases/unit/100 custom target name/subdir/meson.build create mode 100755 test cases/unit/100 relative find program/foo.py create mode 100644 test cases/unit/100 relative find program/meson.build create mode 100644 test cases/unit/100 relative find program/subdir/meson.build delete mode 100755 test cases/unit/101 relative find program/foo.py delete mode 100644 test cases/unit/101 relative find program/meson.build delete mode 100644 test cases/unit/101 relative find program/subdir/meson.build create mode 100644 test cases/unit/101 rlib linkage/lib2.rs create mode 100644 test cases/unit/101 rlib linkage/main.rs create mode 100644 test cases/unit/101 rlib linkage/meson.build create mode 100644 test cases/unit/102 python without pkgconfig/meson.build delete mode 100644 test cases/unit/102 rlib linkage/lib2.rs delete mode 100644 test cases/unit/102 rlib linkage/main.rs delete mode 100644 test cases/unit/102 rlib linkage/meson.build delete mode 100644 test cases/unit/103 python without pkgconfig/meson.build create mode 100644 test cases/unit/103 strip/lib.c create mode 100644 test cases/unit/103 strip/meson.build create mode 100644 test cases/unit/104 debug function/meson.build delete mode 100644 test cases/unit/104 strip/lib.c delete mode 100644 test cases/unit/104 strip/meson.build delete mode 100644 test cases/unit/105 debug function/meson.build create mode 100644 test cases/unit/105 pkgconfig relocatable with absolute path/meson.build delete mode 100644 test cases/unit/106 pkgconfig relocatable with absolute path/meson.build delete mode 100644 test cases/unit/110 replace unencodable xml chars/meson.build delete mode 100644 test cases/unit/110 replace unencodable xml chars/script.py delete mode 100644 test cases/unit/111 classpath/com/mesonbuild/Simple.java delete mode 100644 test cases/unit/111 classpath/meson.build create mode 100644 test cases/unit/111 replace unencodable xml chars/meson.build create mode 100644 test cases/unit/111 replace unencodable xml chars/script.py create mode 100644 test cases/unit/112 classpath/com/mesonbuild/Simple.java create mode 100644 test cases/unit/112 classpath/meson.build delete mode 100644 test cases/unit/112 list build options/meson.build delete mode 100644 test cases/unit/112 list build options/meson_options.txt delete mode 100644 test cases/unit/113 complex link cases/main.c delete mode 100644 test cases/unit/113 complex link cases/meson.build delete mode 100644 test cases/unit/113 complex link cases/s1.c delete mode 100644 test cases/unit/113 complex link cases/s2.c delete mode 100644 test cases/unit/113 complex link cases/s3.c create mode 100644 test cases/unit/113 list build options/meson.build create mode 100644 test cases/unit/113 list build options/meson_options.txt delete mode 100644 test cases/unit/114 c cpp stds/meson.build create mode 100644 test cases/unit/114 complex link cases/main.c create mode 100644 test cases/unit/114 complex link cases/meson.build create mode 100644 test cases/unit/114 complex link cases/s1.c create mode 100644 test cases/unit/114 complex link cases/s2.c create mode 100644 test cases/unit/114 complex link cases/s3.c delete mode 100644 test cases/unit/114 empty project/expected_mods.json delete mode 100644 test cases/unit/114 empty project/meson.build create mode 100644 test cases/unit/115 c cpp stds/meson.build delete mode 100644 test cases/unit/115 genvslite/main.cpp delete mode 100644 test cases/unit/115 genvslite/meson.build create mode 100644 test cases/unit/116 empty project/expected_mods.json create mode 100644 test cases/unit/116 empty project/meson.build delete mode 100644 test cases/unit/116 meson package cache dir/cache_dir/bar/meson.build delete mode 100644 test cases/unit/116 meson package cache dir/cache_dir/foo.zip delete mode 100644 test cases/unit/116 meson package cache dir/meson.build delete mode 100644 test cases/unit/116 meson package cache dir/subprojects/bar.wrap delete mode 100644 test cases/unit/116 meson package cache dir/subprojects/foo.wrap create mode 100644 test cases/unit/117 genvslite/main.cpp create mode 100644 test cases/unit/117 genvslite/meson.build delete mode 100644 test cases/unit/117 openssl cmake bug/meson.build delete mode 100644 test cases/unit/117 openssl cmake bug/nativefile.ini create mode 100644 test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build create mode 100644 test cases/unit/118 meson package cache dir/cache_dir/foo.zip create mode 100644 test cases/unit/118 meson package cache dir/meson.build create mode 100644 test cases/unit/118 meson package cache dir/subprojects/bar.wrap create mode 100644 test cases/unit/118 meson package cache dir/subprojects/foo.wrap delete mode 100644 test cases/unit/118 rewrite/meson.build delete mode 100644 test cases/unit/119 executable suffix/main.c delete mode 100644 test cases/unit/119 executable suffix/meson.build create mode 100644 test cases/unit/119 openssl cmake bug/meson.build create mode 100644 test cases/unit/119 openssl cmake bug/nativefile.ini create mode 100644 test cases/unit/120 rewrite/meson.build create mode 100644 test cases/unit/121 executable suffix/main.c create mode 100644 test cases/unit/121 executable suffix/meson.build create mode 100644 test cases/unit/91 install skip subprojects/foo.c create mode 100644 test cases/unit/91 install skip subprojects/foo.dat create mode 100644 test cases/unit/91 install skip subprojects/foo.h create mode 100644 test cases/unit/91 install skip subprojects/foo/foofile create mode 100644 test cases/unit/91 install skip subprojects/meson.build create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.c create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar.h create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile create mode 100644 test cases/unit/91 install skip subprojects/subprojects/bar/meson.build delete mode 100644 test cases/unit/92 install skip subprojects/foo.c delete mode 100644 test cases/unit/92 install skip subprojects/foo.dat delete mode 100644 test cases/unit/92 install skip subprojects/foo.h delete mode 100644 test cases/unit/92 install skip subprojects/foo/foofile delete mode 100644 test cases/unit/92 install skip subprojects/meson.build delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.c delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar.h delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile delete mode 100644 test cases/unit/92 install skip subprojects/subprojects/bar/meson.build create mode 100644 test cases/unit/92 new subproject in configured project/meson.build create mode 100644 test cases/unit/92 new subproject in configured project/meson_options.txt create mode 100644 test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c create mode 100644 test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build create mode 100644 test cases/unit/93 clangformat/.clang-format create mode 100644 test cases/unit/93 clangformat/.clang-format-ignore create mode 100644 test cases/unit/93 clangformat/.clang-format-include create mode 100644 test cases/unit/93 clangformat/meson.build create mode 100644 test cases/unit/93 clangformat/not-included/badformat.cpp create mode 100644 test cases/unit/93 clangformat/src/badformat.c create mode 100644 test cases/unit/93 clangformat/src/badformat.cpp delete mode 100644 test cases/unit/93 new subproject in configured project/meson.build delete mode 100644 test cases/unit/93 new subproject in configured project/meson_options.txt delete mode 100644 test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c delete mode 100644 test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build delete mode 100644 test cases/unit/94 clangformat/.clang-format delete mode 100644 test cases/unit/94 clangformat/.clang-format-ignore delete mode 100644 test cases/unit/94 clangformat/.clang-format-include delete mode 100644 test cases/unit/94 clangformat/meson.build delete mode 100644 test cases/unit/94 clangformat/not-included/badformat.cpp delete mode 100644 test cases/unit/94 clangformat/src/badformat.c delete mode 100644 test cases/unit/94 clangformat/src/badformat.cpp create mode 100644 test cases/unit/94 custominc/easytogrepfor/genh.py create mode 100644 test cases/unit/94 custominc/easytogrepfor/meson.build create mode 100644 test cases/unit/94 custominc/helper.c create mode 100644 test cases/unit/94 custominc/meson.build create mode 100644 test cases/unit/94 custominc/prog.c create mode 100644 test cases/unit/94 custominc/prog2.c delete mode 100644 test cases/unit/95 custominc/easytogrepfor/genh.py delete mode 100644 test cases/unit/95 custominc/easytogrepfor/meson.build delete mode 100644 test cases/unit/95 custominc/helper.c delete mode 100644 test cases/unit/95 custominc/meson.build delete mode 100644 test cases/unit/95 custominc/prog.c delete mode 100644 test cases/unit/95 custominc/prog2.c create mode 100644 test cases/unit/95 implicit force fallback/meson.build create mode 100644 test cases/unit/95 implicit force fallback/subprojects/something/meson.build create mode 100644 test cases/unit/96 compiler.links file arg/meson.build create mode 100644 test cases/unit/96 compiler.links file arg/test.c delete mode 100644 test cases/unit/96 implicit force fallback/meson.build delete mode 100644 test cases/unit/96 implicit force fallback/subprojects/something/meson.build delete mode 100644 test cases/unit/97 compiler.links file arg/meson.build delete mode 100644 test cases/unit/97 compiler.links file arg/test.c create mode 100644 test cases/unit/97 link full name/.gitignore create mode 100644 test cases/unit/97 link full name/libtestprovider/meson.build create mode 100644 test cases/unit/97 link full name/libtestprovider/provider.c create mode 100644 test cases/unit/97 link full name/proguser/meson.build create mode 100644 test cases/unit/97 link full name/proguser/receiver.c create mode 100644 test cases/unit/98 install all targets/bar-custom.txt create mode 100644 test cases/unit/98 install all targets/bar-devel.h create mode 100644 test cases/unit/98 install all targets/bar-notag.txt create mode 100644 test cases/unit/98 install all targets/custom_files/data.txt create mode 100644 test cases/unit/98 install all targets/excludes/excluded.txt create mode 100644 test cases/unit/98 install all targets/excludes/excluded/placeholder.txt create mode 100644 test cases/unit/98 install all targets/excludes/installed.txt create mode 100644 test cases/unit/98 install all targets/foo.in create mode 100644 test cases/unit/98 install all targets/foo1-devel.h create mode 100644 test cases/unit/98 install all targets/lib.c create mode 100644 test cases/unit/98 install all targets/main.c create mode 100644 test cases/unit/98 install all targets/meson.build create mode 100644 test cases/unit/98 install all targets/script.py create mode 100644 test cases/unit/98 install all targets/subdir/bar2-devel.h create mode 100644 test cases/unit/98 install all targets/subdir/foo2.in create mode 100644 test cases/unit/98 install all targets/subdir/foo3-devel.h create mode 100644 test cases/unit/98 install all targets/subdir/lib.c create mode 100644 test cases/unit/98 install all targets/subdir/main.c create mode 100644 test cases/unit/98 install all targets/subdir/meson.build create mode 100644 test cases/unit/98 install all targets/subdir/script.py create mode 100644 test cases/unit/98 install all targets/subprojects/subproject/aaa.txt create mode 100644 test cases/unit/98 install all targets/subprojects/subproject/bbb.txt create mode 100644 test cases/unit/98 install all targets/subprojects/subproject/meson.build delete mode 100644 test cases/unit/98 link full name/.gitignore delete mode 100644 test cases/unit/98 link full name/libtestprovider/meson.build delete mode 100644 test cases/unit/98 link full name/libtestprovider/provider.c delete mode 100644 test cases/unit/98 link full name/proguser/meson.build delete mode 100644 test cases/unit/98 link full name/proguser/receiver.c create mode 100644 test cases/unit/99 custom target name/file.txt.in create mode 100644 test cases/unit/99 custom target name/meson.build create mode 100644 test cases/unit/99 custom target name/subdir/meson.build delete mode 100644 test cases/unit/99 install all targets/bar-custom.txt delete mode 100644 test cases/unit/99 install all targets/bar-devel.h delete mode 100644 test cases/unit/99 install all targets/bar-notag.txt delete mode 100644 test cases/unit/99 install all targets/custom_files/data.txt delete mode 100644 test cases/unit/99 install all targets/excludes/excluded.txt delete mode 100644 test cases/unit/99 install all targets/excludes/excluded/placeholder.txt delete mode 100644 test cases/unit/99 install all targets/excludes/installed.txt delete mode 100644 test cases/unit/99 install all targets/foo.in delete mode 100644 test cases/unit/99 install all targets/foo1-devel.h delete mode 100644 test cases/unit/99 install all targets/lib.c delete mode 100644 test cases/unit/99 install all targets/main.c delete mode 100644 test cases/unit/99 install all targets/meson.build delete mode 100644 test cases/unit/99 install all targets/script.py delete mode 100644 test cases/unit/99 install all targets/subdir/bar2-devel.h delete mode 100644 test cases/unit/99 install all targets/subdir/foo2.in delete mode 100644 test cases/unit/99 install all targets/subdir/foo3-devel.h delete mode 100644 test cases/unit/99 install all targets/subdir/lib.c delete mode 100644 test cases/unit/99 install all targets/subdir/main.c delete mode 100644 test cases/unit/99 install all targets/subdir/meson.build delete mode 100644 test cases/unit/99 install all targets/subdir/script.py delete mode 100644 test cases/unit/99 install all targets/subprojects/subproject/aaa.txt delete mode 100644 test cases/unit/99 install all targets/subprojects/subproject/bbb.txt delete mode 100644 test cases/unit/99 install all targets/subprojects/subproject/meson.build diff --git a/run_format_tests.py b/run_format_tests.py index 1bf997ccc..70fa1212e 100644 --- a/run_format_tests.py +++ b/run_format_tests.py @@ -63,7 +63,7 @@ def check_format() -> None: 'work area', '.eggs', '_cache', # e.g. .mypy_cache 'venv', # virtualenvs have DOS line endings - '118 rewrite', # we explicitly test for tab in meson.build file + '120 rewrite', # we explicitly test for tab in meson.build file } for (root, _, filenames) in os.walk('.'): if any([x in root for x in skip_dirs]): diff --git a/test cases/cmake/26 dependency fallback/main.cpp b/test cases/cmake/26 dependency fallback/main.cpp deleted file mode 100644 index 95079615a..000000000 --- a/test cases/cmake/26 dependency fallback/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -using namespace std; - -int main(void) { - cmModClass obj("Hello"); - cout << obj.getStr() << endl; - return 0; -} diff --git a/test cases/cmake/26 dependency fallback/meson.build b/test cases/cmake/26 dependency fallback/meson.build deleted file mode 100644 index 871d70c9f..000000000 --- a/test cases/cmake/26 dependency fallback/meson.build +++ /dev/null @@ -1,30 +0,0 @@ -project('cmakeSubTest', ['c', 'cpp']) - -# Fallback to a CMake subproject -sub_dep = dependency('cmModLib++') -exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep]) -test('test1', exe1) - -# Subproject contains both meson.build and CMakeLists.txt. It should default -# to meson but wrap force cmake. -subproject('force_cmake') - -testcase expect_error('Wrap method \'notfound\' is not supported, must be one of: meson, cmake, cargo') - subproject('broken_method') -endtestcase - -# With method=meson we can't use cmake.subproject() -cmake = import('cmake') -testcase expect_error('Wrap method is \'meson\' but we are trying to configure it with cmake') - cmake.subproject('meson_method') -endtestcase - -# cmake.subproject() force cmake method even if meson.build exists. -testcase expect_error('Subproject exists but has no CMakeLists.txt file.') - cmake.subproject('meson_subp') -endtestcase - -# Without specifying the method it defaults to meson even if CMakeLists.txt exists. -testcase expect_error('Subproject exists but has no meson.build file.') - subproject('cmake_subp') -endtestcase diff --git a/test cases/cmake/26 dependency fallback/subprojects/broken_method.wrap b/test cases/cmake/26 dependency fallback/subprojects/broken_method.wrap deleted file mode 100644 index ce0690a51..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/broken_method.wrap +++ /dev/null @@ -1,2 +0,0 @@ -[wrap-file] -method=notfound diff --git a/test cases/cmake/26 dependency fallback/subprojects/cmMod.wrap b/test cases/cmake/26 dependency fallback/subprojects/cmMod.wrap deleted file mode 100644 index 9e6d855f0..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/cmMod.wrap +++ /dev/null @@ -1,5 +0,0 @@ -[wrap-file] -method = cmake - -[provide] -cmModLib++ = cmModLib___dep diff --git a/test cases/cmake/26 dependency fallback/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/26 dependency fallback/subprojects/cmMod/CMakeLists.txt deleted file mode 100644 index d08e55cdf..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/cmMod/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(cmMod) -set(CMAKE_CXX_STANDARD 14) - -include_directories(${CMAKE_CURRENT_BINARY_DIR}) - -add_definitions("-DDO_NOTHING_JUST_A_FLAG=1") - -add_library(cmModLib++ SHARED cmMod.cpp) -target_compile_definitions(cmModLib++ PRIVATE MESON_MAGIC_FLAG=21) -target_compile_definitions(cmModLib++ INTERFACE MESON_MAGIC_FLAG=42) - -# Test PCH support -if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") - target_precompile_headers(cmModLib++ PRIVATE "cpp_pch.hpp") -endif() - -include(GenerateExportHeader) -generate_export_header(cmModLib++) diff --git a/test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.cpp b/test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.cpp deleted file mode 100644 index f4cbea0ce..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "cmMod.hpp" - -using namespace std; - -#if MESON_MAGIC_FLAG != 21 -#error "Invalid MESON_MAGIC_FLAG (private)" -#endif - -cmModClass::cmModClass(string foo) { - str = foo + " World"; -} - -string cmModClass::getStr() const { - return str; -} diff --git a/test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.hpp b/test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.hpp deleted file mode 100644 index 4445e1f53..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/cmMod/cmMod.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include "cmmodlib++_export.h" -#include - -#if MESON_MAGIC_FLAG != 42 && MESON_MAGIC_FLAG != 21 -#error "Invalid MESON_MAGIC_FLAG" -#endif - -class CMMODLIB___EXPORT cmModClass { -private: - std::string str; - -public: - cmModClass(std::string foo); - - std::string getStr() const; -}; diff --git a/test cases/cmake/26 dependency fallback/subprojects/cmMod/cpp_pch.hpp b/test cases/cmake/26 dependency fallback/subprojects/cmMod/cpp_pch.hpp deleted file mode 100644 index aa7ceb361..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/cmMod/cpp_pch.hpp +++ /dev/null @@ -1,2 +0,0 @@ -#include -#include diff --git a/test cases/cmake/26 dependency fallback/subprojects/cmake_subp/CMakeLists.txt b/test cases/cmake/26 dependency fallback/subprojects/cmake_subp/CMakeLists.txt deleted file mode 100644 index 6443fcadd..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/cmake_subp/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(cmModDummy) diff --git a/test cases/cmake/26 dependency fallback/subprojects/force_cmake.wrap b/test cases/cmake/26 dependency fallback/subprojects/force_cmake.wrap deleted file mode 100644 index b24754eca..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/force_cmake.wrap +++ /dev/null @@ -1,2 +0,0 @@ -[wrap-file] -method=cmake diff --git a/test cases/cmake/26 dependency fallback/subprojects/force_cmake/CMakeLists.txt b/test cases/cmake/26 dependency fallback/subprojects/force_cmake/CMakeLists.txt deleted file mode 100644 index 497beb95e..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/force_cmake/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(cmModBoth) diff --git a/test cases/cmake/26 dependency fallback/subprojects/force_cmake/meson.build b/test cases/cmake/26 dependency fallback/subprojects/force_cmake/meson.build deleted file mode 100644 index 92649744e..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/force_cmake/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('both methods') - -# Ensure the meson method is not used. -notfound() diff --git a/test cases/cmake/26 dependency fallback/subprojects/meson_method.wrap b/test cases/cmake/26 dependency fallback/subprojects/meson_method.wrap deleted file mode 100644 index e52701e57..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/meson_method.wrap +++ /dev/null @@ -1,2 +0,0 @@ -[wrap-file] -method=meson diff --git a/test cases/cmake/26 dependency fallback/subprojects/meson_subp/meson.build b/test cases/cmake/26 dependency fallback/subprojects/meson_subp/meson.build deleted file mode 100644 index e4746ce6b..000000000 --- a/test cases/cmake/26 dependency fallback/subprojects/meson_subp/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('dummy') diff --git a/test cases/cmake/27 dependency fallback/main.cpp b/test cases/cmake/27 dependency fallback/main.cpp new file mode 100644 index 000000000..95079615a --- /dev/null +++ b/test cases/cmake/27 dependency fallback/main.cpp @@ -0,0 +1,10 @@ +#include +#include + +using namespace std; + +int main(void) { + cmModClass obj("Hello"); + cout << obj.getStr() << endl; + return 0; +} diff --git a/test cases/cmake/27 dependency fallback/meson.build b/test cases/cmake/27 dependency fallback/meson.build new file mode 100644 index 000000000..871d70c9f --- /dev/null +++ b/test cases/cmake/27 dependency fallback/meson.build @@ -0,0 +1,30 @@ +project('cmakeSubTest', ['c', 'cpp']) + +# Fallback to a CMake subproject +sub_dep = dependency('cmModLib++') +exe1 = executable('main', ['main.cpp'], dependencies: [sub_dep]) +test('test1', exe1) + +# Subproject contains both meson.build and CMakeLists.txt. It should default +# to meson but wrap force cmake. +subproject('force_cmake') + +testcase expect_error('Wrap method \'notfound\' is not supported, must be one of: meson, cmake, cargo') + subproject('broken_method') +endtestcase + +# With method=meson we can't use cmake.subproject() +cmake = import('cmake') +testcase expect_error('Wrap method is \'meson\' but we are trying to configure it with cmake') + cmake.subproject('meson_method') +endtestcase + +# cmake.subproject() force cmake method even if meson.build exists. +testcase expect_error('Subproject exists but has no CMakeLists.txt file.') + cmake.subproject('meson_subp') +endtestcase + +# Without specifying the method it defaults to meson even if CMakeLists.txt exists. +testcase expect_error('Subproject exists but has no meson.build file.') + subproject('cmake_subp') +endtestcase diff --git a/test cases/cmake/27 dependency fallback/subprojects/broken_method.wrap b/test cases/cmake/27 dependency fallback/subprojects/broken_method.wrap new file mode 100644 index 000000000..ce0690a51 --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/broken_method.wrap @@ -0,0 +1,2 @@ +[wrap-file] +method=notfound diff --git a/test cases/cmake/27 dependency fallback/subprojects/cmMod.wrap b/test cases/cmake/27 dependency fallback/subprojects/cmMod.wrap new file mode 100644 index 000000000..9e6d855f0 --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/cmMod.wrap @@ -0,0 +1,5 @@ +[wrap-file] +method = cmake + +[provide] +cmModLib++ = cmModLib___dep diff --git a/test cases/cmake/27 dependency fallback/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/27 dependency fallback/subprojects/cmMod/CMakeLists.txt new file mode 100644 index 000000000..d08e55cdf --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/cmMod/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.5) + +project(cmMod) +set(CMAKE_CXX_STANDARD 14) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +add_definitions("-DDO_NOTHING_JUST_A_FLAG=1") + +add_library(cmModLib++ SHARED cmMod.cpp) +target_compile_definitions(cmModLib++ PRIVATE MESON_MAGIC_FLAG=21) +target_compile_definitions(cmModLib++ INTERFACE MESON_MAGIC_FLAG=42) + +# Test PCH support +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0") + target_precompile_headers(cmModLib++ PRIVATE "cpp_pch.hpp") +endif() + +include(GenerateExportHeader) +generate_export_header(cmModLib++) diff --git a/test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.cpp b/test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.cpp new file mode 100644 index 000000000..f4cbea0ce --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.cpp @@ -0,0 +1,15 @@ +#include "cmMod.hpp" + +using namespace std; + +#if MESON_MAGIC_FLAG != 21 +#error "Invalid MESON_MAGIC_FLAG (private)" +#endif + +cmModClass::cmModClass(string foo) { + str = foo + " World"; +} + +string cmModClass::getStr() const { + return str; +} diff --git a/test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.hpp b/test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.hpp new file mode 100644 index 000000000..4445e1f53 --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/cmMod/cmMod.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include "cmmodlib++_export.h" +#include + +#if MESON_MAGIC_FLAG != 42 && MESON_MAGIC_FLAG != 21 +#error "Invalid MESON_MAGIC_FLAG" +#endif + +class CMMODLIB___EXPORT cmModClass { +private: + std::string str; + +public: + cmModClass(std::string foo); + + std::string getStr() const; +}; diff --git a/test cases/cmake/27 dependency fallback/subprojects/cmMod/cpp_pch.hpp b/test cases/cmake/27 dependency fallback/subprojects/cmMod/cpp_pch.hpp new file mode 100644 index 000000000..aa7ceb361 --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/cmMod/cpp_pch.hpp @@ -0,0 +1,2 @@ +#include +#include diff --git a/test cases/cmake/27 dependency fallback/subprojects/cmake_subp/CMakeLists.txt b/test cases/cmake/27 dependency fallback/subprojects/cmake_subp/CMakeLists.txt new file mode 100644 index 000000000..6443fcadd --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/cmake_subp/CMakeLists.txt @@ -0,0 +1,2 @@ +cmake_minimum_required(VERSION 3.5) +project(cmModDummy) diff --git a/test cases/cmake/27 dependency fallback/subprojects/force_cmake.wrap b/test cases/cmake/27 dependency fallback/subprojects/force_cmake.wrap new file mode 100644 index 000000000..b24754eca --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/force_cmake.wrap @@ -0,0 +1,2 @@ +[wrap-file] +method=cmake diff --git a/test cases/cmake/27 dependency fallback/subprojects/force_cmake/CMakeLists.txt b/test cases/cmake/27 dependency fallback/subprojects/force_cmake/CMakeLists.txt new file mode 100644 index 000000000..497beb95e --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/force_cmake/CMakeLists.txt @@ -0,0 +1,2 @@ +cmake_minimum_required(VERSION 3.5) +project(cmModBoth) diff --git a/test cases/cmake/27 dependency fallback/subprojects/force_cmake/meson.build b/test cases/cmake/27 dependency fallback/subprojects/force_cmake/meson.build new file mode 100644 index 000000000..92649744e --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/force_cmake/meson.build @@ -0,0 +1,4 @@ +project('both methods') + +# Ensure the meson method is not used. +notfound() diff --git a/test cases/cmake/27 dependency fallback/subprojects/meson_method.wrap b/test cases/cmake/27 dependency fallback/subprojects/meson_method.wrap new file mode 100644 index 000000000..e52701e57 --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/meson_method.wrap @@ -0,0 +1,2 @@ +[wrap-file] +method=meson diff --git a/test cases/cmake/27 dependency fallback/subprojects/meson_subp/meson.build b/test cases/cmake/27 dependency fallback/subprojects/meson_subp/meson.build new file mode 100644 index 000000000..e4746ce6b --- /dev/null +++ b/test cases/cmake/27 dependency fallback/subprojects/meson_subp/meson.build @@ -0,0 +1 @@ +project('dummy') diff --git a/test cases/common/262 internal dependency includes in checks/include/test_262_header.h b/test cases/common/262 internal dependency includes in checks/include/test_262_header.h deleted file mode 100644 index 5a2ca62ad..000000000 --- a/test cases/common/262 internal dependency includes in checks/include/test_262_header.h +++ /dev/null @@ -1 +0,0 @@ -int foo(void); diff --git a/test cases/common/262 internal dependency includes in checks/meson.build b/test cases/common/262 internal dependency includes in checks/meson.build deleted file mode 100644 index c8b527758..000000000 --- a/test cases/common/262 internal dependency includes in checks/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('test 262', 'c') - -cc = meson.get_compiler('c') - -internal_dep = declare_dependency(include_directories: 'include') - -assert(cc.has_header_symbol('test_262_header.h', 'foo', dependencies: internal_dep)) diff --git a/test cases/common/262 required keyword in has functions/meson.build b/test cases/common/262 required keyword in has functions/meson.build deleted file mode 100644 index afd07eab1..000000000 --- a/test cases/common/262 required keyword in has functions/meson.build +++ /dev/null @@ -1,67 +0,0 @@ -project('required keyword in has functions', 'c') - -cc = meson.get_compiler('c') -opt = get_option('opt') - -cc.has_function('printf', prefix : '#include', required : true) -cc.has_type('time_t', prefix : '#include', required : true) -cc.has_member('struct tm', 'tm_sec', prefix : '#include', required : true) -cc.has_members('struct tm', ['tm_sec', 'tm_min'], prefix : '#include', required : true) -cc.has_header('time.h', required : true) -cc.has_header_symbol('time.h', 'time', required : true) - -assert(not cc.has_function('printf', prefix : '#include', required : opt)) -assert(not cc.has_type('time_t', prefix : '#include', required : opt)) -assert(not cc.has_member('struct tm', 'tm_sec', prefix : '#include', required : opt)) -assert(not cc.has_members('struct tm', ['tm_sec', 'tm_min'], prefix : '#include', required : opt)) -assert(not cc.has_header('time.h', required : opt)) -assert(not cc.has_header_symbol('time.h', 'time', required : opt)) - -# compiler.has_argument -if cc.get_id() == 'msvc' - is_arg = '/O2' -else - is_arg = '-O2' -endif -cc.has_argument(is_arg, required: true) -assert(not cc.has_argument(is_arg, required: opt)) - -# compiler.has_multi_arguments -if cc.get_id() == 'gcc' - pre_arg = '-Wformat' - arg = '-Werror=format-security' - cc.has_multi_arguments([pre_arg, arg], required: true) - assert(not cc.has_multi_arguments(pre_arg, arg, required: opt)) -endif - -# compiler.has_link_argument -if cc.get_argument_syntax() == 'msvc' - is_arg = '/OPT:REF' -else - is_arg = '-Wl,-L/tmp' -endif -cc.has_link_argument(is_arg, required: true) -assert(not cc.has_link_argument(is_arg, required: opt)) - -# compiler.has_function_attribute -if not ['pgi', 'msvc', 'clang-cl', 'intel-cl'].contains(cc.get_id()) - a = 'aligned' - cc.has_function_attribute(a, required: true) - assert(not cc.has_function_attribute(a, required: opt)) -endif - -testcase expect_error('''compiler.has_function keyword argument 'required' was of type str but should have been one of: bool, UserFeatureOption''') - cc.has_function('printf', required : 'not a bool') -endtestcase - -testcase expect_error('''C function 'asdfkawlegsdiovapfjhkr' not usable''') - cc.has_function('asdfkawlegsdiovapfjhkr', required : true) -endtestcase - -testcase expect_error('''C header 'asdfkawlegsdiovapfjhkr.h' not found''') - cc.has_header('asdfkawlegsdiovapfjhkr.h', required : true) -endtestcase - -testcase expect_error('''C symbol time_not_found not found in header time.h''') - cc.has_header_symbol('time.h', 'time_not_found', required : true) -endtestcase diff --git a/test cases/common/262 required keyword in has functions/meson_options.txt b/test cases/common/262 required keyword in has functions/meson_options.txt deleted file mode 100644 index 53175afec..000000000 --- a/test cases/common/262 required keyword in has functions/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('opt', type: 'feature', value: 'disabled') diff --git a/test cases/common/263 default_options dict/lib.c b/test cases/common/263 default_options dict/lib.c deleted file mode 100644 index 3ef78ee94..000000000 --- a/test cases/common/263 default_options dict/lib.c +++ /dev/null @@ -1 +0,0 @@ -#warning Make sure this is not fatal diff --git a/test cases/common/263 default_options dict/meson.build b/test cases/common/263 default_options dict/meson.build deleted file mode 100644 index 06edd7bf7..000000000 --- a/test cases/common/263 default_options dict/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project('test default options', 'c', - default_options: { - 'bool': true, - 'int': 42, - 'str': 'foo', - 'array': ['foo'], - 'werror': true, - }, -) - -assert(get_option('bool') == true) -assert(get_option('int') == 42) -assert(get_option('str') == 'foo') -assert(get_option('array') == ['foo']) -assert(get_option('werror') == true) - -cc = meson.get_compiler('c') - -# MSVC does not support #warning -if cc.get_id() != 'msvc' - static_library('foo', 'lib.c', override_options: {'werror': false}) -endif diff --git a/test cases/common/263 default_options dict/meson_options.txt b/test cases/common/263 default_options dict/meson_options.txt deleted file mode 100644 index 1b0b0e1a7..000000000 --- a/test cases/common/263 default_options dict/meson_options.txt +++ /dev/null @@ -1,4 +0,0 @@ -option('bool', type: 'boolean', value: false) -option('int', type: 'integer', value: 0) -option('str', type: 'string', value: 'bar') -option('array', type: 'array', value: ['bar']) diff --git a/test cases/common/263 internal dependency includes in checks/include/test_262_header.h b/test cases/common/263 internal dependency includes in checks/include/test_262_header.h new file mode 100644 index 000000000..5a2ca62ad --- /dev/null +++ b/test cases/common/263 internal dependency includes in checks/include/test_262_header.h @@ -0,0 +1 @@ +int foo(void); diff --git a/test cases/common/263 internal dependency includes in checks/meson.build b/test cases/common/263 internal dependency includes in checks/meson.build new file mode 100644 index 000000000..c8b527758 --- /dev/null +++ b/test cases/common/263 internal dependency includes in checks/meson.build @@ -0,0 +1,7 @@ +project('test 262', 'c') + +cc = meson.get_compiler('c') + +internal_dep = declare_dependency(include_directories: 'include') + +assert(cc.has_header_symbol('test_262_header.h', 'foo', dependencies: internal_dep)) diff --git a/test cases/common/264 format string/meson.build b/test cases/common/264 format string/meson.build deleted file mode 100644 index 200cfac40..000000000 --- a/test cases/common/264 format string/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -project('test format string') - -# Test all supported types in message(), format(), f-string. -foreach t : [get_option('opt'), 42, true, false, 'str', ['list'], {'dict': 'value'}] - message(t, '@0@'.format(t), f'@t@', [t], {'key': t}) -endforeach - -# Deprecated but should work with str.format(). -env = environment() -message('@0@'.format(env)) - -# Should fail with f-string and message() -error_msg = 'Value other than strings, integers, bools, options, dictionaries and lists thereof.' -testcase expect_error('message(): ' + error_msg) - message(env) -endtestcase - -testcase expect_error('f-string: ' + error_msg) - message(f'@env@') -endtestcase diff --git a/test cases/common/264 format string/meson_options.txt b/test cases/common/264 format string/meson_options.txt deleted file mode 100644 index 2e3917617..000000000 --- a/test cases/common/264 format string/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('opt', type: 'feature') diff --git a/test cases/common/264 format string/test.json b/test cases/common/264 format string/test.json deleted file mode 100644 index 2369864b2..000000000 --- a/test cases/common/264 format string/test.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "stdout": [ - { - "line": "Message: auto auto auto [auto] {'key' : auto}" - }, - { - "line": "Message: 42 42 42 [42] {'key' : 42}" - }, - { - "line": "Message: true true true [true] {'key' : true}" - }, - { - "line": "Message: false false false [false] {'key' : false}" - }, - { - "line": "Message: str str str ['str'] {'key' : 'str'}" - }, - { - "line": "Message: ['list'] ['list'] ['list'] [['list']] {'key' : ['list']}" - }, - { - "line": "Message: {'dict' : 'value'} {'dict' : 'value'} {'dict' : 'value'} [{'dict' : 'value'}] {'key' : {'dict' : 'value'}}" - }, - { - "line": "Message: " - } - ] - } diff --git a/test cases/common/264 required keyword in has functions/meson.build b/test cases/common/264 required keyword in has functions/meson.build new file mode 100644 index 000000000..afd07eab1 --- /dev/null +++ b/test cases/common/264 required keyword in has functions/meson.build @@ -0,0 +1,67 @@ +project('required keyword in has functions', 'c') + +cc = meson.get_compiler('c') +opt = get_option('opt') + +cc.has_function('printf', prefix : '#include', required : true) +cc.has_type('time_t', prefix : '#include', required : true) +cc.has_member('struct tm', 'tm_sec', prefix : '#include', required : true) +cc.has_members('struct tm', ['tm_sec', 'tm_min'], prefix : '#include', required : true) +cc.has_header('time.h', required : true) +cc.has_header_symbol('time.h', 'time', required : true) + +assert(not cc.has_function('printf', prefix : '#include', required : opt)) +assert(not cc.has_type('time_t', prefix : '#include', required : opt)) +assert(not cc.has_member('struct tm', 'tm_sec', prefix : '#include', required : opt)) +assert(not cc.has_members('struct tm', ['tm_sec', 'tm_min'], prefix : '#include', required : opt)) +assert(not cc.has_header('time.h', required : opt)) +assert(not cc.has_header_symbol('time.h', 'time', required : opt)) + +# compiler.has_argument +if cc.get_id() == 'msvc' + is_arg = '/O2' +else + is_arg = '-O2' +endif +cc.has_argument(is_arg, required: true) +assert(not cc.has_argument(is_arg, required: opt)) + +# compiler.has_multi_arguments +if cc.get_id() == 'gcc' + pre_arg = '-Wformat' + arg = '-Werror=format-security' + cc.has_multi_arguments([pre_arg, arg], required: true) + assert(not cc.has_multi_arguments(pre_arg, arg, required: opt)) +endif + +# compiler.has_link_argument +if cc.get_argument_syntax() == 'msvc' + is_arg = '/OPT:REF' +else + is_arg = '-Wl,-L/tmp' +endif +cc.has_link_argument(is_arg, required: true) +assert(not cc.has_link_argument(is_arg, required: opt)) + +# compiler.has_function_attribute +if not ['pgi', 'msvc', 'clang-cl', 'intel-cl'].contains(cc.get_id()) + a = 'aligned' + cc.has_function_attribute(a, required: true) + assert(not cc.has_function_attribute(a, required: opt)) +endif + +testcase expect_error('''compiler.has_function keyword argument 'required' was of type str but should have been one of: bool, UserFeatureOption''') + cc.has_function('printf', required : 'not a bool') +endtestcase + +testcase expect_error('''C function 'asdfkawlegsdiovapfjhkr' not usable''') + cc.has_function('asdfkawlegsdiovapfjhkr', required : true) +endtestcase + +testcase expect_error('''C header 'asdfkawlegsdiovapfjhkr.h' not found''') + cc.has_header('asdfkawlegsdiovapfjhkr.h', required : true) +endtestcase + +testcase expect_error('''C symbol time_not_found not found in header time.h''') + cc.has_header_symbol('time.h', 'time_not_found', required : true) +endtestcase diff --git a/test cases/common/264 required keyword in has functions/meson_options.txt b/test cases/common/264 required keyword in has functions/meson_options.txt new file mode 100644 index 000000000..53175afec --- /dev/null +++ b/test cases/common/264 required keyword in has functions/meson_options.txt @@ -0,0 +1 @@ +option('opt', type: 'feature', value: 'disabled') diff --git a/test cases/common/265 default_options dict/lib.c b/test cases/common/265 default_options dict/lib.c new file mode 100644 index 000000000..3ef78ee94 --- /dev/null +++ b/test cases/common/265 default_options dict/lib.c @@ -0,0 +1 @@ +#warning Make sure this is not fatal diff --git a/test cases/common/265 default_options dict/meson.build b/test cases/common/265 default_options dict/meson.build new file mode 100644 index 000000000..06edd7bf7 --- /dev/null +++ b/test cases/common/265 default_options dict/meson.build @@ -0,0 +1,22 @@ +project('test default options', 'c', + default_options: { + 'bool': true, + 'int': 42, + 'str': 'foo', + 'array': ['foo'], + 'werror': true, + }, +) + +assert(get_option('bool') == true) +assert(get_option('int') == 42) +assert(get_option('str') == 'foo') +assert(get_option('array') == ['foo']) +assert(get_option('werror') == true) + +cc = meson.get_compiler('c') + +# MSVC does not support #warning +if cc.get_id() != 'msvc' + static_library('foo', 'lib.c', override_options: {'werror': false}) +endif diff --git a/test cases/common/265 default_options dict/meson_options.txt b/test cases/common/265 default_options dict/meson_options.txt new file mode 100644 index 000000000..1b0b0e1a7 --- /dev/null +++ b/test cases/common/265 default_options dict/meson_options.txt @@ -0,0 +1,4 @@ +option('bool', type: 'boolean', value: false) +option('int', type: 'integer', value: 0) +option('str', type: 'string', value: 'bar') +option('array', type: 'array', value: ['bar']) diff --git a/test cases/common/265 default_options in find_program/meson.build b/test cases/common/265 default_options in find_program/meson.build deleted file mode 100644 index 99d842592..000000000 --- a/test cases/common/265 default_options in find_program/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('test default_options in find_program') - -dummy_exe = find_program('dummy', default_options: ['subproject_option=true']) - -test('test_dummy', dummy_exe) diff --git a/test cases/common/265 default_options in find_program/subprojects/dummy.wrap b/test cases/common/265 default_options in find_program/subprojects/dummy.wrap deleted file mode 100644 index 0c03eec44..000000000 --- a/test cases/common/265 default_options in find_program/subprojects/dummy.wrap +++ /dev/null @@ -1,5 +0,0 @@ -[wrap-file] -directory = dummy - -[provide] -program_names = dummy \ No newline at end of file diff --git a/test cases/common/265 default_options in find_program/subprojects/dummy/dummy.c b/test cases/common/265 default_options in find_program/subprojects/dummy/dummy.c deleted file mode 100644 index a51103c3c..000000000 --- a/test cases/common/265 default_options in find_program/subprojects/dummy/dummy.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return 0; -} \ No newline at end of file diff --git a/test cases/common/265 default_options in find_program/subprojects/dummy/meson.build b/test cases/common/265 default_options in find_program/subprojects/dummy/meson.build deleted file mode 100644 index b6441307f..000000000 --- a/test cases/common/265 default_options in find_program/subprojects/dummy/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('dummy', 'c') - -if get_option('subproject_option') - dummy_exe = executable('dummy', 'dummy.c') - meson.override_find_program('dummy', dummy_exe) -endif diff --git a/test cases/common/265 default_options in find_program/subprojects/dummy/meson_options.txt b/test cases/common/265 default_options in find_program/subprojects/dummy/meson_options.txt deleted file mode 100644 index c91a24af7..000000000 --- a/test cases/common/265 default_options in find_program/subprojects/dummy/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('subproject_option', type: 'boolean', value: false) diff --git a/test cases/common/266 format string/meson.build b/test cases/common/266 format string/meson.build new file mode 100644 index 000000000..200cfac40 --- /dev/null +++ b/test cases/common/266 format string/meson.build @@ -0,0 +1,20 @@ +project('test format string') + +# Test all supported types in message(), format(), f-string. +foreach t : [get_option('opt'), 42, true, false, 'str', ['list'], {'dict': 'value'}] + message(t, '@0@'.format(t), f'@t@', [t], {'key': t}) +endforeach + +# Deprecated but should work with str.format(). +env = environment() +message('@0@'.format(env)) + +# Should fail with f-string and message() +error_msg = 'Value other than strings, integers, bools, options, dictionaries and lists thereof.' +testcase expect_error('message(): ' + error_msg) + message(env) +endtestcase + +testcase expect_error('f-string: ' + error_msg) + message(f'@env@') +endtestcase diff --git a/test cases/common/266 format string/meson_options.txt b/test cases/common/266 format string/meson_options.txt new file mode 100644 index 000000000..2e3917617 --- /dev/null +++ b/test cases/common/266 format string/meson_options.txt @@ -0,0 +1 @@ +option('opt', type: 'feature') diff --git a/test cases/common/266 format string/test.json b/test cases/common/266 format string/test.json new file mode 100644 index 000000000..2369864b2 --- /dev/null +++ b/test cases/common/266 format string/test.json @@ -0,0 +1,28 @@ +{ + "stdout": [ + { + "line": "Message: auto auto auto [auto] {'key' : auto}" + }, + { + "line": "Message: 42 42 42 [42] {'key' : 42}" + }, + { + "line": "Message: true true true [true] {'key' : true}" + }, + { + "line": "Message: false false false [false] {'key' : false}" + }, + { + "line": "Message: str str str ['str'] {'key' : 'str'}" + }, + { + "line": "Message: ['list'] ['list'] ['list'] [['list']] {'key' : ['list']}" + }, + { + "line": "Message: {'dict' : 'value'} {'dict' : 'value'} {'dict' : 'value'} [{'dict' : 'value'}] {'key' : {'dict' : 'value'}}" + }, + { + "line": "Message: " + } + ] + } diff --git a/test cases/common/266 install functions and follow_symlinks/foo/file1 b/test cases/common/266 install functions and follow_symlinks/foo/file1 deleted file mode 100644 index 9daeafb98..000000000 --- a/test cases/common/266 install functions and follow_symlinks/foo/file1 +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/test cases/common/266 install functions and follow_symlinks/foo/link1 b/test cases/common/266 install functions and follow_symlinks/foo/link1 deleted file mode 120000 index 08219db9b..000000000 --- a/test cases/common/266 install functions and follow_symlinks/foo/link1 +++ /dev/null @@ -1 +0,0 @@ -file1 \ No newline at end of file diff --git a/test cases/common/266 install functions and follow_symlinks/foo/link2.h b/test cases/common/266 install functions and follow_symlinks/foo/link2.h deleted file mode 120000 index 08219db9b..000000000 --- a/test cases/common/266 install functions and follow_symlinks/foo/link2.h +++ /dev/null @@ -1 +0,0 @@ -file1 \ No newline at end of file diff --git a/test cases/common/266 install functions and follow_symlinks/meson.build b/test cases/common/266 install functions and follow_symlinks/meson.build deleted file mode 100644 index 327c02131..000000000 --- a/test cases/common/266 install functions and follow_symlinks/meson.build +++ /dev/null @@ -1,38 +0,0 @@ -project('install_data following symlinks') - -install_data( - 'foo/link1', - install_dir: get_option('datadir') / 'followed', - follow_symlinks: true, -) - -install_headers( - 'foo/link2.h', - follow_symlinks: true, - subdir: 'followed' -) - -install_data( - 'foo/link1', - install_dir: get_option('datadir'), - follow_symlinks: false, -) - -install_headers( - 'foo/link2.h', - follow_symlinks: false, -) - -install_subdir( - 'foo', - install_dir: get_option('datadir') / 'subdir', - strip_directory: true, - follow_symlinks: false, -) - -install_subdir( - 'foo', - install_dir: get_option('datadir') / 'subdir_followed', - strip_directory: true, - follow_symlinks: true, -) diff --git a/test cases/common/266 install functions and follow_symlinks/test.json b/test cases/common/266 install functions and follow_symlinks/test.json deleted file mode 100644 index 6a395177d..000000000 --- a/test cases/common/266 install functions and follow_symlinks/test.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "installed": [ - {"type": "link", "file": "usr/share/link1"}, - {"type": "link", "file": "usr/include/link2.h"}, - {"type": "file", "file": "usr/share/followed/link1"}, - {"type": "file", "file": "usr/include/followed/link2.h"}, - {"type": "link", "file": "usr/share/subdir/link1"}, - {"type": "link", "file": "usr/share/subdir/link2.h"}, - {"type": "file", "file": "usr/share/subdir/file1"}, - {"type": "file", "file": "usr/share/subdir_followed/link1"}, - {"type": "file", "file": "usr/share/subdir_followed/link2.h"}, - {"type": "file", "file": "usr/share/subdir_followed/file1"} - ] -} diff --git a/test cases/common/267 default_options in find_program/meson.build b/test cases/common/267 default_options in find_program/meson.build new file mode 100644 index 000000000..99d842592 --- /dev/null +++ b/test cases/common/267 default_options in find_program/meson.build @@ -0,0 +1,5 @@ +project('test default_options in find_program') + +dummy_exe = find_program('dummy', default_options: ['subproject_option=true']) + +test('test_dummy', dummy_exe) diff --git a/test cases/common/267 default_options in find_program/subprojects/dummy.wrap b/test cases/common/267 default_options in find_program/subprojects/dummy.wrap new file mode 100644 index 000000000..0c03eec44 --- /dev/null +++ b/test cases/common/267 default_options in find_program/subprojects/dummy.wrap @@ -0,0 +1,5 @@ +[wrap-file] +directory = dummy + +[provide] +program_names = dummy \ No newline at end of file diff --git a/test cases/common/267 default_options in find_program/subprojects/dummy/dummy.c b/test cases/common/267 default_options in find_program/subprojects/dummy/dummy.c new file mode 100644 index 000000000..a51103c3c --- /dev/null +++ b/test cases/common/267 default_options in find_program/subprojects/dummy/dummy.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} \ No newline at end of file diff --git a/test cases/common/267 default_options in find_program/subprojects/dummy/meson.build b/test cases/common/267 default_options in find_program/subprojects/dummy/meson.build new file mode 100644 index 000000000..b6441307f --- /dev/null +++ b/test cases/common/267 default_options in find_program/subprojects/dummy/meson.build @@ -0,0 +1,6 @@ +project('dummy', 'c') + +if get_option('subproject_option') + dummy_exe = executable('dummy', 'dummy.c') + meson.override_find_program('dummy', dummy_exe) +endif diff --git a/test cases/common/267 default_options in find_program/subprojects/dummy/meson_options.txt b/test cases/common/267 default_options in find_program/subprojects/dummy/meson_options.txt new file mode 100644 index 000000000..c91a24af7 --- /dev/null +++ b/test cases/common/267 default_options in find_program/subprojects/dummy/meson_options.txt @@ -0,0 +1 @@ +option('subproject_option', type: 'boolean', value: false) diff --git a/test cases/common/268 install functions and follow_symlinks/foo/file1 b/test cases/common/268 install functions and follow_symlinks/foo/file1 new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/test cases/common/268 install functions and follow_symlinks/foo/file1 @@ -0,0 +1 @@ +test diff --git a/test cases/common/268 install functions and follow_symlinks/foo/link1 b/test cases/common/268 install functions and follow_symlinks/foo/link1 new file mode 120000 index 000000000..08219db9b --- /dev/null +++ b/test cases/common/268 install functions and follow_symlinks/foo/link1 @@ -0,0 +1 @@ +file1 \ No newline at end of file diff --git a/test cases/common/268 install functions and follow_symlinks/foo/link2.h b/test cases/common/268 install functions and follow_symlinks/foo/link2.h new file mode 120000 index 000000000..08219db9b --- /dev/null +++ b/test cases/common/268 install functions and follow_symlinks/foo/link2.h @@ -0,0 +1 @@ +file1 \ No newline at end of file diff --git a/test cases/common/268 install functions and follow_symlinks/meson.build b/test cases/common/268 install functions and follow_symlinks/meson.build new file mode 100644 index 000000000..327c02131 --- /dev/null +++ b/test cases/common/268 install functions and follow_symlinks/meson.build @@ -0,0 +1,38 @@ +project('install_data following symlinks') + +install_data( + 'foo/link1', + install_dir: get_option('datadir') / 'followed', + follow_symlinks: true, +) + +install_headers( + 'foo/link2.h', + follow_symlinks: true, + subdir: 'followed' +) + +install_data( + 'foo/link1', + install_dir: get_option('datadir'), + follow_symlinks: false, +) + +install_headers( + 'foo/link2.h', + follow_symlinks: false, +) + +install_subdir( + 'foo', + install_dir: get_option('datadir') / 'subdir', + strip_directory: true, + follow_symlinks: false, +) + +install_subdir( + 'foo', + install_dir: get_option('datadir') / 'subdir_followed', + strip_directory: true, + follow_symlinks: true, +) diff --git a/test cases/common/268 install functions and follow_symlinks/test.json b/test cases/common/268 install functions and follow_symlinks/test.json new file mode 100644 index 000000000..6a395177d --- /dev/null +++ b/test cases/common/268 install functions and follow_symlinks/test.json @@ -0,0 +1,14 @@ +{ + "installed": [ + {"type": "link", "file": "usr/share/link1"}, + {"type": "link", "file": "usr/include/link2.h"}, + {"type": "file", "file": "usr/share/followed/link1"}, + {"type": "file", "file": "usr/include/followed/link2.h"}, + {"type": "link", "file": "usr/share/subdir/link1"}, + {"type": "link", "file": "usr/share/subdir/link2.h"}, + {"type": "file", "file": "usr/share/subdir/file1"}, + {"type": "file", "file": "usr/share/subdir_followed/link1"}, + {"type": "file", "file": "usr/share/subdir_followed/link2.h"}, + {"type": "file", "file": "usr/share/subdir_followed/file1"} + ] +} diff --git a/test cases/common/271 env in generator.process/generate_main.py b/test cases/common/271 env in generator.process/generate_main.py new file mode 100644 index 000000000..993c5ac03 --- /dev/null +++ b/test cases/common/271 env in generator.process/generate_main.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 +import os +import sys + +ENV_VAR_VALUE = os.environ.get('ENV_VAR_VALUE') +assert ENV_VAR_VALUE is not None + +with open(sys.argv[1], 'r') as infile, \ + open(sys.argv[2], 'w') as outfile: + + outfile.write(infile.read().replace('ENV_VAR_VALUE', ENV_VAR_VALUE)) diff --git a/test cases/common/271 env in generator.process/main.template b/test cases/common/271 env in generator.process/main.template new file mode 100644 index 000000000..3c3340efc --- /dev/null +++ b/test cases/common/271 env in generator.process/main.template @@ -0,0 +1,3 @@ +int main(void) { + return ENV_VAR_VALUE; +} \ No newline at end of file diff --git a/test cases/common/271 env in generator.process/meson.build b/test cases/common/271 env in generator.process/meson.build new file mode 100644 index 000000000..5d7404024 --- /dev/null +++ b/test cases/common/271 env in generator.process/meson.build @@ -0,0 +1,21 @@ +project('test_env_in_generator_process', 'c') + +generate_main_py = find_program('generate_main.py') + +main_generator = generator(generate_main_py, + arguments: ['@INPUT@', '@OUTPUT@'], + output: '@BASENAME@' + '.c' +) + +main_template = files('main.template') + +# With explicit values +my_executable = executable('myexecutable', main_generator.process(main_template, env: {'ENV_VAR_VALUE': '0'})) +test('explicit_value', my_executable) + +# With env object +env = environment() +env.set('ENV_VAR_VALUE', '0') + +my_executable2 = executable('myexecutable2', main_generator.process(main_template, env: env)) +test('env_object', my_executable2) diff --git a/test cases/common/272 env in generator.process/generate_main.py b/test cases/common/272 env in generator.process/generate_main.py deleted file mode 100644 index 993c5ac03..000000000 --- a/test cases/common/272 env in generator.process/generate_main.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 -import os -import sys - -ENV_VAR_VALUE = os.environ.get('ENV_VAR_VALUE') -assert ENV_VAR_VALUE is not None - -with open(sys.argv[1], 'r') as infile, \ - open(sys.argv[2], 'w') as outfile: - - outfile.write(infile.read().replace('ENV_VAR_VALUE', ENV_VAR_VALUE)) diff --git a/test cases/common/272 env in generator.process/main.template b/test cases/common/272 env in generator.process/main.template deleted file mode 100644 index 3c3340efc..000000000 --- a/test cases/common/272 env in generator.process/main.template +++ /dev/null @@ -1,3 +0,0 @@ -int main(void) { - return ENV_VAR_VALUE; -} \ No newline at end of file diff --git a/test cases/common/272 env in generator.process/meson.build b/test cases/common/272 env in generator.process/meson.build deleted file mode 100644 index 5d7404024..000000000 --- a/test cases/common/272 env in generator.process/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -project('test_env_in_generator_process', 'c') - -generate_main_py = find_program('generate_main.py') - -main_generator = generator(generate_main_py, - arguments: ['@INPUT@', '@OUTPUT@'], - output: '@BASENAME@' + '.c' -) - -main_template = files('main.template') - -# With explicit values -my_executable = executable('myexecutable', main_generator.process(main_template, env: {'ENV_VAR_VALUE': '0'})) -test('explicit_value', my_executable) - -# With env object -env = environment() -env.set('ENV_VAR_VALUE', '0') - -my_executable2 = executable('myexecutable2', main_generator.process(main_template, env: env)) -test('env_object', my_executable2) diff --git a/test cases/failing/100 bool in combo/meson.build b/test cases/failing/100 bool in combo/meson.build new file mode 100644 index 000000000..c5efd67ea --- /dev/null +++ b/test cases/failing/100 bool in combo/meson.build @@ -0,0 +1 @@ +project('bool in combo') diff --git a/test cases/failing/100 bool in combo/meson_options.txt b/test cases/failing/100 bool in combo/meson_options.txt new file mode 100644 index 000000000..0c8f5de00 --- /dev/null +++ b/test cases/failing/100 bool in combo/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'opt', + type : 'combo', + choices : ['true', 'false'] +) diff --git a/test cases/failing/100 bool in combo/nativefile.ini b/test cases/failing/100 bool in combo/nativefile.ini new file mode 100644 index 000000000..b423957cf --- /dev/null +++ b/test cases/failing/100 bool in combo/nativefile.ini @@ -0,0 +1,2 @@ +[project options] +opt = true diff --git a/test cases/failing/100 bool in combo/test.json b/test cases/failing/100 bool in combo/test.json new file mode 100644 index 000000000..357d7a875 --- /dev/null +++ b/test cases/failing/100 bool in combo/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "test cases/failing/100 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/100 no glib-compile-resources/meson.build b/test cases/failing/100 no glib-compile-resources/meson.build deleted file mode 100644 index aae0569da..000000000 --- a/test cases/failing/100 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/100 no glib-compile-resources/test.json b/test cases/failing/100 no glib-compile-resources/test.json deleted file mode 100644 index b9f5fdcf8..000000000 --- a/test cases/failing/100 no glib-compile-resources/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/100 no glib-compile-resources/meson.build:8:12: 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 deleted file mode 100644 index 1447b984d..000000000 --- a/test cases/failing/100 no glib-compile-resources/trivial.gresource.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/test cases/failing/101 compiler no lang/meson.build b/test cases/failing/101 compiler no lang/meson.build new file mode 100644 index 000000000..366bbdd5d --- /dev/null +++ b/test cases/failing/101 compiler no lang/meson.build @@ -0,0 +1,2 @@ +project('compiler without lang') +meson.get_compiler('c') diff --git a/test cases/failing/101 compiler no lang/test.json b/test cases/failing/101 compiler no lang/test.json new file mode 100644 index 000000000..364efa9e8 --- /dev/null +++ b/test cases/failing/101 compiler no lang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/101 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/101 number in combo/meson.build b/test cases/failing/101 number in combo/meson.build deleted file mode 100644 index 1a647df1a..000000000 --- a/test cases/failing/101 number in combo/meson.build +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 55f10fc20..000000000 --- a/test cases/failing/101 number in combo/nativefile.ini +++ /dev/null @@ -1,2 +0,0 @@ -[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 deleted file mode 100644 index 4c30f9800..000000000 --- a/test cases/failing/101 number in combo/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "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): \"plain\", \"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 deleted file mode 100644 index c5efd67ea..000000000 --- a/test cases/failing/102 bool in combo/meson.build +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0c8f5de00..000000000 --- a/test cases/failing/102 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/102 bool in combo/nativefile.ini b/test cases/failing/102 bool in combo/nativefile.ini deleted file mode 100644 index b423957cf..000000000 --- a/test cases/failing/102 bool in combo/nativefile.ini +++ /dev/null @@ -1,2 +0,0 @@ -[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 deleted file mode 100644 index c0041afec..000000000 --- a/test cases/failing/102 bool in combo/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "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 no fallback/meson.build b/test cases/failing/102 no fallback/meson.build new file mode 100644 index 000000000..91d6b9370 --- /dev/null +++ b/test cases/failing/102 no fallback/meson.build @@ -0,0 +1,2 @@ +project('no fallback') +foob_dep = dependency('foob', allow_fallback: false, required: true) diff --git a/test cases/failing/102 no fallback/subprojects/foob/meson.build b/test cases/failing/102 no fallback/subprojects/foob/meson.build new file mode 100644 index 000000000..b2c4814e2 --- /dev/null +++ b/test cases/failing/102 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/102 no fallback/test.json b/test cases/failing/102 no fallback/test.json new file mode 100644 index 000000000..5fbffe35d --- /dev/null +++ b/test cases/failing/102 no fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:11: ERROR: (Pkg-config binary for machine MachineChoice\\.HOST not found\\. Giving up\\.|Dependency \"foob\" not found, tried .*)" + } + ] +} diff --git a/test cases/failing/103 compiler no lang/meson.build b/test cases/failing/103 compiler no lang/meson.build deleted file mode 100644 index 366bbdd5d..000000000 --- a/test cases/failing/103 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/103 compiler no lang/test.json b/test cases/failing/103 compiler no lang/test.json deleted file mode 100644 index 123dcb9c3..000000000 --- a/test cases/failing/103 compiler no lang/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/103 feature require/meson.build b/test cases/failing/103 feature require/meson.build new file mode 100644 index 000000000..8c47e3763 --- /dev/null +++ b/test cases/failing/103 feature require/meson.build @@ -0,0 +1,2 @@ +project('no fallback') +foo = get_option('reqfeature').require(false, error_message: 'frobnicator not available') diff --git a/test cases/failing/103 feature require/meson_options.txt b/test cases/failing/103 feature require/meson_options.txt new file mode 100644 index 000000000..5910a8737 --- /dev/null +++ b/test cases/failing/103 feature require/meson_options.txt @@ -0,0 +1 @@ +option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/103 feature require/test.json b/test cases/failing/103 feature require/test.json new file mode 100644 index 000000000..2da54948f --- /dev/null +++ b/test cases/failing/103 feature require/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:31: ERROR: Feature reqfeature cannot be enabled: frobnicator not available" + } + ] +} diff --git a/test cases/failing/104 feature require.bis/meson.build b/test cases/failing/104 feature require.bis/meson.build new file mode 100644 index 000000000..4ea65e5e0 --- /dev/null +++ b/test cases/failing/104 feature require.bis/meson.build @@ -0,0 +1,2 @@ +project('no fallback') +foo = get_option('reqfeature').require(false) diff --git a/test cases/failing/104 feature require.bis/meson_options.txt b/test cases/failing/104 feature require.bis/meson_options.txt new file mode 100644 index 000000000..5910a8737 --- /dev/null +++ b/test cases/failing/104 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/104 feature require.bis/test.json b/test cases/failing/104 feature require.bis/test.json new file mode 100644 index 000000000..ed488affd --- /dev/null +++ b/test cases/failing/104 feature require.bis/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": ".*/meson\\.build:2:31: ERROR: Feature reqfeature cannot be enabled" + } + ] +} diff --git a/test cases/failing/104 no fallback/meson.build b/test cases/failing/104 no fallback/meson.build deleted file mode 100644 index 91d6b9370..000000000 --- a/test cases/failing/104 no fallback/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback') -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 deleted file mode 100644 index b2c4814e2..000000000 --- a/test cases/failing/104 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/104 no fallback/test.json b/test cases/failing/104 no fallback/test.json deleted file mode 100644 index 5fbffe35d..000000000 --- a/test cases/failing/104 no fallback/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:11: 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 deleted file mode 100644 index 8c47e3763..000000000 --- a/test cases/failing/105 feature require/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback') -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 deleted file mode 100644 index 5910a8737..000000000 --- a/test cases/failing/105 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/105 feature require/test.json b/test cases/failing/105 feature require/test.json deleted file mode 100644 index 2da54948f..000000000 --- a/test cases/failing/105 feature require/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:31: ERROR: Feature reqfeature cannot be enabled: frobnicator not available" - } - ] -} diff --git a/test cases/failing/105 no build get_external_property/meson.build b/test cases/failing/105 no build get_external_property/meson.build new file mode 100644 index 000000000..8a4215c9f --- /dev/null +++ b/test cases/failing/105 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/105 no build get_external_property/test.json b/test cases/failing/105 no build get_external_property/test.json new file mode 100644 index 000000000..e8b282c6f --- /dev/null +++ b/test cases/failing/105 no build get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/105 no build get_external_property/meson.build:3:14: ERROR: Unknown property for build machine: nonexisting" + } + ] +} diff --git a/test cases/failing/106 enter subdir twice/meson.build b/test cases/failing/106 enter subdir twice/meson.build new file mode 100644 index 000000000..d9bf9f56b --- /dev/null +++ b/test cases/failing/106 enter subdir twice/meson.build @@ -0,0 +1,3 @@ +project('subdir2') +subdir('sub') +subdir('sub') diff --git a/test cases/failing/106 enter subdir twice/sub/meson.build b/test cases/failing/106 enter subdir twice/sub/meson.build new file mode 100644 index 000000000..d036a3fe5 --- /dev/null +++ b/test cases/failing/106 enter subdir twice/sub/meson.build @@ -0,0 +1 @@ +message('Now in subdir') diff --git a/test cases/failing/106 enter subdir twice/test.json b/test cases/failing/106 enter subdir twice/test.json new file mode 100644 index 000000000..9a8b11d06 --- /dev/null +++ b/test cases/failing/106 enter subdir twice/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/106 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." + } + ] +} diff --git a/test cases/failing/106 feature require.bis/meson.build b/test cases/failing/106 feature require.bis/meson.build deleted file mode 100644 index 4ea65e5e0..000000000 --- a/test cases/failing/106 feature require.bis/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('no fallback') -foo = get_option('reqfeature').require(false) diff --git a/test cases/failing/106 feature require.bis/meson_options.txt b/test cases/failing/106 feature require.bis/meson_options.txt deleted file mode 100644 index 5910a8737..000000000 --- a/test cases/failing/106 feature require.bis/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('reqfeature', type : 'feature', value : 'enabled', description : 'A required feature') diff --git a/test cases/failing/106 feature require.bis/test.json b/test cases/failing/106 feature require.bis/test.json deleted file mode 100644 index ed488affd..000000000 --- a/test cases/failing/106 feature require.bis/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": ".*/meson\\.build:2:31: ERROR: Feature reqfeature cannot be enabled" - } - ] -} diff --git a/test cases/failing/107 invalid fstring/109 invalid fstring/meson.build b/test cases/failing/107 invalid fstring/109 invalid fstring/meson.build new file mode 100644 index 000000000..dd22f56b2 --- /dev/null +++ b/test cases/failing/107 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/107 invalid fstring/109 invalid fstring/test.json b/test cases/failing/107 invalid fstring/109 invalid fstring/test.json new file mode 100644 index 000000000..71d8f5927 --- /dev/null +++ b/test cases/failing/107 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/107 invalid fstring/meson.build b/test cases/failing/107 invalid fstring/meson.build new file mode 100644 index 000000000..7eb3ccf5c --- /dev/null +++ b/test cases/failing/107 invalid fstring/meson.build @@ -0,0 +1,3 @@ +project('invalid-fstring') + +z = f'invalid fstring: @foo@' diff --git a/test cases/failing/107 invalid fstring/test.json b/test cases/failing/107 invalid fstring/test.json new file mode 100644 index 000000000..ccd82b574 --- /dev/null +++ b/test cases/failing/107 invalid fstring/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/107 invalid fstring/meson.build:3:4: ERROR: Identifier \"foo\" does not name a variable." + } + ] +} diff --git a/test cases/failing/107 no build get_external_property/meson.build b/test cases/failing/107 no build get_external_property/meson.build deleted file mode 100644 index 8a4215c9f..000000000 --- a/test cases/failing/107 no build get_external_property/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('missing property') - -message(meson.get_external_property('nonexisting', native : true)) diff --git a/test cases/failing/107 no build get_external_property/test.json b/test cases/failing/107 no build get_external_property/test.json deleted file mode 100644 index ff7438669..000000000 --- a/test cases/failing/107 no build get_external_property/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/107 no build get_external_property/meson.build:3:14: ERROR: Unknown property for build machine: nonexisting" - } - ] -} diff --git a/test cases/failing/108 compiler argument checking/meson.build b/test cases/failing/108 compiler argument checking/meson.build new file mode 100644 index 000000000..bb1f44768 --- /dev/null +++ b/test cases/failing/108 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/108 compiler argument checking/test.json b/test cases/failing/108 compiler argument checking/test.json new file mode 100644 index 000000000..e9e27af57 --- /dev/null +++ b/test cases/failing/108 compiler argument checking/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/108 compiler argument checking/meson.build:4:25: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" + } + ] +} diff --git a/test cases/failing/108 enter subdir twice/meson.build b/test cases/failing/108 enter subdir twice/meson.build deleted file mode 100644 index d9bf9f56b..000000000 --- a/test cases/failing/108 enter subdir twice/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('subdir2') -subdir('sub') -subdir('sub') diff --git a/test cases/failing/108 enter subdir twice/sub/meson.build b/test cases/failing/108 enter subdir twice/sub/meson.build deleted file mode 100644 index d036a3fe5..000000000 --- a/test cases/failing/108 enter subdir twice/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -message('Now in subdir') diff --git a/test cases/failing/108 enter subdir twice/test.json b/test cases/failing/108 enter subdir twice/test.json deleted file mode 100644 index 0a8e12769..000000000 --- a/test cases/failing/108 enter subdir twice/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/108 enter subdir twice/meson.build:3:0: ERROR: Tried to enter directory \"sub\", which has already been visited." - } - ] -} diff --git a/test cases/failing/109 empty fallback/meson.build b/test cases/failing/109 empty fallback/meson.build new file mode 100644 index 000000000..f4eb5feb9 --- /dev/null +++ b/test cases/failing/109 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/109 empty fallback/subprojects/foo/meson.build b/test cases/failing/109 empty fallback/subprojects/foo/meson.build new file mode 100644 index 000000000..c9e134b5e --- /dev/null +++ b/test cases/failing/109 empty fallback/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo') + +meson.override_dependency('foo', declare_dependency()) diff --git a/test cases/failing/109 empty fallback/test.json b/test cases/failing/109 empty fallback/test.json new file mode 100644 index 000000000..46a4ec514 --- /dev/null +++ b/test cases/failing/109 empty fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/109 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found.*" + } + ] +} 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 deleted file mode 100644 index dd22f56b2..000000000 --- a/test cases/failing/109 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/109 invalid fstring/109 invalid fstring/test.json b/test cases/failing/109 invalid fstring/109 invalid fstring/test.json deleted file mode 100644 index 71d8f5927..000000000 --- a/test cases/failing/109 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/109 invalid fstring/meson.build b/test cases/failing/109 invalid fstring/meson.build deleted file mode 100644 index 7eb3ccf5c..000000000 --- a/test cases/failing/109 invalid fstring/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('invalid-fstring') - -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 deleted file mode 100644 index 580d08721..000000000 --- a/test cases/failing/109 invalid fstring/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/109 invalid fstring/meson.build:3:4: ERROR: Identifier \"foo\" does not name a variable." - } - ] -} diff --git a/test cases/failing/110 cmake executable dependency/meson.build b/test cases/failing/110 cmake executable dependency/meson.build new file mode 100644 index 000000000..48d8fcbb6 --- /dev/null +++ b/test cases/failing/110 cmake executable dependency/meson.build @@ -0,0 +1,9 @@ +project('cmake-executable-dependency', 'c') + +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/110 cmake executable dependency/subprojects/cmlib/CMakeLists.txt b/test cases/failing/110 cmake executable dependency/subprojects/cmlib/CMakeLists.txt new file mode 100644 index 000000000..006787986 --- /dev/null +++ b/test cases/failing/110 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/110 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/110 cmake executable dependency/subprojects/cmlib/main.c new file mode 100644 index 000000000..9b6bdc2ec --- /dev/null +++ b/test cases/failing/110 cmake executable dependency/subprojects/cmlib/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/110 cmake executable dependency/test.json b/test cases/failing/110 cmake executable dependency/test.json new file mode 100644 index 000000000..80d01fe0d --- /dev/null +++ b/test cases/failing/110 cmake executable dependency/test.json @@ -0,0 +1,10 @@ +{ + "stdout": [ + { + "line": "test cases/failing/110 cmake executable dependency/meson.build:9:14: 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/110 compiler argument checking/meson.build b/test cases/failing/110 compiler argument checking/meson.build deleted file mode 100644 index bb1f44768..000000000 --- a/test cases/failing/110 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/110 compiler argument checking/test.json b/test cases/failing/110 compiler argument checking/test.json deleted file mode 100644 index f60c014ce..000000000 --- a/test cases/failing/110 compiler argument checking/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/110 compiler argument checking/meson.build:4:25: ERROR: Compiler for C does not support \"-meson-goober-arg-for-testing\"" - } - ] -} diff --git a/test cases/failing/111 allow_fallback with fallback/meson.build b/test cases/failing/111 allow_fallback with fallback/meson.build new file mode 100644 index 000000000..2874e424c --- /dev/null +++ b/test cases/failing/111 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/111 allow_fallback with fallback/test.json b/test cases/failing/111 allow_fallback with fallback/test.json new file mode 100644 index 000000000..92aa19af3 --- /dev/null +++ b/test cases/failing/111 allow_fallback with fallback/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/111 allow_fallback with fallback/meson.build:3:0: ERROR: \"fallback\" and \"allow_fallback\" arguments are mutually exclusive" + } + ] +} + diff --git a/test cases/failing/111 empty fallback/meson.build b/test cases/failing/111 empty fallback/meson.build deleted file mode 100644 index f4eb5feb9..000000000 --- a/test cases/failing/111 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/111 empty fallback/subprojects/foo/meson.build b/test cases/failing/111 empty fallback/subprojects/foo/meson.build deleted file mode 100644 index c9e134b5e..000000000 --- a/test cases/failing/111 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/111 empty fallback/test.json b/test cases/failing/111 empty fallback/test.json deleted file mode 100644 index 022e747ff..000000000 --- a/test cases/failing/111 empty fallback/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": "test cases/failing/111 empty fallback/meson.build:6:0: ERROR: Dependency \"foo\" not found.*" - } - ] -} diff --git a/test cases/failing/112 cmake executable dependency/meson.build b/test cases/failing/112 cmake executable dependency/meson.build deleted file mode 100644 index 48d8fcbb6..000000000 --- a/test cases/failing/112 cmake executable dependency/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('cmake-executable-dependency', 'c') - -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 deleted file mode 100644 index 006787986..000000000 --- a/test cases/failing/112 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/112 cmake executable dependency/subprojects/cmlib/main.c b/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c deleted file mode 100644 index 9b6bdc2ec..000000000 --- a/test cases/failing/112 cmake executable dependency/subprojects/cmlib/main.c +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index d425fa292..000000000 --- a/test cases/failing/112 cmake executable dependency/test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/112 cmake executable dependency/meson.build:9:14: 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 nonsensical bindgen/meson.build b/test cases/failing/112 nonsensical bindgen/meson.build new file mode 100644 index 000000000..6995f672c --- /dev/null +++ b/test cases/failing/112 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/112 nonsensical bindgen/src/header.h b/test cases/failing/112 nonsensical bindgen/src/header.h new file mode 100644 index 000000000..750621f87 --- /dev/null +++ b/test cases/failing/112 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/112 nonsensical bindgen/src/source.c b/test cases/failing/112 nonsensical bindgen/src/source.c new file mode 100644 index 000000000..d652d28b9 --- /dev/null +++ b/test cases/failing/112 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/112 nonsensical bindgen/test.json b/test cases/failing/112 nonsensical bindgen/test.json new file mode 100644 index 000000000..a2b4b7196 --- /dev/null +++ b/test cases/failing/112 nonsensical bindgen/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/112 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/113 allow_fallback with fallback/meson.build b/test cases/failing/113 allow_fallback with fallback/meson.build deleted file mode 100644 index 2874e424c..000000000 --- a/test cases/failing/113 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/113 allow_fallback with fallback/test.json b/test cases/failing/113 allow_fallback with fallback/test.json deleted file mode 100644 index 58ed475c0..000000000 --- a/test cases/failing/113 allow_fallback with fallback/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "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 run_target in test/meson.build b/test cases/failing/113 run_target in test/meson.build new file mode 100644 index 000000000..117009e3f --- /dev/null +++ b/test cases/failing/113 run_target in test/meson.build @@ -0,0 +1,7 @@ +project('trivial test', 'c') + +python = find_program('python3') + +exe = executable('trivialprog', 'trivial.c') +runt = run_target('invalid', command: [python, '--version']) +test('runtest', exe, args: runt) diff --git a/test cases/failing/113 run_target in test/test.json b/test cases/failing/113 run_target in test/test.json new file mode 100644 index 000000000..0e1ded4ea --- /dev/null +++ b/test cases/failing/113 run_target in test/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/113 run_target in test/meson.build:7: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/113 run_target in test/trivial.c b/test cases/failing/113 run_target in test/trivial.c new file mode 100644 index 000000000..96612d48b --- /dev/null +++ b/test cases/failing/113 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/114 nonsensical bindgen/meson.build b/test cases/failing/114 nonsensical bindgen/meson.build deleted file mode 100644 index 6995f672c..000000000 --- a/test cases/failing/114 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/114 nonsensical bindgen/src/header.h b/test cases/failing/114 nonsensical bindgen/src/header.h deleted file mode 100644 index 750621f87..000000000 --- a/test cases/failing/114 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/114 nonsensical bindgen/src/source.c b/test cases/failing/114 nonsensical bindgen/src/source.c deleted file mode 100644 index d652d28b9..000000000 --- a/test cases/failing/114 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/114 nonsensical bindgen/test.json b/test cases/failing/114 nonsensical bindgen/test.json deleted file mode 100644 index bc85311ab..000000000 --- a/test cases/failing/114 nonsensical bindgen/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "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/114 run_target in add_install_script/meson.build b/test cases/failing/114 run_target in add_install_script/meson.build new file mode 100644 index 000000000..d3634bfb5 --- /dev/null +++ b/test cases/failing/114 run_target in add_install_script/meson.build @@ -0,0 +1,7 @@ +project('trivial test', 'c') + +python = find_program('python3') + +exe = executable('trivialprog', 'trivial.c') +runt = run_target('invalid', command: [python, '--version']) +meson.add_install_script(exe, runt) diff --git a/test cases/failing/114 run_target in add_install_script/test.json b/test cases/failing/114 run_target in add_install_script/test.json new file mode 100644 index 000000000..0b28f9b15 --- /dev/null +++ b/test cases/failing/114 run_target in add_install_script/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/114 run_target in add_install_script/meson.build:7: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/114 run_target in add_install_script/trivial.c b/test cases/failing/114 run_target in add_install_script/trivial.c new file mode 100644 index 000000000..1b14571ed --- /dev/null +++ b/test cases/failing/114 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/115 pathsep in install_symlink/meson.build b/test cases/failing/115 pathsep in install_symlink/meson.build new file mode 100644 index 000000000..cce82c237 --- /dev/null +++ b/test cases/failing/115 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/115 pathsep in install_symlink/test.json b/test cases/failing/115 pathsep in install_symlink/test.json new file mode 100644 index 000000000..fee661f4e --- /dev/null +++ b/test cases/failing/115 pathsep in install_symlink/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/115 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/115 run_target in test/meson.build b/test cases/failing/115 run_target in test/meson.build deleted file mode 100644 index 117009e3f..000000000 --- a/test cases/failing/115 run_target in test/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('trivial test', 'c') - -python = find_program('python3') - -exe = executable('trivialprog', 'trivial.c') -runt = run_target('invalid', command: [python, '--version']) -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 deleted file mode 100644 index 6eddb7c68..000000000 --- a/test cases/failing/115 run_target in test/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/115 run_target in test/meson.build:7: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 deleted file mode 100644 index 96612d48b..000000000 --- a/test cases/failing/115 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/116 run_target in add_install_script/meson.build b/test cases/failing/116 run_target in add_install_script/meson.build deleted file mode 100644 index d3634bfb5..000000000 --- a/test cases/failing/116 run_target in add_install_script/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('trivial test', 'c') - -python = find_program('python3') - -exe = executable('trivialprog', 'trivial.c') -runt = run_target('invalid', command: [python, '--version']) -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 deleted file mode 100644 index 03027e448..000000000 --- a/test cases/failing/116 run_target in add_install_script/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/116 run_target in add_install_script/meson.build:7: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 deleted file mode 100644 index 1b14571ed..000000000 --- a/test cases/failing/116 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/116 subproject version conflict/meson.build b/test cases/failing/116 subproject version conflict/meson.build new file mode 100644 index 000000000..ffbcc13a4 --- /dev/null +++ b/test cases/failing/116 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/116 subproject version conflict/subprojects/A/meson.build b/test cases/failing/116 subproject version conflict/subprojects/A/meson.build new file mode 100644 index 000000000..7da4df0e7 --- /dev/null +++ b/test cases/failing/116 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/116 subproject version conflict/subprojects/B/meson.build b/test cases/failing/116 subproject version conflict/subprojects/B/meson.build new file mode 100644 index 000000000..0ead9349a --- /dev/null +++ b/test cases/failing/116 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/116 subproject version conflict/test.json b/test cases/failing/116 subproject version conflict/test.json new file mode 100644 index 000000000..c82774496 --- /dev/null +++ b/test cases/failing/116 subproject version conflict/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/116 subproject version conflict/meson.build:4:8: ERROR: Subproject B version is 100 but ['1'] required." + } + ] +} diff --git a/test cases/failing/117 pathsep in install_symlink/meson.build b/test cases/failing/117 pathsep in install_symlink/meson.build deleted file mode 100644 index cce82c237..000000000 --- a/test cases/failing/117 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/117 pathsep in install_symlink/test.json b/test cases/failing/117 pathsep in install_symlink/test.json deleted file mode 100644 index aa356194a..000000000 --- a/test cases/failing/117 pathsep in install_symlink/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 structured source empty string/main.rs b/test cases/failing/117 structured source empty string/main.rs new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/117 structured source empty string/meson.build b/test cases/failing/117 structured source empty string/meson.build new file mode 100644 index 000000000..071599147 --- /dev/null +++ b/test cases/failing/117 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/117 structured source empty string/test.json b/test cases/failing/117 structured source empty string/test.json new file mode 100644 index 000000000..7c90b0325 --- /dev/null +++ b/test cases/failing/117 structured source empty string/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/117 structured source empty string/meson.build:9:2: ERROR: structured_sources: keys to dictionary argument may not be an empty string." + } + ] +} diff --git a/test cases/failing/118 structured_sources conflicts/main.rs b/test cases/failing/118 structured_sources conflicts/main.rs new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/118 structured_sources conflicts/meson.build b/test cases/failing/118 structured_sources conflicts/meson.build new file mode 100644 index 000000000..561ad86bc --- /dev/null +++ b/test cases/failing/118 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/118 structured_sources conflicts/test.json b/test cases/failing/118 structured_sources conflicts/test.json new file mode 100644 index 000000000..55b122890 --- /dev/null +++ b/test cases/failing/118 structured_sources conflicts/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/118 structured_sources conflicts/meson.build:7:0: ERROR: Conflicting sources in structured sources: main.rs" + } + ] +} diff --git a/test cases/failing/118 subproject version conflict/meson.build b/test cases/failing/118 subproject version conflict/meson.build deleted file mode 100644 index ffbcc13a4..000000000 --- a/test cases/failing/118 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/118 subproject version conflict/subprojects/A/meson.build b/test cases/failing/118 subproject version conflict/subprojects/A/meson.build deleted file mode 100644 index 7da4df0e7..000000000 --- a/test cases/failing/118 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/118 subproject version conflict/subprojects/B/meson.build b/test cases/failing/118 subproject version conflict/subprojects/B/meson.build deleted file mode 100644 index 0ead9349a..000000000 --- a/test cases/failing/118 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/118 subproject version conflict/test.json b/test cases/failing/118 subproject version conflict/test.json deleted file mode 100644 index 81ef85580..000000000 --- a/test cases/failing/118 subproject version conflict/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/118 subproject version conflict/meson.build:4:8: ERROR: Subproject B version is 100 but ['1'] required." - } - ] -} diff --git a/test cases/failing/119 missing compiler/meson.build b/test cases/failing/119 missing compiler/meson.build new file mode 100644 index 000000000..19bdd0c66 --- /dev/null +++ b/test cases/failing/119 missing compiler/meson.build @@ -0,0 +1,3 @@ +project('main project', 'c') + +subproject('sub') diff --git a/test cases/failing/119 missing compiler/subprojects/sub/main.c b/test cases/failing/119 missing compiler/subprojects/sub/main.c new file mode 100644 index 000000000..44e82e227 --- /dev/null +++ b/test cases/failing/119 missing compiler/subprojects/sub/main.c @@ -0,0 +1 @@ +int main(int argc, char *argv[]) { return 0; } diff --git a/test cases/failing/119 missing compiler/subprojects/sub/meson.build b/test cases/failing/119 missing compiler/subprojects/sub/meson.build new file mode 100644 index 000000000..b60850c9c --- /dev/null +++ b/test cases/failing/119 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/119 missing compiler/test.json b/test cases/failing/119 missing compiler/test.json new file mode 100644 index 000000000..c5f3fb1ca --- /dev/null +++ b/test cases/failing/119 missing compiler/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/119 missing compiler/subprojects/sub/meson.build:4:0: ERROR: No host machine compiler for 'subprojects/sub/main.c'" + } + ] +} diff --git a/test cases/failing/119 structured source empty string/main.rs b/test cases/failing/119 structured source empty string/main.rs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/119 structured source empty string/meson.build b/test cases/failing/119 structured source empty string/meson.build deleted file mode 100644 index 071599147..000000000 --- a/test cases/failing/119 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/119 structured source empty string/test.json b/test cases/failing/119 structured source empty string/test.json deleted file mode 100644 index d1d463e1a..000000000 --- a/test cases/failing/119 structured source empty string/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/119 structured source empty string/meson.build:9:2: ERROR: structured_sources: keys to dictionary argument may not be an empty string." - } - ] -} diff --git a/test cases/failing/120 cmake subproject error/meson.build b/test cases/failing/120 cmake subproject error/meson.build new file mode 100644 index 000000000..a308239fc --- /dev/null +++ b/test cases/failing/120 cmake subproject error/meson.build @@ -0,0 +1,8 @@ +project('cmake-executable-dependency') + +if not find_program('cmake', required: false).found() + error('MESON_SKIP_TEST CMake is not installed') +endif + +cmake = import('cmake') +cmlib = cmake.subproject('cmlib') diff --git a/test cases/failing/120 cmake subproject error/subprojects/cmlib/CMakeLists.txt b/test cases/failing/120 cmake subproject error/subprojects/cmlib/CMakeLists.txt new file mode 100644 index 000000000..edbe39535 --- /dev/null +++ b/test cases/failing/120 cmake subproject error/subprojects/cmlib/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.5) + +project(cmlib) + +message(FATAL_ERROR "Fancy error message") diff --git a/test cases/failing/120 cmake subproject error/test.json b/test cases/failing/120 cmake subproject error/test.json new file mode 100644 index 000000000..d88e708bf --- /dev/null +++ b/test cases/failing/120 cmake subproject error/test.json @@ -0,0 +1,10 @@ +{ + "stdout": [ + { + "line": "test cases/failing/120 cmake subproject error/meson.build:8:14: ERROR: Failed to configure the CMake subproject: Fancy error message" + } + ], + "tools": { + "cmake": ">=3.14" + } +} diff --git a/test cases/failing/120 structured_sources conflicts/main.rs b/test cases/failing/120 structured_sources conflicts/main.rs deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/120 structured_sources conflicts/meson.build b/test cases/failing/120 structured_sources conflicts/meson.build deleted file mode 100644 index 561ad86bc..000000000 --- a/test cases/failing/120 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/120 structured_sources conflicts/test.json b/test cases/failing/120 structured_sources conflicts/test.json deleted file mode 100644 index 2f3d1ef0d..000000000 --- a/test cases/failing/120 structured_sources conflicts/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/121 missing compiler/meson.build b/test cases/failing/121 missing compiler/meson.build deleted file mode 100644 index 19bdd0c66..000000000 --- a/test cases/failing/121 missing compiler/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 44e82e227..000000000 --- a/test cases/failing/121 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/121 missing compiler/subprojects/sub/meson.build b/test cases/failing/121 missing compiler/subprojects/sub/meson.build deleted file mode 100644 index b60850c9c..000000000 --- a/test cases/failing/121 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/121 missing compiler/test.json b/test cases/failing/121 missing compiler/test.json deleted file mode 100644 index 442e3312d..000000000 --- a/test cases/failing/121 missing compiler/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 pkgconfig not relocatable outside prefix/meson.build b/test cases/failing/121 pkgconfig not relocatable outside prefix/meson.build new file mode 100644 index 000000000..7ebdfc3fe --- /dev/null +++ b/test cases/failing/121 pkgconfig not relocatable outside prefix/meson.build @@ -0,0 +1,22 @@ +project( + 'pkgconfig-not-relocatable-outside-prefix', + version : '1.0', + default_options: [ + 'pkgconfig.relocatable=true', + ]) + +pkgg = import('pkgconfig') + +# A drive letter is needed on windows for this to be an absolute path. +if host_machine.system() == 'windows' + install_dir = 'C:/opt/lib/pkgconfig' +else + install_dir = '/opt/lib/pkgconfig' +endif + +pkgg.generate( + name : 'libsimple', + version : '1.0', + description : 'A simple pkgconfig file.', + install_dir: install_dir, +) diff --git a/test cases/failing/121 pkgconfig not relocatable outside prefix/test.json b/test cases/failing/121 pkgconfig not relocatable outside prefix/test.json new file mode 100644 index 000000000..c0dfb87e2 --- /dev/null +++ b/test cases/failing/121 pkgconfig not relocatable outside prefix/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "line": "test cases/failing/121 pkgconfig not relocatable outside prefix/meson\\.build:17:5: ERROR: Pkgconfig prefix cannot be outside of the prefix when pkgconfig\\.relocatable=true. Pkgconfig prefix is (C:)?/opt/lib/pkgconfig.", + "match": "re" + } + ] +} diff --git a/test cases/failing/122 cmake subproject error/meson.build b/test cases/failing/122 cmake subproject error/meson.build deleted file mode 100644 index a308239fc..000000000 --- a/test cases/failing/122 cmake subproject error/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('cmake-executable-dependency') - -if not find_program('cmake', required: false).found() - error('MESON_SKIP_TEST CMake is not installed') -endif - -cmake = import('cmake') -cmlib = cmake.subproject('cmlib') diff --git a/test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt b/test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt deleted file mode 100644 index edbe39535..000000000 --- a/test cases/failing/122 cmake subproject error/subprojects/cmlib/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -project(cmlib) - -message(FATAL_ERROR "Fancy error message") diff --git a/test cases/failing/122 cmake subproject error/test.json b/test cases/failing/122 cmake subproject error/test.json deleted file mode 100644 index 57430ebd2..000000000 --- a/test cases/failing/122 cmake subproject error/test.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/122 cmake subproject error/meson.build:8:14: ERROR: Failed to configure the CMake subproject: Fancy error message" - } - ], - "tools": { - "cmake": ">=3.14" - } -} diff --git a/test cases/failing/122 subproject sandbox violation/meson.build b/test cases/failing/122 subproject sandbox violation/meson.build new file mode 100644 index 000000000..d41994c46 --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/meson.build @@ -0,0 +1,34 @@ +project('subproject-sandbox-violation') + +sub1_d = subproject('subproj1').get_variable('d') +sub1_mustfail = sub1_d.get_variable('dir') / '..' / 'file.txt' + +sub2_d = subproject('subproj2').get_variable('d') +sub2_mustfail = sub2_d.get_variable('dir') / 'file.txt' + +main_d = declare_dependency( + variables: [ + 'dir=@0@'.format(meson.current_source_dir()), + ] +) +main_mustfail = main_d.get_variable('dir') / 'subprojects/subproj3/file.txt' + +if get_option('failmode') == 'parent-dir' + mustfail = sub1_mustfail +elif get_option('failmode') == 'not-installed' + mustfail = sub2_mustfail +elif get_option('failmode') == 'root-subdir' + mustfail = main_mustfail +endif + +custom_target( + 'mustfail', + input: mustfail, + output: 'file.txt', + command: [ + 'python3', '-c', + 'import os; shutil.copy(sys.argv[1], sys.argv[2])', + '@INPUT@', + '@OUTPUT@' + ], +) diff --git a/test cases/failing/122 subproject sandbox violation/meson_options.txt b/test cases/failing/122 subproject sandbox violation/meson_options.txt new file mode 100644 index 000000000..e7b782dba --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/meson_options.txt @@ -0,0 +1 @@ +option('failmode', type: 'combo', choices: ['parent-dir', 'not-installed', 'root-subdir']) diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/file.txt b/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/file.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/meson.build b/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/meson.build new file mode 100644 index 000000000..bd33bf38d --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/meson.build @@ -0,0 +1,4 @@ +project('subproj1') + +install_data('file.txt') +subdir('nested') diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/nested/meson.build b/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/nested/meson.build new file mode 100644 index 000000000..038c13906 --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/subprojects/subproj1/nested/meson.build @@ -0,0 +1,5 @@ +d = declare_dependency( + variables: [ + 'dir=@0@'.format(meson.current_source_dir()), + ] +) diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/file.txt b/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/file.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/meson.build b/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/meson.build new file mode 100644 index 000000000..a6032aa74 --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/meson.build @@ -0,0 +1,7 @@ +project('subproj1') + +d = declare_dependency( + variables: [ + 'dir=@0@'.format(meson.current_source_dir()), + ] +) diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/nested/meson.build b/test cases/failing/122 subproject sandbox violation/subprojects/subproj2/nested/meson.build new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj3/file.txt b/test cases/failing/122 subproject sandbox violation/subprojects/subproj3/file.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/122 subproject sandbox violation/subprojects/subproj3/meson.build b/test cases/failing/122 subproject sandbox violation/subprojects/subproj3/meson.build new file mode 100644 index 000000000..c4fa64c1c --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/subprojects/subproj3/meson.build @@ -0,0 +1,3 @@ +project('subproj2') + +install_data('file.txt') diff --git a/test cases/failing/122 subproject sandbox violation/test.json b/test cases/failing/122 subproject sandbox violation/test.json new file mode 100644 index 000000000..4bd402884 --- /dev/null +++ b/test cases/failing/122 subproject sandbox violation/test.json @@ -0,0 +1,16 @@ +{ + "matrix": { + "options": { + "failmode": [ + { "val": "not-installed" }, + { "val": "parent-dir" }, + { "val": "root-subdir" } + ] + } + }, + "stdout": [ + { + "line": "test cases/failing/122 subproject sandbox violation/meson.build:24:0: ERROR: Sandbox violation: Tried to grab file file.txt from a nested subproject." + } + ] +} diff --git a/test cases/failing/123 override and add_project_dependency/inc/lib.h b/test cases/failing/123 override and add_project_dependency/inc/lib.h new file mode 100644 index 000000000..4cfc47e13 --- /dev/null +++ b/test cases/failing/123 override and add_project_dependency/inc/lib.h @@ -0,0 +1,2 @@ +#pragma once +void f(void); diff --git a/test cases/failing/123 override and add_project_dependency/lib.c b/test cases/failing/123 override and add_project_dependency/lib.c new file mode 100644 index 000000000..b8b22a3b7 --- /dev/null +++ b/test cases/failing/123 override and add_project_dependency/lib.c @@ -0,0 +1,3 @@ +#include +#include "lib.h" +void f() {puts("hello");} diff --git a/test cases/failing/123 override and add_project_dependency/meson.build b/test cases/failing/123 override and add_project_dependency/meson.build new file mode 100644 index 000000000..c878b017a --- /dev/null +++ b/test cases/failing/123 override and add_project_dependency/meson.build @@ -0,0 +1,8 @@ +project('super', 'c') + +inc = include_directories('inc') +lib = static_library('sneaky', 'lib.c', include_directories: inc) +meson.override_dependency('sneaky', + declare_dependency(link_with: lib, include_directories: inc)) + +subproject('a') diff --git a/test cases/failing/123 override and add_project_dependency/subprojects/a/meson.build b/test cases/failing/123 override and add_project_dependency/subprojects/a/meson.build new file mode 100644 index 000000000..4f6f0701c --- /dev/null +++ b/test cases/failing/123 override and add_project_dependency/subprojects/a/meson.build @@ -0,0 +1,10 @@ +project('a', 'c') + +dep = dependency('sneaky') + +# does not work +add_project_dependencies(dep, language: 'c') +executable('prog', 'prog.c') + +# this would work instead: +# executable('prog', 'prog.c', dependencies: dep) diff --git a/test cases/failing/123 override and add_project_dependency/subprojects/a/prog.c b/test cases/failing/123 override and add_project_dependency/subprojects/a/prog.c new file mode 100644 index 000000000..ce60f8142 --- /dev/null +++ b/test cases/failing/123 override and add_project_dependency/subprojects/a/prog.c @@ -0,0 +1,6 @@ +#include "lib.h" + +int main() { + f(); + return 0; +} diff --git a/test cases/failing/123 override and add_project_dependency/test.json b/test cases/failing/123 override and add_project_dependency/test.json new file mode 100644 index 000000000..e0a4433cb --- /dev/null +++ b/test cases/failing/123 override and add_project_dependency/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/123 override and add_project_dependency/subprojects/a/meson.build:6:0: ERROR: Dependencies must be external dependencies" + } + ] +} diff --git a/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build b/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build deleted file mode 100644 index 7ebdfc3fe..000000000 --- a/test cases/failing/123 pkgconfig not relocatable outside prefix/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project( - 'pkgconfig-not-relocatable-outside-prefix', - version : '1.0', - default_options: [ - 'pkgconfig.relocatable=true', - ]) - -pkgg = import('pkgconfig') - -# A drive letter is needed on windows for this to be an absolute path. -if host_machine.system() == 'windows' - install_dir = 'C:/opt/lib/pkgconfig' -else - install_dir = '/opt/lib/pkgconfig' -endif - -pkgg.generate( - name : 'libsimple', - version : '1.0', - description : 'A simple pkgconfig file.', - install_dir: install_dir, -) diff --git a/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json b/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json deleted file mode 100644 index 2ca1320d6..000000000 --- a/test cases/failing/123 pkgconfig not relocatable outside prefix/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/123 pkgconfig not relocatable outside prefix/meson\\.build:17:5: ERROR: Pkgconfig prefix cannot be outside of the prefix when pkgconfig\\.relocatable=true. Pkgconfig prefix is (C:)?/opt/lib/pkgconfig.", - "match": "re" - } - ] -} diff --git a/test cases/failing/124 subproject sandbox violation/meson.build b/test cases/failing/124 subproject sandbox violation/meson.build deleted file mode 100644 index d41994c46..000000000 --- a/test cases/failing/124 subproject sandbox violation/meson.build +++ /dev/null @@ -1,34 +0,0 @@ -project('subproject-sandbox-violation') - -sub1_d = subproject('subproj1').get_variable('d') -sub1_mustfail = sub1_d.get_variable('dir') / '..' / 'file.txt' - -sub2_d = subproject('subproj2').get_variable('d') -sub2_mustfail = sub2_d.get_variable('dir') / 'file.txt' - -main_d = declare_dependency( - variables: [ - 'dir=@0@'.format(meson.current_source_dir()), - ] -) -main_mustfail = main_d.get_variable('dir') / 'subprojects/subproj3/file.txt' - -if get_option('failmode') == 'parent-dir' - mustfail = sub1_mustfail -elif get_option('failmode') == 'not-installed' - mustfail = sub2_mustfail -elif get_option('failmode') == 'root-subdir' - mustfail = main_mustfail -endif - -custom_target( - 'mustfail', - input: mustfail, - output: 'file.txt', - command: [ - 'python3', '-c', - 'import os; shutil.copy(sys.argv[1], sys.argv[2])', - '@INPUT@', - '@OUTPUT@' - ], -) diff --git a/test cases/failing/124 subproject sandbox violation/meson_options.txt b/test cases/failing/124 subproject sandbox violation/meson_options.txt deleted file mode 100644 index e7b782dba..000000000 --- a/test cases/failing/124 subproject sandbox violation/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('failmode', type: 'combo', choices: ['parent-dir', 'not-installed', 'root-subdir']) diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/file.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build deleted file mode 100644 index bd33bf38d..000000000 --- a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('subproj1') - -install_data('file.txt') -subdir('nested') diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build deleted file mode 100644 index 038c13906..000000000 --- a/test cases/failing/124 subproject sandbox violation/subprojects/subproj1/nested/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -d = declare_dependency( - variables: [ - 'dir=@0@'.format(meson.current_source_dir()), - ] -) diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/file.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build deleted file mode 100644 index a6032aa74..000000000 --- a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('subproj1') - -d = declare_dependency( - variables: [ - 'dir=@0@'.format(meson.current_source_dir()), - ] -) diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj2/nested/meson.build deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt b/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/file.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build b/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build deleted file mode 100644 index c4fa64c1c..000000000 --- a/test cases/failing/124 subproject sandbox violation/subprojects/subproj3/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('subproj2') - -install_data('file.txt') diff --git a/test cases/failing/124 subproject sandbox violation/test.json b/test cases/failing/124 subproject sandbox violation/test.json deleted file mode 100644 index ca3d142ec..000000000 --- a/test cases/failing/124 subproject sandbox violation/test.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "matrix": { - "options": { - "failmode": [ - { "val": "not-installed" }, - { "val": "parent-dir" }, - { "val": "root-subdir" } - ] - } - }, - "stdout": [ - { - "line": "test cases/failing/124 subproject sandbox violation/meson.build:24:0: ERROR: Sandbox violation: Tried to grab file file.txt from a nested subproject." - } - ] -} diff --git a/test cases/failing/124 targets before add_project_dependency/inc/lib.h b/test cases/failing/124 targets before add_project_dependency/inc/lib.h new file mode 100644 index 000000000..4cfc47e13 --- /dev/null +++ b/test cases/failing/124 targets before add_project_dependency/inc/lib.h @@ -0,0 +1,2 @@ +#pragma once +void f(void); diff --git a/test cases/failing/124 targets before add_project_dependency/lib.c b/test cases/failing/124 targets before add_project_dependency/lib.c new file mode 100644 index 000000000..b8b22a3b7 --- /dev/null +++ b/test cases/failing/124 targets before add_project_dependency/lib.c @@ -0,0 +1,3 @@ +#include +#include "lib.h" +void f() {puts("hello");} diff --git a/test cases/failing/124 targets before add_project_dependency/meson.build b/test cases/failing/124 targets before add_project_dependency/meson.build new file mode 100644 index 000000000..38fe10235 --- /dev/null +++ b/test cases/failing/124 targets before add_project_dependency/meson.build @@ -0,0 +1,5 @@ +project('test', 'c') + +static_library('lib', 'lib.c') +inc = include_directories('inc') +add_project_dependencies(declare_dependency(include_directories: inc), language: 'c') diff --git a/test cases/failing/124 targets before add_project_dependency/test.json b/test cases/failing/124 targets before add_project_dependency/test.json new file mode 100644 index 000000000..d856ba4fd --- /dev/null +++ b/test cases/failing/124 targets before add_project_dependency/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/124 targets before add_project_dependency/meson.build:5:0: ERROR: Tried to use 'add_project_dependencies' after a build target has been declared." + } + ] +} diff --git a/test cases/failing/125 extract from unity/meson.build b/test cases/failing/125 extract from unity/meson.build new file mode 100644 index 000000000..9e3e65f58 --- /dev/null +++ b/test cases/failing/125 extract from unity/meson.build @@ -0,0 +1,4 @@ +project('extract nonexisting gen', 'c') + +lib1 = library('lib1', 'src1.c', 'src2.c', override_options: ['unity=on']) +lib2 = library('lib2', objects: lib1.extract_objects('src1.c')) diff --git a/test cases/failing/125 extract from unity/src1.c b/test cases/failing/125 extract from unity/src1.c new file mode 100644 index 000000000..da971bbf6 --- /dev/null +++ b/test cases/failing/125 extract from unity/src1.c @@ -0,0 +1,3 @@ +int sub_lib_method1() { + return 1337; +} diff --git a/test cases/failing/125 extract from unity/src2.c b/test cases/failing/125 extract from unity/src2.c new file mode 100644 index 000000000..a46166933 --- /dev/null +++ b/test cases/failing/125 extract from unity/src2.c @@ -0,0 +1,3 @@ +int sub_lib_method2() { + return 1337; +} diff --git a/test cases/failing/125 extract from unity/test.json b/test cases/failing/125 extract from unity/test.json new file mode 100644 index 000000000..2f6468d36 --- /dev/null +++ b/test cases/failing/125 extract from unity/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/125 extract from unity/meson.build:4:37: ERROR: Single object files cannot be extracted in Unity builds. You can only extract all the object files for each compiler at once." + } + ] +} diff --git a/test cases/failing/125 override and add_project_dependency/inc/lib.h b/test cases/failing/125 override and add_project_dependency/inc/lib.h deleted file mode 100644 index 4cfc47e13..000000000 --- a/test cases/failing/125 override and add_project_dependency/inc/lib.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -void f(void); diff --git a/test cases/failing/125 override and add_project_dependency/lib.c b/test cases/failing/125 override and add_project_dependency/lib.c deleted file mode 100644 index b8b22a3b7..000000000 --- a/test cases/failing/125 override and add_project_dependency/lib.c +++ /dev/null @@ -1,3 +0,0 @@ -#include -#include "lib.h" -void f() {puts("hello");} diff --git a/test cases/failing/125 override and add_project_dependency/meson.build b/test cases/failing/125 override and add_project_dependency/meson.build deleted file mode 100644 index c878b017a..000000000 --- a/test cases/failing/125 override and add_project_dependency/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('super', 'c') - -inc = include_directories('inc') -lib = static_library('sneaky', 'lib.c', include_directories: inc) -meson.override_dependency('sneaky', - declare_dependency(link_with: lib, include_directories: inc)) - -subproject('a') diff --git a/test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build b/test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build deleted file mode 100644 index 4f6f0701c..000000000 --- a/test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('a', 'c') - -dep = dependency('sneaky') - -# does not work -add_project_dependencies(dep, language: 'c') -executable('prog', 'prog.c') - -# this would work instead: -# executable('prog', 'prog.c', dependencies: dep) diff --git a/test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c b/test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c deleted file mode 100644 index ce60f8142..000000000 --- a/test cases/failing/125 override and add_project_dependency/subprojects/a/prog.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "lib.h" - -int main() { - f(); - return 0; -} diff --git a/test cases/failing/125 override and add_project_dependency/test.json b/test cases/failing/125 override and add_project_dependency/test.json deleted file mode 100644 index df749ec7e..000000000 --- a/test cases/failing/125 override and add_project_dependency/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/125 override and add_project_dependency/subprojects/a/meson.build:6:0: ERROR: Dependencies must be external dependencies" - } - ] -} diff --git a/test cases/failing/126 subproject object as a dependency/main.c b/test cases/failing/126 subproject object as a dependency/main.c new file mode 100644 index 000000000..78f2de106 --- /dev/null +++ b/test cases/failing/126 subproject object as a dependency/main.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/failing/126 subproject object as a dependency/meson.build b/test cases/failing/126 subproject object as a dependency/meson.build new file mode 100644 index 000000000..0114b9a31 --- /dev/null +++ b/test cases/failing/126 subproject object as a dependency/meson.build @@ -0,0 +1,4 @@ +project('test', 'c') + +executable( + 'main', 'main.c', dependencies: subproject('sub')) diff --git a/test cases/failing/126 subproject object as a dependency/subprojects/sub/meson.build b/test cases/failing/126 subproject object as a dependency/subprojects/sub/meson.build new file mode 100644 index 000000000..0adfd6a6e --- /dev/null +++ b/test cases/failing/126 subproject object as a dependency/subprojects/sub/meson.build @@ -0,0 +1 @@ +project('sub') diff --git a/test cases/failing/126 subproject object as a dependency/test.json b/test cases/failing/126 subproject object as a dependency/test.json new file mode 100644 index 000000000..4bf7f5b8b --- /dev/null +++ b/test cases/failing/126 subproject object as a dependency/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/126 subproject object as a dependency/meson.build:3:0: ERROR: Tried to use subproject object as a dependency." + } + ] +} diff --git a/test cases/failing/126 targets before add_project_dependency/inc/lib.h b/test cases/failing/126 targets before add_project_dependency/inc/lib.h deleted file mode 100644 index 4cfc47e13..000000000 --- a/test cases/failing/126 targets before add_project_dependency/inc/lib.h +++ /dev/null @@ -1,2 +0,0 @@ -#pragma once -void f(void); diff --git a/test cases/failing/126 targets before add_project_dependency/lib.c b/test cases/failing/126 targets before add_project_dependency/lib.c deleted file mode 100644 index b8b22a3b7..000000000 --- a/test cases/failing/126 targets before add_project_dependency/lib.c +++ /dev/null @@ -1,3 +0,0 @@ -#include -#include "lib.h" -void f() {puts("hello");} diff --git a/test cases/failing/126 targets before add_project_dependency/meson.build b/test cases/failing/126 targets before add_project_dependency/meson.build deleted file mode 100644 index 38fe10235..000000000 --- a/test cases/failing/126 targets before add_project_dependency/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('test', 'c') - -static_library('lib', 'lib.c') -inc = include_directories('inc') -add_project_dependencies(declare_dependency(include_directories: inc), language: 'c') diff --git a/test cases/failing/126 targets before add_project_dependency/test.json b/test cases/failing/126 targets before add_project_dependency/test.json deleted file mode 100644 index d467914cc..000000000 --- a/test cases/failing/126 targets before add_project_dependency/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/126 targets before add_project_dependency/meson.build:5:0: ERROR: Tried to use 'add_project_dependencies' after a build target has been declared." - } - ] -} diff --git a/test cases/failing/127 extract from unity/meson.build b/test cases/failing/127 extract from unity/meson.build deleted file mode 100644 index 9e3e65f58..000000000 --- a/test cases/failing/127 extract from unity/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('extract nonexisting gen', 'c') - -lib1 = library('lib1', 'src1.c', 'src2.c', override_options: ['unity=on']) -lib2 = library('lib2', objects: lib1.extract_objects('src1.c')) diff --git a/test cases/failing/127 extract from unity/src1.c b/test cases/failing/127 extract from unity/src1.c deleted file mode 100644 index da971bbf6..000000000 --- a/test cases/failing/127 extract from unity/src1.c +++ /dev/null @@ -1,3 +0,0 @@ -int sub_lib_method1() { - return 1337; -} diff --git a/test cases/failing/127 extract from unity/src2.c b/test cases/failing/127 extract from unity/src2.c deleted file mode 100644 index a46166933..000000000 --- a/test cases/failing/127 extract from unity/src2.c +++ /dev/null @@ -1,3 +0,0 @@ -int sub_lib_method2() { - return 1337; -} diff --git a/test cases/failing/127 extract from unity/test.json b/test cases/failing/127 extract from unity/test.json deleted file mode 100644 index 9403481f8..000000000 --- a/test cases/failing/127 extract from unity/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/127 extract from unity/meson.build:4:37: ERROR: Single object files cannot be extracted in Unity builds. You can only extract all the object files for each compiler at once." - } - ] -} diff --git a/test cases/failing/127 generator host binary/exe.c b/test cases/failing/127 generator host binary/exe.c new file mode 100644 index 000000000..78f2de106 --- /dev/null +++ b/test cases/failing/127 generator host binary/exe.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/failing/127 generator host binary/lib.in b/test cases/failing/127 generator host binary/lib.in new file mode 100644 index 000000000..d0b6ab765 --- /dev/null +++ b/test cases/failing/127 generator host binary/lib.in @@ -0,0 +1 @@ +int foo(void) { return 7; } diff --git a/test cases/failing/127 generator host binary/meson.build b/test cases/failing/127 generator host binary/meson.build new file mode 100644 index 000000000..e76933878 --- /dev/null +++ b/test cases/failing/127 generator host binary/meson.build @@ -0,0 +1,14 @@ +project('generator host binary no exe_wrapper') + +if meson.can_run_host_binaries() + error('MESON_SKIP_TEST: test requires that build machine cannot run host binaries') +endif + +add_languages('c', native : false) + +exe = executable('exe', 'exe.c', native : false) + +gen = generator(exe, output : '@BASENAME@.c', arguments : ['@INPUT@', '@OUTPUT@']) +foo = gen.process('lib.in') + +library('foo', foo) diff --git a/test cases/failing/127 generator host binary/test.json b/test cases/failing/127 generator host binary/test.json new file mode 100644 index 000000000..7e354d60d --- /dev/null +++ b/test cases/failing/127 generator host binary/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." } + ] +} diff --git a/test cases/failing/128 invalid ast/meson.build b/test cases/failing/128 invalid ast/meson.build new file mode 100644 index 000000000..06011c2ca --- /dev/null +++ b/test cases/failing/128 invalid ast/meson.build @@ -0,0 +1,3 @@ +project('invalid ast crash', meson_version: '0.1.0') + += >%@ diff --git a/test cases/failing/128 invalid ast/test.json b/test cases/failing/128 invalid ast/test.json new file mode 100644 index 000000000..e5c3873dc --- /dev/null +++ b/test cases/failing/128 invalid ast/test.json @@ -0,0 +1,9 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/128 invalid ast/meson.build:1:44: ERROR: Meson version is [0-9.]+(\\.rc[0-9]+)? but project requires 0.1.0" + } + ] +} + diff --git a/test cases/failing/128 subproject object as a dependency/main.c b/test cases/failing/128 subproject object as a dependency/main.c deleted file mode 100644 index 78f2de106..000000000 --- a/test cases/failing/128 subproject object as a dependency/main.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/failing/128 subproject object as a dependency/meson.build b/test cases/failing/128 subproject object as a dependency/meson.build deleted file mode 100644 index 0114b9a31..000000000 --- a/test cases/failing/128 subproject object as a dependency/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('test', 'c') - -executable( - 'main', 'main.c', dependencies: subproject('sub')) diff --git a/test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build b/test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build deleted file mode 100644 index 0adfd6a6e..000000000 --- a/test cases/failing/128 subproject object as a dependency/subprojects/sub/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('sub') diff --git a/test cases/failing/128 subproject object as a dependency/test.json b/test cases/failing/128 subproject object as a dependency/test.json deleted file mode 100644 index b04bf3766..000000000 --- a/test cases/failing/128 subproject object as a dependency/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/128 subproject object as a dependency/meson.build:3:0: ERROR: Tried to use subproject object as a dependency." - } - ] -} diff --git a/test cases/failing/129 generator host binary/exe.c b/test cases/failing/129 generator host binary/exe.c deleted file mode 100644 index 78f2de106..000000000 --- a/test cases/failing/129 generator host binary/exe.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/failing/129 generator host binary/lib.in b/test cases/failing/129 generator host binary/lib.in deleted file mode 100644 index d0b6ab765..000000000 --- a/test cases/failing/129 generator host binary/lib.in +++ /dev/null @@ -1 +0,0 @@ -int foo(void) { return 7; } diff --git a/test cases/failing/129 generator host binary/meson.build b/test cases/failing/129 generator host binary/meson.build deleted file mode 100644 index e76933878..000000000 --- a/test cases/failing/129 generator host binary/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('generator host binary no exe_wrapper') - -if meson.can_run_host_binaries() - error('MESON_SKIP_TEST: test requires that build machine cannot run host binaries') -endif - -add_languages('c', native : false) - -exe = executable('exe', 'exe.c', native : false) - -gen = generator(exe, output : '@BASENAME@.c', arguments : ['@INPUT@', '@OUTPUT@']) -foo = gen.process('lib.in') - -library('foo', foo) diff --git a/test cases/failing/129 generator host binary/test.json b/test cases/failing/129 generator host binary/test.json deleted file mode 100644 index 7e354d60d..000000000 --- a/test cases/failing/129 generator host binary/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "stdout": [ - { "line": "ERROR: An exe_wrapper is needed but was not found. Please define one in cross file and check the command and/or add it to PATH." } - ] -} diff --git a/test cases/failing/129 invalid project function/meson.build b/test cases/failing/129 invalid project function/meson.build new file mode 100644 index 000000000..0032c9c95 --- /dev/null +++ b/test cases/failing/129 invalid project function/meson.build @@ -0,0 +1 @@ +project('invalid project function with bad kwargs', meson_version: '0.1.0', unknown_kwarg: 'val') diff --git a/test cases/failing/129 invalid project function/test.json b/test cases/failing/129 invalid project function/test.json new file mode 100644 index 000000000..b28266cb1 --- /dev/null +++ b/test cases/failing/129 invalid project function/test.json @@ -0,0 +1,9 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/129 invalid project function/meson.build:1:67: ERROR: Meson version is [0-9.]+(\\.rc[0-9]+)? but project requires 0.1.0" + } + ] +} + diff --git a/test cases/failing/130 invalid ast/meson.build b/test cases/failing/130 invalid ast/meson.build deleted file mode 100644 index 06011c2ca..000000000 --- a/test cases/failing/130 invalid ast/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('invalid ast crash', meson_version: '0.1.0') - -= >%@ diff --git a/test cases/failing/130 invalid ast/test.json b/test cases/failing/130 invalid ast/test.json deleted file mode 100644 index 285d078ad..000000000 --- a/test cases/failing/130 invalid ast/test.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": "test cases/failing/130 invalid ast/meson.build:1:44: ERROR: Meson version is [0-9.]+(\\.rc[0-9]+)? but project requires 0.1.0" - } - ] -} - diff --git a/test cases/failing/131 invalid project function/meson.build b/test cases/failing/131 invalid project function/meson.build deleted file mode 100644 index 0032c9c95..000000000 --- a/test cases/failing/131 invalid project function/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('invalid project function with bad kwargs', meson_version: '0.1.0', unknown_kwarg: 'val') diff --git a/test cases/failing/131 invalid project function/test.json b/test cases/failing/131 invalid project function/test.json deleted file mode 100644 index e6814c665..000000000 --- a/test cases/failing/131 invalid project function/test.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "stdout": [ - { - "match": "re", - "line": "test cases/failing/131 invalid project function/meson.build:1:67: ERROR: Meson version is [0-9.]+(\\.rc[0-9]+)? but project requires 0.1.0" - } - ] -} - diff --git a/test cases/failing/53 or on new line/meson.build b/test cases/failing/53 or on new line/meson.build new file mode 100644 index 000000000..b0bd08efa --- /dev/null +++ b/test cases/failing/53 or on new line/meson.build @@ -0,0 +1,7 @@ +project('silent_or') + +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/53 or on new line/meson_options.txt b/test cases/failing/53 or on new line/meson_options.txt new file mode 100644 index 000000000..3302cf4ec --- /dev/null +++ b/test cases/failing/53 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/53 or on new line/test.json b/test cases/failing/53 or on new line/test.json new file mode 100644 index 000000000..339002555 --- /dev/null +++ b/test cases/failing/53 or on new line/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/53 or on new line/meson.build:4:8: ERROR: Invalid or clause." + } + ] +} diff --git a/test cases/failing/54 link with executable/meson.build b/test cases/failing/54 link with executable/meson.build new file mode 100644 index 000000000..186b3e595 --- /dev/null +++ b/test cases/failing/54 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/54 link with executable/module.c b/test cases/failing/54 link with executable/module.c new file mode 100644 index 000000000..dc0124a24 --- /dev/null +++ b/test cases/failing/54 link with executable/module.c @@ -0,0 +1,4 @@ + +int func(void) { + return 42; +} diff --git a/test cases/failing/54 link with executable/prog.c b/test cases/failing/54 link with executable/prog.c new file mode 100644 index 000000000..f3836d7ba --- /dev/null +++ b/test cases/failing/54 link with executable/prog.c @@ -0,0 +1,5 @@ +int +main (int argc, char **argv) +{ + return 0; +} diff --git a/test cases/failing/54 link with executable/test.json b/test cases/failing/54 link with executable/test.json new file mode 100644 index 000000000..2b51bdd5a --- /dev/null +++ b/test cases/failing/54 link with executable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/54 link with executable/meson.build:4:4: ERROR: Link target 'prog' is not linkable." + } + ] +} diff --git a/test cases/failing/55 assign custom target index/meson.build b/test cases/failing/55 assign custom target index/meson.build new file mode 100644 index 000000000..7f2a820b8 --- /dev/null +++ b/test cases/failing/55 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/55 assign custom target index/test.json b/test cases/failing/55 assign custom target index/test.json new file mode 100644 index 000000000..39983fb67 --- /dev/null +++ b/test cases/failing/55 assign custom target index/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/55 assign custom target index/meson.build:24:0: ERROR: Assignment target must be an id." + } + ] +} diff --git a/test cases/failing/55 or on new line/meson.build b/test cases/failing/55 or on new line/meson.build deleted file mode 100644 index b0bd08efa..000000000 --- a/test cases/failing/55 or on new line/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -project('silent_or') - -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 deleted file mode 100644 index 3302cf4ec..000000000 --- a/test cases/failing/55 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/55 or on new line/test.json b/test cases/failing/55 or on new line/test.json deleted file mode 100644 index f1b8a673c..000000000 --- a/test cases/failing/55 or on new line/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/55 or on new line/meson.build:4:8: ERROR: Invalid or clause." - } - ] -} diff --git a/test cases/failing/56 getoption prefix/meson.build b/test cases/failing/56 getoption prefix/meson.build new file mode 100644 index 000000000..8f85cff2a --- /dev/null +++ b/test cases/failing/56 getoption prefix/meson.build @@ -0,0 +1,5 @@ +project('getopt prefix') + +subproject('abc') + +get_option('abc:foo') diff --git a/test cases/failing/56 getoption prefix/subprojects/abc/meson.build b/test cases/failing/56 getoption prefix/subprojects/abc/meson.build new file mode 100644 index 000000000..aa9c3df0f --- /dev/null +++ b/test cases/failing/56 getoption prefix/subprojects/abc/meson.build @@ -0,0 +1 @@ +project('abc', 'c') diff --git a/test cases/failing/56 getoption prefix/subprojects/abc/meson_options.txt b/test cases/failing/56 getoption prefix/subprojects/abc/meson_options.txt new file mode 100644 index 000000000..89e624e24 --- /dev/null +++ b/test cases/failing/56 getoption prefix/subprojects/abc/meson_options.txt @@ -0,0 +1 @@ +option('foo', type : 'boolean') diff --git a/test cases/failing/56 getoption prefix/test.json b/test cases/failing/56 getoption prefix/test.json new file mode 100644 index 000000000..c52dffc71 --- /dev/null +++ b/test cases/failing/56 getoption prefix/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/56 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/56 link with executable/meson.build b/test cases/failing/56 link with executable/meson.build deleted file mode 100644 index 186b3e595..000000000 --- a/test cases/failing/56 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/56 link with executable/module.c b/test cases/failing/56 link with executable/module.c deleted file mode 100644 index dc0124a24..000000000 --- a/test cases/failing/56 link with executable/module.c +++ /dev/null @@ -1,4 +0,0 @@ - -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 deleted file mode 100644 index f3836d7ba..000000000 --- a/test cases/failing/56 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/56 link with executable/test.json b/test cases/failing/56 link with executable/test.json deleted file mode 100644 index b137f4f29..000000000 --- a/test cases/failing/56 link with executable/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/56 link with executable/meson.build:4:4: ERROR: Link target 'prog' is not linkable." - } - ] -} diff --git a/test cases/failing/57 assign custom target index/meson.build b/test cases/failing/57 assign custom target index/meson.build deleted file mode 100644 index 7f2a820b8..000000000 --- a/test cases/failing/57 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/57 assign custom target index/test.json b/test cases/failing/57 assign custom target index/test.json deleted file mode 100644 index 392137ac1..000000000 --- a/test cases/failing/57 assign custom target index/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 bad option argument/meson.build b/test cases/failing/57 bad option argument/meson.build new file mode 100644 index 000000000..5219cfb96 --- /dev/null +++ b/test cases/failing/57 bad option argument/meson.build @@ -0,0 +1,3 @@ +project('bad option') + +get_option('name') diff --git a/test cases/failing/57 bad option argument/meson_options.txt b/test cases/failing/57 bad option argument/meson_options.txt new file mode 100644 index 000000000..0e0372b89 --- /dev/null +++ b/test cases/failing/57 bad option argument/meson_options.txt @@ -0,0 +1 @@ +option('name', type : 'string', value_ : 'foo') diff --git a/test cases/failing/57 bad option argument/test.json b/test cases/failing/57 bad option argument/test.json new file mode 100644 index 000000000..622acdffc --- /dev/null +++ b/test cases/failing/57 bad option argument/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/57 bad option argument/meson_options.txt:1:0: ERROR: string option got unknown keyword arguments \"value_\"" + } + ] +} diff --git a/test cases/failing/58 getoption prefix/meson.build b/test cases/failing/58 getoption prefix/meson.build deleted file mode 100644 index 8f85cff2a..000000000 --- a/test cases/failing/58 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/58 getoption prefix/subprojects/abc/meson.build b/test cases/failing/58 getoption prefix/subprojects/abc/meson.build deleted file mode 100644 index aa9c3df0f..000000000 --- a/test cases/failing/58 getoption prefix/subprojects/abc/meson.build +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 89e624e24..000000000 --- a/test cases/failing/58 getoption prefix/subprojects/abc/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('foo', type : 'boolean') diff --git a/test cases/failing/58 getoption prefix/test.json b/test cases/failing/58 getoption prefix/test.json deleted file mode 100644 index 630dcd99b..000000000 --- a/test cases/failing/58 getoption prefix/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/58 subproj filegrab/meson.build b/test cases/failing/58 subproj filegrab/meson.build new file mode 100644 index 000000000..b5c484cac --- /dev/null +++ b/test cases/failing/58 subproj filegrab/meson.build @@ -0,0 +1,5 @@ +project('mainproj') + +# Try to grab a file from a parent project. + +subproject('a') diff --git a/test cases/failing/58 subproj filegrab/prog.c b/test cases/failing/58 subproj filegrab/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/test cases/failing/58 subproj filegrab/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/58 subproj filegrab/subprojects/a/meson.build b/test cases/failing/58 subproj filegrab/subprojects/a/meson.build new file mode 100644 index 000000000..80b988804 --- /dev/null +++ b/test cases/failing/58 subproj filegrab/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +executable('prog', '../../prog.c') diff --git a/test cases/failing/58 subproj filegrab/test.json b/test cases/failing/58 subproj filegrab/test.json new file mode 100644 index 000000000..950e109c9 --- /dev/null +++ b/test cases/failing/58 subproj filegrab/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/58 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/59 bad option argument/meson.build b/test cases/failing/59 bad option argument/meson.build deleted file mode 100644 index 5219cfb96..000000000 --- a/test cases/failing/59 bad option argument/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 0e0372b89..000000000 --- a/test cases/failing/59 bad option argument/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('name', type : 'string', value_ : 'foo') diff --git a/test cases/failing/59 bad option argument/test.json b/test cases/failing/59 bad option argument/test.json deleted file mode 100644 index 9d22a9a22..000000000 --- a/test cases/failing/59 bad option argument/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/59 bad option argument/meson_options.txt:1:0: ERROR: string option got unknown keyword arguments \"value_\"" - } - ] -} diff --git a/test cases/failing/59 grab subproj/meson.build b/test cases/failing/59 grab subproj/meson.build new file mode 100644 index 000000000..30fc69093 --- /dev/null +++ b/test cases/failing/59 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/59 grab subproj/subprojects/foo/meson.build b/test cases/failing/59 grab subproj/subprojects/foo/meson.build new file mode 100644 index 000000000..b346f6d9a --- /dev/null +++ b/test cases/failing/59 grab subproj/subprojects/foo/meson.build @@ -0,0 +1,3 @@ +project('foo', 'c') + +message('I do nothing.') diff --git a/test cases/failing/59 grab subproj/subprojects/foo/sub.c b/test cases/failing/59 grab subproj/subprojects/foo/sub.c new file mode 100644 index 000000000..a94b1f5ad --- /dev/null +++ b/test cases/failing/59 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/59 grab subproj/test.json b/test cases/failing/59 grab subproj/test.json new file mode 100644 index 000000000..7c9020280 --- /dev/null +++ b/test cases/failing/59 grab subproj/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/59 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/60 grab sibling/meson.build b/test cases/failing/60 grab sibling/meson.build new file mode 100644 index 000000000..5ddc295e9 --- /dev/null +++ b/test cases/failing/60 grab sibling/meson.build @@ -0,0 +1,3 @@ +project('master') + +subproject('a') diff --git a/test cases/failing/60 grab sibling/subprojects/a/meson.build b/test cases/failing/60 grab sibling/subprojects/a/meson.build new file mode 100644 index 000000000..6dd9f61fc --- /dev/null +++ b/test cases/failing/60 grab sibling/subprojects/a/meson.build @@ -0,0 +1,3 @@ +project('a', 'c') + +executable('sneaky', '../b/sneaky.c') diff --git a/test cases/failing/60 grab sibling/subprojects/b/meson.build b/test cases/failing/60 grab sibling/subprojects/b/meson.build new file mode 100644 index 000000000..57f261a24 --- /dev/null +++ b/test cases/failing/60 grab sibling/subprojects/b/meson.build @@ -0,0 +1,3 @@ +projecT('b') + +message('I do nothing.') diff --git a/test cases/failing/60 grab sibling/subprojects/b/sneaky.c b/test cases/failing/60 grab sibling/subprojects/b/sneaky.c new file mode 100644 index 000000000..46718c6cc --- /dev/null +++ b/test cases/failing/60 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/60 grab sibling/test.json b/test cases/failing/60 grab sibling/test.json new file mode 100644 index 000000000..8f42badb3 --- /dev/null +++ b/test cases/failing/60 grab sibling/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/60 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/60 subproj filegrab/meson.build b/test cases/failing/60 subproj filegrab/meson.build deleted file mode 100644 index b5c484cac..000000000 --- a/test cases/failing/60 subproj filegrab/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('mainproj') - -# 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 deleted file mode 100644 index 0314ff17b..000000000 --- a/test cases/failing/60 subproj filegrab/prog.c +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 80b988804..000000000 --- a/test cases/failing/60 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/60 subproj filegrab/test.json b/test cases/failing/60 subproj filegrab/test.json deleted file mode 100644 index 04a6dbbdd..000000000 --- a/test cases/failing/60 subproj filegrab/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 deleted file mode 100644 index 30fc69093..000000000 --- a/test cases/failing/61 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/61 grab subproj/subprojects/foo/meson.build b/test cases/failing/61 grab subproj/subprojects/foo/meson.build deleted file mode 100644 index b346f6d9a..000000000 --- a/test cases/failing/61 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/61 grab subproj/subprojects/foo/sub.c b/test cases/failing/61 grab subproj/subprojects/foo/sub.c deleted file mode 100644 index a94b1f5ad..000000000 --- a/test cases/failing/61 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/61 grab subproj/test.json b/test cases/failing/61 grab subproj/test.json deleted file mode 100644 index 873ec6c06..000000000 --- a/test cases/failing/61 grab subproj/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 string as link target/meson.build b/test cases/failing/61 string as link target/meson.build new file mode 100644 index 000000000..cb83fff6a --- /dev/null +++ b/test cases/failing/61 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/61 string as link target/prog.c b/test cases/failing/61 string as link target/prog.c new file mode 100644 index 000000000..0314ff17b --- /dev/null +++ b/test cases/failing/61 string as link target/prog.c @@ -0,0 +1 @@ +int main(int argc, char **argv) { return 0; } diff --git a/test cases/failing/61 string as link target/test.json b/test cases/failing/61 string as link target/test.json new file mode 100644 index 000000000..b7f6bd784 --- /dev/null +++ b/test cases/failing/61 string as link target/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/61 string as link target/meson.build:2:0: ERROR: '' is not a target." + } + ] +} diff --git a/test cases/failing/62 dependency not-found and required/meson.build b/test cases/failing/62 dependency not-found and required/meson.build new file mode 100644 index 000000000..1ce574738 --- /dev/null +++ b/test cases/failing/62 dependency not-found and required/meson.build @@ -0,0 +1,2 @@ +project('dep-test') +dep = dependency('', required:true) diff --git a/test cases/failing/62 dependency not-found and required/test.json b/test cases/failing/62 dependency not-found and required/test.json new file mode 100644 index 000000000..69a67ffbb --- /dev/null +++ b/test cases/failing/62 dependency not-found and required/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/62 dependency not-found and required/meson.build:2:6: ERROR: Dependency is required but has no candidates." + } + ] +} diff --git a/test cases/failing/62 grab sibling/meson.build b/test cases/failing/62 grab sibling/meson.build deleted file mode 100644 index 5ddc295e9..000000000 --- a/test cases/failing/62 grab sibling/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('master') - -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 deleted file mode 100644 index 6dd9f61fc..000000000 --- a/test cases/failing/62 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/62 grab sibling/subprojects/b/meson.build b/test cases/failing/62 grab sibling/subprojects/b/meson.build deleted file mode 100644 index 57f261a24..000000000 --- a/test cases/failing/62 grab sibling/subprojects/b/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -projecT('b') - -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 deleted file mode 100644 index 46718c6cc..000000000 --- a/test cases/failing/62 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/62 grab sibling/test.json b/test cases/failing/62 grab sibling/test.json deleted file mode 100644 index 9e7c4bbf1..000000000 --- a/test cases/failing/62 grab sibling/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/63 string as link target/meson.build b/test cases/failing/63 string as link target/meson.build deleted file mode 100644 index cb83fff6a..000000000 --- a/test cases/failing/63 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/63 string as link target/prog.c b/test cases/failing/63 string as link target/prog.c deleted file mode 100644 index 0314ff17b..000000000 --- a/test cases/failing/63 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/63 string as link target/test.json b/test cases/failing/63 string as link target/test.json deleted file mode 100644 index a531d647e..000000000 --- a/test cases/failing/63 string as link target/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/63 subproj different versions/main.c b/test cases/failing/63 subproj different versions/main.c new file mode 100644 index 000000000..8793c623a --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/meson.build b/test cases/failing/63 subproj different versions/meson.build new file mode 100644 index 000000000..e964e423e --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/subprojects/a/a.c b/test cases/failing/63 subproj different versions/subprojects/a/a.c new file mode 100644 index 000000000..cd41a6588 --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/subprojects/a/a.h b/test cases/failing/63 subproj different versions/subprojects/a/a.h new file mode 100644 index 000000000..8f1d49eda --- /dev/null +++ b/test cases/failing/63 subproj different versions/subprojects/a/a.h @@ -0,0 +1 @@ +int a_fun(); diff --git a/test cases/failing/63 subproj different versions/subprojects/a/meson.build b/test cases/failing/63 subproj different versions/subprojects/a/meson.build new file mode 100644 index 000000000..e84182a07 --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/subprojects/b/b.c b/test cases/failing/63 subproj different versions/subprojects/b/b.c new file mode 100644 index 000000000..f85f8c3f8 --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/subprojects/b/b.h b/test cases/failing/63 subproj different versions/subprojects/b/b.h new file mode 100644 index 000000000..eced786a0 --- /dev/null +++ b/test cases/failing/63 subproj different versions/subprojects/b/b.h @@ -0,0 +1 @@ +int b_fun(); diff --git a/test cases/failing/63 subproj different versions/subprojects/b/meson.build b/test cases/failing/63 subproj different versions/subprojects/b/meson.build new file mode 100644 index 000000000..0398340e6 --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/subprojects/c/c.h b/test cases/failing/63 subproj different versions/subprojects/c/c.h new file mode 100644 index 000000000..2b15f607c --- /dev/null +++ b/test cases/failing/63 subproj different versions/subprojects/c/c.h @@ -0,0 +1,3 @@ +static int c_fun(){ + return 3; +} diff --git a/test cases/failing/63 subproj different versions/subprojects/c/meson.build b/test cases/failing/63 subproj different versions/subprojects/c/meson.build new file mode 100644 index 000000000..7184933b2 --- /dev/null +++ b/test cases/failing/63 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/63 subproj different versions/test.json b/test cases/failing/63 subproj different versions/test.json new file mode 100644 index 000000000..f2535fafd --- /dev/null +++ b/test cases/failing/63 subproj different versions/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/63 subproj different versions/subprojects/b/meson.build:3:8: ERROR: Dependency 'c' is required but not found." + } + ] +} 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 deleted file mode 100644 index 1ce574738..000000000 --- a/test cases/failing/64 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/64 dependency not-found and required/test.json b/test cases/failing/64 dependency not-found and required/test.json deleted file mode 100644 index ceb521e49..000000000 --- a/test cases/failing/64 dependency not-found and required/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/64 dependency not-found and required/meson.build:2:6: ERROR: Dependency is required but has no candidates." - } - ] -} diff --git a/test cases/failing/64 wrong boost module/meson.build b/test cases/failing/64 wrong boost module/meson.build new file mode 100644 index 000000000..937e58749 --- /dev/null +++ b/test cases/failing/64 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/64 wrong boost module/test.json b/test cases/failing/64 wrong boost module/test.json new file mode 100644 index 000000000..78e206999 --- /dev/null +++ b/test cases/failing/64 wrong boost module/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/64 wrong boost module/meson.build:9:10: ERROR: Dependency \"boost\" not found, tried system" + } + ] +} diff --git a/test cases/failing/65 install_data rename bad size/file1.txt b/test cases/failing/65 install_data rename bad size/file1.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/65 install_data rename bad size/file2.txt b/test cases/failing/65 install_data rename bad size/file2.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/65 install_data rename bad size/meson.build b/test cases/failing/65 install_data rename bad size/meson.build new file mode 100644 index 000000000..849bb9aec --- /dev/null +++ b/test cases/failing/65 install_data rename bad size/meson.build @@ -0,0 +1,3 @@ +project('data install test') + +install_data(['file1.txt', 'file2.txt'], rename : 'just one name') diff --git a/test cases/failing/65 install_data rename bad size/test.json b/test cases/failing/65 install_data rename bad size/test.json new file mode 100644 index 000000000..efc62907d --- /dev/null +++ b/test cases/failing/65 install_data rename bad size/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/65 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/65 subproj different versions/main.c b/test cases/failing/65 subproj different versions/main.c deleted file mode 100644 index 8793c623a..000000000 --- a/test cases/failing/65 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/65 subproj different versions/meson.build b/test cases/failing/65 subproj different versions/meson.build deleted file mode 100644 index e964e423e..000000000 --- a/test cases/failing/65 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/65 subproj different versions/subprojects/a/a.c b/test cases/failing/65 subproj different versions/subprojects/a/a.c deleted file mode 100644 index cd41a6588..000000000 --- a/test cases/failing/65 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/65 subproj different versions/subprojects/a/a.h b/test cases/failing/65 subproj different versions/subprojects/a/a.h deleted file mode 100644 index 8f1d49eda..000000000 --- a/test cases/failing/65 subproj different versions/subprojects/a/a.h +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index e84182a07..000000000 --- a/test cases/failing/65 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/65 subproj different versions/subprojects/b/b.c b/test cases/failing/65 subproj different versions/subprojects/b/b.c deleted file mode 100644 index f85f8c3f8..000000000 --- a/test cases/failing/65 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/65 subproj different versions/subprojects/b/b.h b/test cases/failing/65 subproj different versions/subprojects/b/b.h deleted file mode 100644 index eced786a0..000000000 --- a/test cases/failing/65 subproj different versions/subprojects/b/b.h +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 0398340e6..000000000 --- a/test cases/failing/65 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/65 subproj different versions/subprojects/c/c.h b/test cases/failing/65 subproj different versions/subprojects/c/c.h deleted file mode 100644 index 2b15f607c..000000000 --- a/test cases/failing/65 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/65 subproj different versions/subprojects/c/meson.build b/test cases/failing/65 subproj different versions/subprojects/c/meson.build deleted file mode 100644 index 7184933b2..000000000 --- a/test cases/failing/65 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/65 subproj different versions/test.json b/test cases/failing/65 subproj different versions/test.json deleted file mode 100644 index d18a823d1..000000000 --- a/test cases/failing/65 subproj different versions/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/65 subproj different versions/subprojects/b/meson.build:3:8: ERROR: Dependency 'c' is required but not found." - } - ] -} diff --git a/test cases/failing/66 skip only subdir/meson.build b/test cases/failing/66 skip only subdir/meson.build new file mode 100644 index 000000000..4832bd49c --- /dev/null +++ b/test cases/failing/66 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/66 skip only subdir/subdir/meson.build b/test cases/failing/66 skip only subdir/subdir/meson.build new file mode 100644 index 000000000..1ba447b22 --- /dev/null +++ b/test cases/failing/66 skip only subdir/subdir/meson.build @@ -0,0 +1,3 @@ +subdir_done() + +error('Unreachable') diff --git a/test cases/failing/66 skip only subdir/test.json b/test cases/failing/66 skip only subdir/test.json new file mode 100644 index 000000000..de21e006c --- /dev/null +++ b/test cases/failing/66 skip only subdir/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/66 skip only subdir/meson.build:8:0: ERROR: File main.cpp does not exist." + } + ] +} diff --git a/test cases/failing/66 wrong boost module/meson.build b/test cases/failing/66 wrong boost module/meson.build deleted file mode 100644 index 937e58749..000000000 --- a/test cases/failing/66 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/66 wrong boost module/test.json b/test cases/failing/66 wrong boost module/test.json deleted file mode 100644 index 7d646d4b4..000000000 --- a/test cases/failing/66 wrong boost module/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/66 wrong boost module/meson.build:9:10: ERROR: Dependency \"boost\" not found, tried system" - } - ] -} diff --git a/test cases/failing/67 dual override/meson.build b/test cases/failing/67 dual override/meson.build new file mode 100644 index 000000000..999b8bc14 --- /dev/null +++ b/test cases/failing/67 dual override/meson.build @@ -0,0 +1,5 @@ +project('yo dawg') + +p = find_program('overrides.py') +meson.override_find_program('override', p) +meson.override_find_program('override', p) diff --git a/test cases/failing/67 dual override/overrides.py b/test cases/failing/67 dual override/overrides.py new file mode 100644 index 000000000..49e9b7ad6 --- /dev/null +++ b/test cases/failing/67 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/67 dual override/test.json b/test cases/failing/67 dual override/test.json new file mode 100644 index 000000000..b50f3aca8 --- /dev/null +++ b/test cases/failing/67 dual override/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/67 dual override/meson.build:5:6: ERROR: Tried to override executable \"override\" which has already been overridden." + } + ] +} 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 deleted file mode 100644 index e69de29bb..000000000 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 deleted file mode 100644 index e69de29bb..000000000 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 deleted file mode 100644 index 849bb9aec..000000000 --- a/test cases/failing/67 install_data rename bad size/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('data install test') - -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 deleted file mode 100644 index af1f0d977..000000000 --- a/test cases/failing/67 install_data rename bad size/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/68 override used/meson.build b/test cases/failing/68 override used/meson.build new file mode 100644 index 000000000..582fc1b05 --- /dev/null +++ b/test cases/failing/68 override used/meson.build @@ -0,0 +1,5 @@ +project('override an already found exe') + +old = find_program('something.py') +replacement = find_program('other.py') +meson.override_find_program('something.py', replacement) diff --git a/test cases/failing/68 override used/other.py b/test cases/failing/68 override used/other.py new file mode 100755 index 000000000..f62ba960d --- /dev/null +++ b/test cases/failing/68 override used/other.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('Doing something else.') diff --git a/test cases/failing/68 override used/something.py b/test cases/failing/68 override used/something.py new file mode 100755 index 000000000..64c9454c3 --- /dev/null +++ b/test cases/failing/68 override used/something.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +print('Doing something.') diff --git a/test cases/failing/68 override used/test.json b/test cases/failing/68 override used/test.json new file mode 100644 index 000000000..f11aac619 --- /dev/null +++ b/test cases/failing/68 override used/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/68 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/68 skip only subdir/meson.build b/test cases/failing/68 skip only subdir/meson.build deleted file mode 100644 index 4832bd49c..000000000 --- a/test cases/failing/68 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/68 skip only subdir/subdir/meson.build b/test cases/failing/68 skip only subdir/subdir/meson.build deleted file mode 100644 index 1ba447b22..000000000 --- a/test cases/failing/68 skip only subdir/subdir/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 4558847dd..000000000 --- a/test cases/failing/68 skip only subdir/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 deleted file mode 100644 index 999b8bc14..000000000 --- a/test cases/failing/69 dual override/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('yo dawg') - -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 deleted file mode 100644 index 49e9b7ad6..000000000 --- a/test cases/failing/69 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/69 dual override/test.json b/test cases/failing/69 dual override/test.json deleted file mode 100644 index 784d6b275..000000000 --- a/test cases/failing/69 dual override/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 run_command unclean exit/meson.build b/test cases/failing/69 run_command unclean exit/meson.build new file mode 100644 index 000000000..f6bf895a8 --- /dev/null +++ b/test cases/failing/69 run_command unclean exit/meson.build @@ -0,0 +1,4 @@ +project('run_command unclean exit') + +rcprog = find_program('./returncode.py') +run_command(rcprog, '1', check : true) diff --git a/test cases/failing/69 run_command unclean exit/returncode.py b/test cases/failing/69 run_command unclean exit/returncode.py new file mode 100755 index 000000000..84dbc5df6 --- /dev/null +++ b/test cases/failing/69 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/69 run_command unclean exit/test.json b/test cases/failing/69 run_command unclean exit/test.json new file mode 100644 index 000000000..96c2141fc --- /dev/null +++ b/test cases/failing/69 run_command unclean exit/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/69 run_command unclean exit/meson\\.build:4:0: ERROR: Command `.*['\"].*[\\\\/]test cases[\\\\/]failing[\\\\/]69 run_command unclean exit[\\\\/]\\.[\\\\/]returncode\\.py['\"] 1` failed with status 1\\." + } + ] +} diff --git a/test cases/failing/70 int literal leading zero/meson.build b/test cases/failing/70 int literal leading zero/meson.build new file mode 100644 index 000000000..87c776f49 --- /dev/null +++ b/test cases/failing/70 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/70 int literal leading zero/test.json b/test cases/failing/70 int literal leading zero/test.json new file mode 100644 index 000000000..fafbf0d04 --- /dev/null +++ b/test cases/failing/70 int literal leading zero/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "comment": "this error message is not very informative", + "line": "test cases/failing/70 int literal leading zero/meson.build:5:13: ERROR: Expecting eof got number." + } + ] +} diff --git a/test cases/failing/70 override used/meson.build b/test cases/failing/70 override used/meson.build deleted file mode 100644 index 582fc1b05..000000000 --- a/test cases/failing/70 override used/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('override an already found exe') - -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 deleted file mode 100755 index f62ba960d..000000000 --- a/test cases/failing/70 override used/other.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100755 index 64c9454c3..000000000 --- a/test cases/failing/70 override used/something.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/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 deleted file mode 100644 index adb60aa92..000000000 --- a/test cases/failing/70 override used/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 configuration immutable/input b/test cases/failing/71 configuration immutable/input new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/71 configuration immutable/meson.build b/test cases/failing/71 configuration immutable/meson.build new file mode 100644 index 000000000..b6cac4126 --- /dev/null +++ b/test cases/failing/71 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/71 configuration immutable/test.json b/test cases/failing/71 configuration immutable/test.json new file mode 100644 index 000000000..af1a65ddd --- /dev/null +++ b/test cases/failing/71 configuration immutable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/71 configuration immutable/meson.build:12:16: ERROR: Can not set values on configuration object that has been used." + } + ] +} diff --git a/test cases/failing/71 run_command unclean exit/meson.build b/test cases/failing/71 run_command unclean exit/meson.build deleted file mode 100644 index f6bf895a8..000000000 --- a/test cases/failing/71 run_command unclean exit/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('run_command unclean exit') - -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 deleted file mode 100755 index 84dbc5df6..000000000 --- a/test cases/failing/71 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/71 run_command unclean exit/test.json b/test cases/failing/71 run_command unclean exit/test.json deleted file mode 100644 index ca5fcbad1..000000000 --- a/test cases/failing/71 run_command unclean exit/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "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 deleted file mode 100644 index 87c776f49..000000000 --- a/test cases/failing/72 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/72 int literal leading zero/test.json b/test cases/failing/72 int literal leading zero/test.json deleted file mode 100644 index 556e49210..000000000 --- a/test cases/failing/72 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/72 int literal leading zero/meson.build:5:13: ERROR: Expecting eof got number." - } - ] -} diff --git a/test cases/failing/72 link with shared module on osx/meson.build b/test cases/failing/72 link with shared module on osx/meson.build new file mode 100644 index 000000000..bf18b3626 --- /dev/null +++ b/test cases/failing/72 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/72 link with shared module on osx/module.c b/test cases/failing/72 link with shared module on osx/module.c new file mode 100644 index 000000000..81b0d5af0 --- /dev/null +++ b/test cases/failing/72 link with shared module on osx/module.c @@ -0,0 +1,3 @@ +int func(void) { + return 1496; +} diff --git a/test cases/failing/72 link with shared module on osx/prog.c b/test cases/failing/72 link with shared module on osx/prog.c new file mode 100644 index 000000000..8164d8da1 --- /dev/null +++ b/test cases/failing/72 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/72 link with shared module on osx/test.json b/test cases/failing/72 link with shared module on osx/test.json new file mode 100644 index 000000000..1a2d78cd7 --- /dev/null +++ b/test cases/failing/72 link with shared module on osx/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/72 link with shared module on osx/meson.build:8:4: ERROR: target prog links against shared module mymodule. This is not permitted on OSX" + } + ] +} diff --git a/test cases/failing/73 configuration immutable/input b/test cases/failing/73 configuration immutable/input deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/73 configuration immutable/meson.build b/test cases/failing/73 configuration immutable/meson.build deleted file mode 100644 index b6cac4126..000000000 --- a/test cases/failing/73 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/73 configuration immutable/test.json b/test cases/failing/73 configuration immutable/test.json deleted file mode 100644 index 32d942781..000000000 --- a/test cases/failing/73 configuration immutable/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 non-ascii in ascii encoded configure file/config9.h.in b/test cases/failing/73 non-ascii in ascii encoded configure file/config9.h.in new file mode 100644 index 000000000..323bec64a --- /dev/null +++ b/test cases/failing/73 non-ascii in ascii encoded configure file/config9.h.in @@ -0,0 +1 @@ +#define MESSAGE "@var@" diff --git a/test cases/failing/73 non-ascii in ascii encoded configure file/meson.build b/test cases/failing/73 non-ascii in ascii encoded configure file/meson.build new file mode 100644 index 000000000..eadb627cd --- /dev/null +++ b/test cases/failing/73 non-ascii in ascii encoded configure file/meson.build @@ -0,0 +1,10 @@ +project('non-ascii to ascii encoding') +# 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/73 non-ascii in ascii encoded configure file/test.json b/test cases/failing/73 non-ascii in ascii encoded configure file/test.json new file mode 100644 index 000000000..63f5bef85 --- /dev/null +++ b/test cases/failing/73 non-ascii in ascii encoded configure file/test.json @@ -0,0 +1,8 @@ +{ + "stdout": [ + { + "match": "re", + "line": "test cases/failing/73 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/74 link with shared module on osx/meson.build b/test cases/failing/74 link with shared module on osx/meson.build deleted file mode 100644 index bf18b3626..000000000 --- a/test cases/failing/74 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/74 link with shared module on osx/module.c b/test cases/failing/74 link with shared module on osx/module.c deleted file mode 100644 index 81b0d5af0..000000000 --- a/test cases/failing/74 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/74 link with shared module on osx/prog.c b/test cases/failing/74 link with shared module on osx/prog.c deleted file mode 100644 index 8164d8da1..000000000 --- a/test cases/failing/74 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/74 link with shared module on osx/test.json b/test cases/failing/74 link with shared module on osx/test.json deleted file mode 100644 index 09e990616..000000000 --- a/test cases/failing/74 link with shared module on osx/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/74 link with shared module on osx/meson.build:8:4: ERROR: target prog links against shared module mymodule. This is not permitted on OSX" - } - ] -} diff --git a/test cases/failing/74 subproj dependency not-found and required/meson.build b/test cases/failing/74 subproj dependency not-found and required/meson.build new file mode 100644 index 000000000..c5a296104 --- /dev/null +++ b/test cases/failing/74 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/74 subproj dependency not-found and required/test.json b/test cases/failing/74 subproj dependency not-found and required/test.json new file mode 100644 index 000000000..997bc56b2 --- /dev/null +++ b/test cases/failing/74 subproj dependency not-found and required/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/74 subproj dependency not-found and required/meson.build:2:10: ERROR: Neither a subproject directory nor a missing.wrap file was found." + } + ] +} 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 deleted file mode 100644 index 323bec64a..000000000 --- a/test cases/failing/75 non-ascii in ascii encoded configure file/config9.h.in +++ /dev/null @@ -1 +0,0 @@ -#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 deleted file mode 100644 index eadb627cd..000000000 --- a/test cases/failing/75 non-ascii in ascii encoded configure file/meson.build +++ /dev/null @@ -1,10 +0,0 @@ -project('non-ascii to ascii encoding') -# 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 deleted file mode 100644 index 3d797f923..000000000 --- a/test cases/failing/75 non-ascii in ascii encoded configure file/test.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "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/75 unfound run/meson.build b/test cases/failing/75 unfound run/meson.build new file mode 100644 index 000000000..3f37e9a06 --- /dev/null +++ b/test cases/failing/75 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/75 unfound run/test.json b/test cases/failing/75 unfound run/test.json new file mode 100644 index 000000000..855c2a477 --- /dev/null +++ b/test cases/failing/75 unfound run/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/75 unfound run/meson.build:4:0: ERROR: Tried to use non-existing executable 'nonexisting_prog'" + } + ] +} diff --git a/test cases/failing/76 framework dependency with version/meson.build b/test cases/failing/76 framework dependency with version/meson.build new file mode 100644 index 000000000..ee315ebcb --- /dev/null +++ b/test cases/failing/76 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/76 framework dependency with version/test.json b/test cases/failing/76 framework dependency with version/test.json new file mode 100644 index 000000000..07b4a6eba --- /dev/null +++ b/test cases/failing/76 framework dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/76 framework dependency with version/meson.build:8:6: ERROR: Dependency lookup for appleframeworks with method 'framework' failed: Unknown version, but need ['>0']." + } + ] +} 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 deleted file mode 100644 index c5a296104..000000000 --- a/test cases/failing/76 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/76 subproj dependency not-found and required/test.json b/test cases/failing/76 subproj dependency not-found and required/test.json deleted file mode 100644 index 52d3a0fef..000000000 --- a/test cases/failing/76 subproj dependency not-found and required/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/76 subproj dependency not-found and required/meson.build:2:10: ERROR: Neither a subproject directory nor a missing.wrap file was found." - } - ] -} diff --git a/test cases/failing/77 override exe config/foo.c b/test cases/failing/77 override exe config/foo.c new file mode 100644 index 000000000..03b2213bb --- /dev/null +++ b/test cases/failing/77 override exe config/foo.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/77 override exe config/meson.build b/test cases/failing/77 override exe config/meson.build new file mode 100644 index 000000000..a5d09249c --- /dev/null +++ b/test cases/failing/77 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/77 override exe config/test.json b/test cases/failing/77 override exe config/test.json new file mode 100644 index 000000000..a0dd7ae6e --- /dev/null +++ b/test cases/failing/77 override exe config/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/77 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/77 unfound run/meson.build b/test cases/failing/77 unfound run/meson.build deleted file mode 100644 index 3f37e9a06..000000000 --- a/test cases/failing/77 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/77 unfound run/test.json b/test cases/failing/77 unfound run/test.json deleted file mode 100644 index 99464bd7b..000000000 --- a/test cases/failing/77 unfound run/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 deleted file mode 100644 index ee315ebcb..000000000 --- a/test cases/failing/78 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/78 framework dependency with version/test.json b/test cases/failing/78 framework dependency with version/test.json deleted file mode 100644 index 8a708316b..000000000 --- a/test cases/failing/78 framework dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/78 framework dependency with version/meson.build:8:6: ERROR: Dependency lookup for appleframeworks with method 'framework' failed: Unknown version, but need ['>0']." - } - ] -} diff --git a/test cases/failing/78 gl dependency with version/meson.build b/test cases/failing/78 gl dependency with version/meson.build new file mode 100644 index 000000000..012709302 --- /dev/null +++ b/test cases/failing/78 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/78 gl dependency with version/test.json b/test cases/failing/78 gl dependency with version/test.json new file mode 100644 index 000000000..fbd9ff9ee --- /dev/null +++ b/test cases/failing/78 gl dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/78 gl dependency with version/meson.build:9:6: ERROR: Dependency lookup for gl with method 'system' failed: Unknown version, 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 deleted file mode 100644 index 03b2213bb..000000000 --- a/test cases/failing/79 override exe config/foo.c +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index a5d09249c..000000000 --- a/test cases/failing/79 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/79 override exe config/test.json b/test cases/failing/79 override exe config/test.json deleted file mode 100644 index 1a671a37e..000000000 --- a/test cases/failing/79 override exe config/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/79 threads dependency with version/meson.build b/test cases/failing/79 threads dependency with version/meson.build new file mode 100644 index 000000000..6023faeb6 --- /dev/null +++ b/test cases/failing/79 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/79 threads dependency with version/test.json b/test cases/failing/79 threads dependency with version/test.json new file mode 100644 index 000000000..890695b64 --- /dev/null +++ b/test cases/failing/79 threads dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/79 threads dependency with version/meson.build:3:6: ERROR: Dependency lookup for threads with method 'system' failed: Unknown version, but need ['>0']." + } + ] +} diff --git a/test cases/failing/80 gl dependency with version/meson.build b/test cases/failing/80 gl dependency with version/meson.build deleted file mode 100644 index 012709302..000000000 --- a/test cases/failing/80 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/80 gl dependency with version/test.json b/test cases/failing/80 gl dependency with version/test.json deleted file mode 100644 index 73d470a70..000000000 --- a/test cases/failing/80 gl dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/80 gl dependency with version/meson.build:9:6: ERROR: Dependency lookup for gl with method 'system' failed: Unknown version, but need ['>0']." - } - ] -} diff --git a/test cases/failing/80 gtest dependency with version/meson.build b/test cases/failing/80 gtest dependency with version/meson.build new file mode 100644 index 000000000..efbffe1e7 --- /dev/null +++ b/test cases/failing/80 gtest dependency with version/meson.build @@ -0,0 +1,8 @@ +project('gtest dependency with version', '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/80 gtest dependency with version/test.json b/test cases/failing/80 gtest dependency with version/test.json new file mode 100644 index 000000000..3f9934d49 --- /dev/null +++ b/test cases/failing/80 gtest dependency with version/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/80 gtest dependency with version/meson.build:8:6: ERROR: Dependency 'gtest' is required but not found." + } + ] +} diff --git a/test cases/failing/81 dub library/meson.build b/test cases/failing/81 dub library/meson.build new file mode 100644 index 000000000..306d5b3e5 --- /dev/null +++ b/test cases/failing/81 dub library/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/81 dub library/test.json b/test cases/failing/81 dub library/test.json new file mode 100644 index 000000000..2db91eed5 --- /dev/null +++ b/test cases/failing/81 dub library/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/81 dub library/meson.build:11:0: ERROR: Dependency \"dubtestproject\" not found" + } + ] +} diff --git a/test cases/failing/81 threads dependency with version/meson.build b/test cases/failing/81 threads dependency with version/meson.build deleted file mode 100644 index 6023faeb6..000000000 --- a/test cases/failing/81 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/81 threads dependency with version/test.json b/test cases/failing/81 threads dependency with version/test.json deleted file mode 100644 index 2c12d6912..000000000 --- a/test cases/failing/81 threads dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/81 threads dependency with version/meson.build:3:6: ERROR: Dependency lookup for threads with method 'system' failed: Unknown version, but need ['>0']." - } - ] -} diff --git a/test cases/failing/82 dub executable/meson.build b/test cases/failing/82 dub executable/meson.build new file mode 100644 index 000000000..9a134ea21 --- /dev/null +++ b/test cases/failing/82 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/82 dub executable/test.json b/test cases/failing/82 dub executable/test.json new file mode 100644 index 000000000..8ae46b848 --- /dev/null +++ b/test cases/failing/82 dub executable/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/82 dub executable/meson.build:11:0: ERROR: Dependency \"dubtestproject:test1\" not found" + } + ] +} diff --git a/test cases/failing/82 gtest dependency with version/meson.build b/test cases/failing/82 gtest dependency with version/meson.build deleted file mode 100644 index efbffe1e7..000000000 --- a/test cases/failing/82 gtest dependency with version/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('gtest dependency with version', '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 deleted file mode 100644 index 4eb816eff..000000000 --- a/test cases/failing/82 gtest dependency with version/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/82 gtest dependency with version/meson.build:8:6: ERROR: Dependency 'gtest' is required but not found." - } - ] -} diff --git a/test cases/failing/83 dub compiler/meson.build b/test cases/failing/83 dub compiler/meson.build new file mode 100644 index 000000000..36f1849e5 --- /dev/null +++ b/test cases/failing/83 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/83 dub compiler/test.json b/test cases/failing/83 dub compiler/test.json new file mode 100644 index 000000000..07241d21e --- /dev/null +++ b/test cases/failing/83 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/83 dub compiler/meson.build:17:0: ERROR: Dependency \"dubtestproject:test2\" not found" + } + ] +} diff --git a/test cases/failing/83 dub library/meson.build b/test cases/failing/83 dub library/meson.build deleted file mode 100644 index 306d5b3e5..000000000 --- a/test cases/failing/83 dub library/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/83 dub library/test.json b/test cases/failing/83 dub library/test.json deleted file mode 100644 index e4248f4f0..000000000 --- a/test cases/failing/83 dub library/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/83 dub library/meson.build:11:0: ERROR: Dependency \"dubtestproject\" not found" - } - ] -} diff --git a/test cases/failing/84 dub executable/meson.build b/test cases/failing/84 dub executable/meson.build deleted file mode 100644 index 9a134ea21..000000000 --- a/test cases/failing/84 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/84 dub executable/test.json b/test cases/failing/84 dub executable/test.json deleted file mode 100644 index 6dfff62d0..000000000 --- a/test cases/failing/84 dub executable/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 subproj not-found dep/meson.build b/test cases/failing/84 subproj not-found dep/meson.build new file mode 100644 index 000000000..2b17df17e --- /dev/null +++ b/test cases/failing/84 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/84 subproj not-found dep/subprojects/somesubproj/meson.build b/test cases/failing/84 subproj not-found dep/subprojects/somesubproj/meson.build new file mode 100644 index 000000000..5f451f401 --- /dev/null +++ b/test cases/failing/84 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/84 subproj not-found dep/test.json b/test cases/failing/84 subproj not-found dep/test.json new file mode 100644 index 000000000..bea1ed0e3 --- /dev/null +++ b/test cases/failing/84 subproj not-found dep/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/84 subproj not-found dep/meson.build:2:10: ERROR: Dependency '(anonymous)' is required but not found." + } + ] +} diff --git a/test cases/failing/85 dub compiler/meson.build b/test cases/failing/85 dub compiler/meson.build deleted file mode 100644 index 36f1849e5..000000000 --- a/test cases/failing/85 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/85 dub compiler/test.json b/test cases/failing/85 dub compiler/test.json deleted file mode 100644 index 50ee39b31..000000000 --- a/test cases/failing/85 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/85 dub compiler/meson.build:17:0: ERROR: Dependency \"dubtestproject:test2\" not found" - } - ] -} diff --git a/test cases/failing/85 invalid configure file/input b/test cases/failing/85 invalid configure file/input new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/85 invalid configure file/meson.build b/test cases/failing/85 invalid configure file/meson.build new file mode 100644 index 000000000..08eca2bd0 --- /dev/null +++ b/test cases/failing/85 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/85 invalid configure file/test.json b/test cases/failing/85 invalid configure file/test.json new file mode 100644 index 000000000..1cee20880 --- /dev/null +++ b/test cases/failing/85 invalid configure file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/85 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/86 kwarg dupe/meson.build b/test cases/failing/86 kwarg dupe/meson.build new file mode 100644 index 000000000..06821a278 --- /dev/null +++ b/test cases/failing/86 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/86 kwarg dupe/prog.c b/test cases/failing/86 kwarg dupe/prog.c new file mode 100644 index 000000000..5f3fbe6a2 --- /dev/null +++ b/test cases/failing/86 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/86 kwarg dupe/test.json b/test cases/failing/86 kwarg dupe/test.json new file mode 100644 index 000000000..229debbea --- /dev/null +++ b/test cases/failing/86 kwarg dupe/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/86 kwarg dupe/meson.build:6:2: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." + } + ] +} diff --git a/test cases/failing/86 subproj not-found dep/meson.build b/test cases/failing/86 subproj not-found dep/meson.build deleted file mode 100644 index 2b17df17e..000000000 --- a/test cases/failing/86 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/86 subproj not-found dep/subprojects/somesubproj/meson.build b/test cases/failing/86 subproj not-found dep/subprojects/somesubproj/meson.build deleted file mode 100644 index 5f451f401..000000000 --- a/test cases/failing/86 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/86 subproj not-found dep/test.json b/test cases/failing/86 subproj not-found dep/test.json deleted file mode 100644 index c1acb9a62..000000000 --- a/test cases/failing/86 subproj not-found dep/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/86 subproj not-found dep/meson.build:2:10: 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 deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/87 invalid configure file/meson.build b/test cases/failing/87 invalid configure file/meson.build deleted file mode 100644 index 08eca2bd0..000000000 --- a/test cases/failing/87 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/87 invalid configure file/test.json b/test cases/failing/87 invalid configure file/test.json deleted file mode 100644 index d8ea73d5f..000000000 --- a/test cases/failing/87 invalid configure file/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 missing pch file/meson.build b/test cases/failing/87 missing pch file/meson.build new file mode 100644 index 000000000..a67b79877 --- /dev/null +++ b/test cases/failing/87 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/87 missing pch file/prog.c b/test cases/failing/87 missing pch file/prog.c new file mode 100644 index 000000000..11b7fad8e --- /dev/null +++ b/test cases/failing/87 missing pch file/prog.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +} diff --git a/test cases/failing/87 missing pch file/test.json b/test cases/failing/87 missing pch file/test.json new file mode 100644 index 000000000..a54acb7a7 --- /dev/null +++ b/test cases/failing/87 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/87 missing pch file/meson.build:2:6: ERROR: File pch/prog.h does not exist." + } + ] +} diff --git a/test cases/failing/88 kwarg dupe/meson.build b/test cases/failing/88 kwarg dupe/meson.build deleted file mode 100644 index 06821a278..000000000 --- a/test cases/failing/88 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/88 kwarg dupe/prog.c b/test cases/failing/88 kwarg dupe/prog.c deleted file mode 100644 index 5f3fbe6a2..000000000 --- a/test cases/failing/88 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/88 kwarg dupe/test.json b/test cases/failing/88 kwarg dupe/test.json deleted file mode 100644 index d152725c9..000000000 --- a/test cases/failing/88 kwarg dupe/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/88 kwarg dupe/meson.build:6:2: ERROR: Entry \"install\" defined both as a keyword argument and in a \"kwarg\" entry." - } - ] -} diff --git a/test cases/failing/88 pch source different folder/include/pch.h b/test cases/failing/88 pch source different folder/include/pch.h new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/88 pch source different folder/meson.build b/test cases/failing/88 pch source different folder/meson.build new file mode 100644 index 000000000..d32071772 --- /dev/null +++ b/test cases/failing/88 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/88 pch source different folder/prog.c b/test cases/failing/88 pch source different folder/prog.c new file mode 100644 index 000000000..3fb1295e4 --- /dev/null +++ b/test cases/failing/88 pch source different folder/prog.c @@ -0,0 +1 @@ +int main(void) {} \ No newline at end of file diff --git a/test cases/failing/88 pch source different folder/src/pch.c b/test cases/failing/88 pch source different folder/src/pch.c new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/failing/88 pch source different folder/test.json b/test cases/failing/88 pch source different folder/test.json new file mode 100644 index 000000000..60fa4e0a6 --- /dev/null +++ b/test cases/failing/88 pch source different folder/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/88 pch source different folder/meson.build:4:6: ERROR: PCH files must be stored in the same folder." + } + ] +} diff --git a/test cases/failing/89 missing pch file/meson.build b/test cases/failing/89 missing pch file/meson.build deleted file mode 100644 index a67b79877..000000000 --- a/test cases/failing/89 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/89 missing pch file/prog.c b/test cases/failing/89 missing pch file/prog.c deleted file mode 100644 index 11b7fad8e..000000000 --- a/test cases/failing/89 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/89 missing pch file/test.json b/test cases/failing/89 missing pch file/test.json deleted file mode 100644 index 1924bbf3d..000000000 --- a/test cases/failing/89 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/89 missing pch file/meson.build:2:6: ERROR: File pch/prog.h does not exist." - } - ] -} diff --git a/test cases/failing/89 unknown config tool/meson.build b/test cases/failing/89 unknown config tool/meson.build new file mode 100644 index 000000000..536976e35 --- /dev/null +++ b/test cases/failing/89 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/89 unknown config tool/test.json b/test cases/failing/89 unknown config tool/test.json new file mode 100644 index 000000000..f5c0d96ab --- /dev/null +++ b/test cases/failing/89 unknown config tool/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/89 unknown config tool/meson.build:2:0: ERROR: Dependency \"no-such-config-tool\" not found" + } + ] +} diff --git a/test cases/failing/90 custom target install data/Info.plist.cpp b/test cases/failing/90 custom target install data/Info.plist.cpp new file mode 100644 index 000000000..9ca2fcbaf --- /dev/null +++ b/test cases/failing/90 custom target install data/Info.plist.cpp @@ -0,0 +1 @@ +Some data which gets processed before installation diff --git a/test cases/failing/90 custom target install data/meson.build b/test cases/failing/90 custom target install data/meson.build new file mode 100644 index 000000000..00d348cc0 --- /dev/null +++ b/test cases/failing/90 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/90 custom target install data/preproc.py b/test cases/failing/90 custom target install data/preproc.py new file mode 100644 index 000000000..e6eba4c6a --- /dev/null +++ b/test cases/failing/90 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/90 custom target install data/test.json b/test cases/failing/90 custom target install data/test.json new file mode 100644 index 000000000..d495163f2 --- /dev/null +++ b/test cases/failing/90 custom target install data/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/90 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/90 pch source different folder/include/pch.h b/test cases/failing/90 pch source different folder/include/pch.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/90 pch source different folder/meson.build b/test cases/failing/90 pch source different folder/meson.build deleted file mode 100644 index d32071772..000000000 --- a/test cases/failing/90 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/90 pch source different folder/prog.c b/test cases/failing/90 pch source different folder/prog.c deleted file mode 100644 index 3fb1295e4..000000000 --- a/test cases/failing/90 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/90 pch source different folder/src/pch.c b/test cases/failing/90 pch source different folder/src/pch.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/failing/90 pch source different folder/test.json b/test cases/failing/90 pch source different folder/test.json deleted file mode 100644 index 49cdcb0f7..000000000 --- a/test cases/failing/90 pch source different folder/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/90 pch source different folder/meson.build:4:6: ERROR: PCH files must be stored in the same folder." - } - ] -} diff --git a/test cases/failing/91 add dict non string key/meson.build b/test cases/failing/91 add dict non string key/meson.build new file mode 100644 index 000000000..c81a3f764 --- /dev/null +++ b/test cases/failing/91 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/91 add dict non string key/test.json b/test cases/failing/91 add dict non string key/test.json new file mode 100644 index 000000000..db506b2e0 --- /dev/null +++ b/test cases/failing/91 add dict non string key/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/91 add dict non string key/meson.build:9:9: ERROR: Key must be a string" + } + ] +} diff --git a/test cases/failing/91 unknown config tool/meson.build b/test cases/failing/91 unknown config tool/meson.build deleted file mode 100644 index 536976e35..000000000 --- a/test cases/failing/91 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/91 unknown config tool/test.json b/test cases/failing/91 unknown config tool/test.json deleted file mode 100644 index e225167d5..000000000 --- a/test cases/failing/91 unknown config tool/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 add dict duplicate keys/meson.build b/test cases/failing/92 add dict duplicate keys/meson.build new file mode 100644 index 000000000..7a9b523b0 --- /dev/null +++ b/test cases/failing/92 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/92 add dict duplicate keys/test.json b/test cases/failing/92 add dict duplicate keys/test.json new file mode 100644 index 000000000..b428a5387 --- /dev/null +++ b/test cases/failing/92 add dict duplicate keys/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/92 add dict duplicate keys/meson.build:9:27: ERROR: Duplicate dictionary key: myKey" + } + ] +} 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 deleted file mode 100644 index 9ca2fcbaf..000000000 --- a/test cases/failing/92 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/92 custom target install data/meson.build b/test cases/failing/92 custom target install data/meson.build deleted file mode 100644 index 00d348cc0..000000000 --- a/test cases/failing/92 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/92 custom target install data/preproc.py b/test cases/failing/92 custom target install data/preproc.py deleted file mode 100644 index e6eba4c6a..000000000 --- a/test cases/failing/92 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/92 custom target install data/test.json b/test cases/failing/92 custom target install data/test.json deleted file mode 100644 index 46ab01362..000000000 --- a/test cases/failing/92 custom target install data/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/93 add dict non string key/meson.build b/test cases/failing/93 add dict non string key/meson.build deleted file mode 100644 index c81a3f764..000000000 --- a/test cases/failing/93 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/93 add dict non string key/test.json b/test cases/failing/93 add dict non string key/test.json deleted file mode 100644 index 0ca2f532a..000000000 --- a/test cases/failing/93 add dict non string key/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/93 add dict non string key/meson.build:9:9: ERROR: Key must be a string" - } - ] -} diff --git a/test cases/failing/93 no host get_external_property/meson.build b/test cases/failing/93 no host get_external_property/meson.build new file mode 100644 index 000000000..c9567549f --- /dev/null +++ b/test cases/failing/93 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/93 no host get_external_property/test.json b/test cases/failing/93 no host get_external_property/test.json new file mode 100644 index 000000000..b26f3c9b6 --- /dev/null +++ b/test cases/failing/93 no host get_external_property/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/93 no host get_external_property/meson.build:3:14: ERROR: Unknown property for host machine: nonexisting" + } + ] +} diff --git a/test cases/failing/94 add dict duplicate keys/meson.build b/test cases/failing/94 add dict duplicate keys/meson.build deleted file mode 100644 index 7a9b523b0..000000000 --- a/test cases/failing/94 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/94 add dict duplicate keys/test.json b/test cases/failing/94 add dict duplicate keys/test.json deleted file mode 100644 index 23a557374..000000000 --- a/test cases/failing/94 add dict duplicate keys/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/94 add dict duplicate keys/meson.build:9:27: ERROR: Duplicate dictionary key: myKey" - } - ] -} diff --git a/test cases/failing/94 no native compiler/main.c b/test cases/failing/94 no native compiler/main.c new file mode 100644 index 000000000..9b6bdc2ec --- /dev/null +++ b/test cases/failing/94 no native compiler/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/94 no native compiler/meson.build b/test cases/failing/94 no native compiler/meson.build new file mode 100644 index 000000000..f0126ac15 --- /dev/null +++ b/test cases/failing/94 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/94 no native compiler/test.json b/test cases/failing/94 no native compiler/test.json new file mode 100644 index 000000000..7181c6b7e --- /dev/null +++ b/test cases/failing/94 no native compiler/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/94 no native compiler/meson.build:12:0: ERROR: No host machine compiler for \"main.c\"" + } + ] +} 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 deleted file mode 100644 index c9567549f..000000000 --- a/test cases/failing/95 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/95 no host get_external_property/test.json b/test cases/failing/95 no host get_external_property/test.json deleted file mode 100644 index 18507e715..000000000 --- a/test cases/failing/95 no host get_external_property/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/95 no host get_external_property/meson.build:3:14: ERROR: Unknown property for host machine: nonexisting" - } - ] -} diff --git a/test cases/failing/95 subdir parse error/meson.build b/test cases/failing/95 subdir parse error/meson.build new file mode 100644 index 000000000..a744396ca --- /dev/null +++ b/test cases/failing/95 subdir parse error/meson.build @@ -0,0 +1,2 @@ +project('subdir false plusassign') +subdir('subdir') diff --git a/test cases/failing/95 subdir parse error/subdir/meson.build b/test cases/failing/95 subdir parse error/subdir/meson.build new file mode 100644 index 000000000..3ac5ef938 --- /dev/null +++ b/test cases/failing/95 subdir parse error/subdir/meson.build @@ -0,0 +1 @@ +3 += 4 diff --git a/test cases/failing/95 subdir parse error/test.json b/test cases/failing/95 subdir parse error/test.json new file mode 100644 index 000000000..c94ed58d4 --- /dev/null +++ b/test cases/failing/95 subdir parse error/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/95 subdir parse error/subdir/meson.build:1:0: ERROR: Plusassignment target must be an id." + } + ] +} diff --git a/test cases/failing/96 invalid option file/meson.build b/test cases/failing/96 invalid option file/meson.build new file mode 100644 index 000000000..b0347c33f --- /dev/null +++ b/test cases/failing/96 invalid option file/meson.build @@ -0,0 +1 @@ +project('invalid option file') diff --git a/test cases/failing/96 invalid option file/meson_options.txt b/test cases/failing/96 invalid option file/meson_options.txt new file mode 100644 index 000000000..eef843b53 --- /dev/null +++ b/test cases/failing/96 invalid option file/meson_options.txt @@ -0,0 +1 @@ +' diff --git a/test cases/failing/96 invalid option file/test.json b/test cases/failing/96 invalid option file/test.json new file mode 100644 index 000000000..5f1a89f7c --- /dev/null +++ b/test cases/failing/96 invalid option file/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/96 invalid option file/meson_options.txt:1:0: ERROR: lexer" + } + ] +} diff --git a/test cases/failing/96 no native compiler/main.c b/test cases/failing/96 no native compiler/main.c deleted file mode 100644 index 9b6bdc2ec..000000000 --- a/test cases/failing/96 no native compiler/main.c +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index f0126ac15..000000000 --- a/test cases/failing/96 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/96 no native compiler/test.json b/test cases/failing/96 no native compiler/test.json deleted file mode 100644 index 01077275c..000000000 --- a/test cases/failing/96 no native compiler/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 lang/main.c b/test cases/failing/97 no lang/main.c new file mode 100644 index 000000000..9b6bdc2ec --- /dev/null +++ b/test cases/failing/97 no lang/main.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/failing/97 no lang/meson.build b/test cases/failing/97 no lang/meson.build new file mode 100644 index 000000000..85c5db8e5 --- /dev/null +++ b/test cases/failing/97 no lang/meson.build @@ -0,0 +1,2 @@ +project('target without lang') +executable('main', 'main.c') diff --git a/test cases/failing/97 no lang/test.json b/test cases/failing/97 no lang/test.json new file mode 100644 index 000000000..a2af0a197 --- /dev/null +++ b/test cases/failing/97 no lang/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/97 no lang/meson.build:2: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 deleted file mode 100644 index a744396ca..000000000 --- a/test cases/failing/97 subdir parse error/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -project('subdir false plusassign') -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 deleted file mode 100644 index 3ac5ef938..000000000 --- a/test cases/failing/97 subdir parse error/subdir/meson.build +++ /dev/null @@ -1 +0,0 @@ -3 += 4 diff --git a/test cases/failing/97 subdir parse error/test.json b/test cases/failing/97 subdir parse error/test.json deleted file mode 100644 index 414789ee0..000000000 --- a/test cases/failing/97 subdir parse error/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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 deleted file mode 100644 index b0347c33f..000000000 --- a/test cases/failing/98 invalid option file/meson.build +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index eef843b53..000000000 --- a/test cases/failing/98 invalid option file/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -' diff --git a/test cases/failing/98 invalid option file/test.json b/test cases/failing/98 invalid option file/test.json deleted file mode 100644 index 6ab53931a..000000000 --- a/test cases/failing/98 invalid option file/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "stdout": [ - { - "line": "test cases/failing/98 invalid option file/meson_options.txt:1:0: ERROR: lexer" - } - ] -} diff --git a/test cases/failing/98 no glib-compile-resources/meson.build b/test cases/failing/98 no glib-compile-resources/meson.build new file mode 100644 index 000000000..aae0569da --- /dev/null +++ b/test cases/failing/98 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/98 no glib-compile-resources/test.json b/test cases/failing/98 no glib-compile-resources/test.json new file mode 100644 index 000000000..d5edd7692 --- /dev/null +++ b/test cases/failing/98 no glib-compile-resources/test.json @@ -0,0 +1,7 @@ +{ + "stdout": [ + { + "line": "test cases/failing/98 no glib-compile-resources/meson.build:8:12: ERROR: Program 'glib-compile-resources' not found or not executable" + } + ] +} diff --git a/test cases/failing/98 no glib-compile-resources/trivial.gresource.xml b/test cases/failing/98 no glib-compile-resources/trivial.gresource.xml new file mode 100644 index 000000000..1447b984d --- /dev/null +++ b/test cases/failing/98 no glib-compile-resources/trivial.gresource.xml @@ -0,0 +1,3 @@ + + + diff --git a/test cases/failing/99 no lang/main.c b/test cases/failing/99 no lang/main.c deleted file mode 100644 index 9b6bdc2ec..000000000 --- a/test cases/failing/99 no lang/main.c +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 85c5db8e5..000000000 --- a/test cases/failing/99 no lang/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -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 deleted file mode 100644 index 48c6dd70e..000000000 --- a/test cases/failing/99 no lang/test.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "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/failing/99 number in combo/meson.build b/test cases/failing/99 number in combo/meson.build new file mode 100644 index 000000000..1a647df1a --- /dev/null +++ b/test cases/failing/99 number in combo/meson.build @@ -0,0 +1 @@ +project('number in combo') diff --git a/test cases/failing/99 number in combo/nativefile.ini b/test cases/failing/99 number in combo/nativefile.ini new file mode 100644 index 000000000..55f10fc20 --- /dev/null +++ b/test cases/failing/99 number in combo/nativefile.ini @@ -0,0 +1,2 @@ +[built-in options] +optimization = 1 diff --git a/test cases/failing/99 number in combo/test.json b/test cases/failing/99 number in combo/test.json new file mode 100644 index 000000000..f59812e3b --- /dev/null +++ b/test cases/failing/99 number in combo/test.json @@ -0,0 +1,5 @@ +{ + "stdout": [ + { "line": "test cases/failing/99 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): \"plain\", \"0\", \"g\", \"1\", \"2\", \"3\", \"s\"." } + ] +} diff --git a/test cases/unit/100 custom target name/file.txt.in b/test cases/unit/100 custom target name/file.txt.in deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/100 custom target name/meson.build b/test cases/unit/100 custom target name/meson.build deleted file mode 100644 index 82876149f..000000000 --- a/test cases/unit/100 custom target name/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('custom target name', 'c') - -python = find_program('python3') - -# Name argument is optional and should default to 'file.txt' -custom_target( - input: 'file.txt.in', - output: '@BASENAME@', - command: [python, '--version'], - build_by_default: true, - capture: true, -) - -subdir('subdir') diff --git a/test cases/unit/100 custom target name/subdir/meson.build b/test cases/unit/100 custom target name/subdir/meson.build deleted file mode 100644 index 785a7b366..000000000 --- a/test cases/unit/100 custom target name/subdir/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -# Name argument is optional and should default to 'file.txt', but should be -# displayed as 'subdir/file.txt' by ninja. -custom_target( - input: '../file.txt.in', - output: ['@BASENAME@'], - command: [python, '--version'], - build_by_default: true, - capture: true, -) diff --git a/test cases/unit/100 relative find program/foo.py b/test cases/unit/100 relative find program/foo.py new file mode 100755 index 000000000..21239b74b --- /dev/null +++ b/test cases/unit/100 relative find program/foo.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 + +exit(0) \ No newline at end of file diff --git a/test cases/unit/100 relative find program/meson.build b/test cases/unit/100 relative find program/meson.build new file mode 100644 index 000000000..5745d8acb --- /dev/null +++ b/test cases/unit/100 relative find program/meson.build @@ -0,0 +1,3 @@ +project('relative find program') + +subdir('subdir') \ No newline at end of file diff --git a/test cases/unit/100 relative find program/subdir/meson.build b/test cases/unit/100 relative find program/subdir/meson.build new file mode 100644 index 000000000..475f5f51c --- /dev/null +++ b/test cases/unit/100 relative find program/subdir/meson.build @@ -0,0 +1,2 @@ +prog = find_program('./foo.py', required: false) +assert(not prog.found()) \ No newline at end of file diff --git a/test cases/unit/101 relative find program/foo.py b/test cases/unit/101 relative find program/foo.py deleted file mode 100755 index 21239b74b..000000000 --- a/test cases/unit/101 relative find program/foo.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python3 - -exit(0) \ No newline at end of file diff --git a/test cases/unit/101 relative find program/meson.build b/test cases/unit/101 relative find program/meson.build deleted file mode 100644 index 5745d8acb..000000000 --- a/test cases/unit/101 relative find program/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('relative find program') - -subdir('subdir') \ No newline at end of file diff --git a/test cases/unit/101 relative find program/subdir/meson.build b/test cases/unit/101 relative find program/subdir/meson.build deleted file mode 100644 index 475f5f51c..000000000 --- a/test cases/unit/101 relative find program/subdir/meson.build +++ /dev/null @@ -1,2 +0,0 @@ -prog = find_program('./foo.py', required: false) -assert(not prog.found()) \ No newline at end of file diff --git a/test cases/unit/101 rlib linkage/lib2.rs b/test cases/unit/101 rlib linkage/lib2.rs new file mode 100644 index 000000000..3487bc5a9 --- /dev/null +++ b/test cases/unit/101 rlib linkage/lib2.rs @@ -0,0 +1,5 @@ +use lib; + +pub fn fun() { + lib::fun(); +} diff --git a/test cases/unit/101 rlib linkage/main.rs b/test cases/unit/101 rlib linkage/main.rs new file mode 100644 index 000000000..d0f82e4e1 --- /dev/null +++ b/test cases/unit/101 rlib linkage/main.rs @@ -0,0 +1,5 @@ +use lib2::fun; + +fn main() { + fun(); +} diff --git a/test cases/unit/101 rlib linkage/meson.build b/test cases/unit/101 rlib linkage/meson.build new file mode 100644 index 000000000..2d15b2a14 --- /dev/null +++ b/test cases/unit/101 rlib linkage/meson.build @@ -0,0 +1,22 @@ +project('rlib linkage', 'rust', default_options : ['rust_std=2018']) + +lib = static_library( + 'lib', + 'lib.rs', + rust_crate_type : 'rlib', +) + +lib2 = static_library( + 'lib2', + 'lib2.rs', + rust_crate_type : 'rlib', + link_with : lib, +) + +exe = executable( + 'exe', + 'main.rs', + link_with : lib2, +) + +test('main', exe) diff --git a/test cases/unit/102 python without pkgconfig/meson.build b/test cases/unit/102 python without pkgconfig/meson.build new file mode 100644 index 000000000..014a61751 --- /dev/null +++ b/test cases/unit/102 python without pkgconfig/meson.build @@ -0,0 +1,4 @@ +project('python without pkgconfig', 'c') + +# This unit test is ran with PKG_CONFIG=notfound +import('python').find_installation().dependency() diff --git a/test cases/unit/102 rlib linkage/lib2.rs b/test cases/unit/102 rlib linkage/lib2.rs deleted file mode 100644 index 3487bc5a9..000000000 --- a/test cases/unit/102 rlib linkage/lib2.rs +++ /dev/null @@ -1,5 +0,0 @@ -use lib; - -pub fn fun() { - lib::fun(); -} diff --git a/test cases/unit/102 rlib linkage/main.rs b/test cases/unit/102 rlib linkage/main.rs deleted file mode 100644 index d0f82e4e1..000000000 --- a/test cases/unit/102 rlib linkage/main.rs +++ /dev/null @@ -1,5 +0,0 @@ -use lib2::fun; - -fn main() { - fun(); -} diff --git a/test cases/unit/102 rlib linkage/meson.build b/test cases/unit/102 rlib linkage/meson.build deleted file mode 100644 index 2d15b2a14..000000000 --- a/test cases/unit/102 rlib linkage/meson.build +++ /dev/null @@ -1,22 +0,0 @@ -project('rlib linkage', 'rust', default_options : ['rust_std=2018']) - -lib = static_library( - 'lib', - 'lib.rs', - rust_crate_type : 'rlib', -) - -lib2 = static_library( - 'lib2', - 'lib2.rs', - rust_crate_type : 'rlib', - link_with : lib, -) - -exe = executable( - 'exe', - 'main.rs', - link_with : lib2, -) - -test('main', exe) diff --git a/test cases/unit/103 python without pkgconfig/meson.build b/test cases/unit/103 python without pkgconfig/meson.build deleted file mode 100644 index 014a61751..000000000 --- a/test cases/unit/103 python without pkgconfig/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('python without pkgconfig', 'c') - -# This unit test is ran with PKG_CONFIG=notfound -import('python').find_installation().dependency() diff --git a/test cases/unit/103 strip/lib.c b/test cases/unit/103 strip/lib.c new file mode 100644 index 000000000..7d8163c3b --- /dev/null +++ b/test cases/unit/103 strip/lib.c @@ -0,0 +1,3 @@ +#include + +void func(void){ fprintf(stderr, "Test 1 2 3\n"); } diff --git a/test cases/unit/103 strip/meson.build b/test cases/unit/103 strip/meson.build new file mode 100644 index 000000000..dff61ab43 --- /dev/null +++ b/test cases/unit/103 strip/meson.build @@ -0,0 +1,3 @@ +project('strip', 'c') + +shared_library('a', 'lib.c', install: true) diff --git a/test cases/unit/104 debug function/meson.build b/test cases/unit/104 debug function/meson.build new file mode 100644 index 000000000..c3f4c769f --- /dev/null +++ b/test cases/unit/104 debug function/meson.build @@ -0,0 +1,4 @@ +project('debug function', 'c') + +debug('This is an example debug output, should only end up in debug log') +debug('Test logging other things', true, 1, ['Array'], {'Key' : 'Value'}) diff --git a/test cases/unit/104 strip/lib.c b/test cases/unit/104 strip/lib.c deleted file mode 100644 index 7d8163c3b..000000000 --- a/test cases/unit/104 strip/lib.c +++ /dev/null @@ -1,3 +0,0 @@ -#include - -void func(void){ fprintf(stderr, "Test 1 2 3\n"); } diff --git a/test cases/unit/104 strip/meson.build b/test cases/unit/104 strip/meson.build deleted file mode 100644 index dff61ab43..000000000 --- a/test cases/unit/104 strip/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('strip', 'c') - -shared_library('a', 'lib.c', install: true) diff --git a/test cases/unit/105 debug function/meson.build b/test cases/unit/105 debug function/meson.build deleted file mode 100644 index c3f4c769f..000000000 --- a/test cases/unit/105 debug function/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('debug function', 'c') - -debug('This is an example debug output, should only end up in debug log') -debug('Test logging other things', true, 1, ['Array'], {'Key' : 'Value'}) diff --git a/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build b/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build new file mode 100644 index 000000000..ff2128624 --- /dev/null +++ b/test cases/unit/105 pkgconfig relocatable with absolute path/meson.build @@ -0,0 +1,15 @@ +project( + 'pkgconfig-relocatable-with-absolute-path', + version : '1.0', + default_options: [ + 'pkgconfig.relocatable=true', + ]) + +pkgg = import('pkgconfig') + +pkgg.generate( + name : 'libsimple', + version : '1.0', + description : 'A simple pkgconfig.', + install_dir: get_option('prefix')/'share/misc/pkgconfig', +) diff --git a/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build b/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build deleted file mode 100644 index ff2128624..000000000 --- a/test cases/unit/106 pkgconfig relocatable with absolute path/meson.build +++ /dev/null @@ -1,15 +0,0 @@ -project( - 'pkgconfig-relocatable-with-absolute-path', - version : '1.0', - default_options: [ - 'pkgconfig.relocatable=true', - ]) - -pkgg = import('pkgconfig') - -pkgg.generate( - name : 'libsimple', - version : '1.0', - description : 'A simple pkgconfig.', - install_dir: get_option('prefix')/'share/misc/pkgconfig', -) diff --git a/test cases/unit/110 replace unencodable xml chars/meson.build b/test cases/unit/110 replace unencodable xml chars/meson.build deleted file mode 100644 index 73485b073..000000000 --- a/test cases/unit/110 replace unencodable xml chars/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('replace unencodable xml chars') - -test_script = find_program('script.py') -test('main', test_script, verbose: true) diff --git a/test cases/unit/110 replace unencodable xml chars/script.py b/test cases/unit/110 replace unencodable xml chars/script.py deleted file mode 100644 index 2f2d4d67b..000000000 --- a/test cases/unit/110 replace unencodable xml chars/script.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -# Print base string(\nHello Meson\n) to see valid chars are not replaced -print('\n\x48\x65\x6c\x6c\x6f\x20\x4d\x65\x73\x6f\x6e\n') -# Print invalid input from all known unencodable chars -print( - '\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11' - '\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f') - -# Cover for potential encoding issues -try: - print( - '\x80\x81\x82\x83\x84\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f' - '\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e' - '\x9f\ufdd0\ufdd1\ufdd2\ufdd3\ufdd4\ufdd5\ufdd6\ufdd7\ufdd8' - '\ufdd9\ufdda\ufddb\ufddc\ufddd\ufdde\ufddf\ufde0\ufde1' - '\ufde2\ufde3\ufde4\ufde5\ufde6\ufde7\ufde8\ufde9\ufdea' - '\ufdeb\ufdec\ufded\ufdee\ufdef\ufffe\uffff') -except: - pass - -# Cover for potential encoding issues -try: - if sys.maxunicode >= 0x10000: - print( - '\U0001fffe\U0001ffff\U0002fffe\U0002ffff' - '\U0003fffe\U0003ffff\U0004fffe\U0004ffff' - '\U0005fffe\U0005ffff\U0006fffe\U0006ffff' - '\U0007fffe\U0007ffff\U0008fffe\U0008ffff' - '\U0009fffe\U0009ffff\U000afffe\U000affff' - '\U000bfffe\U000bffff\U000cfffe\U000cffff' - '\U000dfffe\U000dffff\U000efffe\U000effff' - '\U000ffffe\U000fffff\U0010fffe\U0010ffff') -except: - pass diff --git a/test cases/unit/111 classpath/com/mesonbuild/Simple.java b/test cases/unit/111 classpath/com/mesonbuild/Simple.java deleted file mode 100644 index 325a49a21..000000000 --- a/test cases/unit/111 classpath/com/mesonbuild/Simple.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.mesonbuild; - -class Simple { - public static void main(String [] args) { - System.out.println("Java is working.\n"); - } -} diff --git a/test cases/unit/111 classpath/meson.build b/test cases/unit/111 classpath/meson.build deleted file mode 100644 index e6b9b840a..000000000 --- a/test cases/unit/111 classpath/meson.build +++ /dev/null @@ -1,14 +0,0 @@ -project('simplejava', 'java') - -one = jar('one', 'com/mesonbuild/Simple.java', - main_class : 'com.mesonbuild.Simple', - install : true, - install_dir : get_option('bindir'), -) - -two = jar('two', 'com/mesonbuild/Simple.java', - main_class : 'com.mesonbuild.Simple', - install : true, - install_dir : get_option('bindir'), - link_with : one, -) diff --git a/test cases/unit/111 replace unencodable xml chars/meson.build b/test cases/unit/111 replace unencodable xml chars/meson.build new file mode 100644 index 000000000..73485b073 --- /dev/null +++ b/test cases/unit/111 replace unencodable xml chars/meson.build @@ -0,0 +1,4 @@ +project('replace unencodable xml chars') + +test_script = find_program('script.py') +test('main', test_script, verbose: true) diff --git a/test cases/unit/111 replace unencodable xml chars/script.py b/test cases/unit/111 replace unencodable xml chars/script.py new file mode 100644 index 000000000..2f2d4d67b --- /dev/null +++ b/test cases/unit/111 replace unencodable xml chars/script.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 + +import sys + +# Print base string(\nHello Meson\n) to see valid chars are not replaced +print('\n\x48\x65\x6c\x6c\x6f\x20\x4d\x65\x73\x6f\x6e\n') +# Print invalid input from all known unencodable chars +print( + '\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11' + '\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f') + +# Cover for potential encoding issues +try: + print( + '\x80\x81\x82\x83\x84\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f' + '\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e' + '\x9f\ufdd0\ufdd1\ufdd2\ufdd3\ufdd4\ufdd5\ufdd6\ufdd7\ufdd8' + '\ufdd9\ufdda\ufddb\ufddc\ufddd\ufdde\ufddf\ufde0\ufde1' + '\ufde2\ufde3\ufde4\ufde5\ufde6\ufde7\ufde8\ufde9\ufdea' + '\ufdeb\ufdec\ufded\ufdee\ufdef\ufffe\uffff') +except: + pass + +# Cover for potential encoding issues +try: + if sys.maxunicode >= 0x10000: + print( + '\U0001fffe\U0001ffff\U0002fffe\U0002ffff' + '\U0003fffe\U0003ffff\U0004fffe\U0004ffff' + '\U0005fffe\U0005ffff\U0006fffe\U0006ffff' + '\U0007fffe\U0007ffff\U0008fffe\U0008ffff' + '\U0009fffe\U0009ffff\U000afffe\U000affff' + '\U000bfffe\U000bffff\U000cfffe\U000cffff' + '\U000dfffe\U000dffff\U000efffe\U000effff' + '\U000ffffe\U000fffff\U0010fffe\U0010ffff') +except: + pass diff --git a/test cases/unit/112 classpath/com/mesonbuild/Simple.java b/test cases/unit/112 classpath/com/mesonbuild/Simple.java new file mode 100644 index 000000000..325a49a21 --- /dev/null +++ b/test cases/unit/112 classpath/com/mesonbuild/Simple.java @@ -0,0 +1,7 @@ +package com.mesonbuild; + +class Simple { + public static void main(String [] args) { + System.out.println("Java is working.\n"); + } +} diff --git a/test cases/unit/112 classpath/meson.build b/test cases/unit/112 classpath/meson.build new file mode 100644 index 000000000..e6b9b840a --- /dev/null +++ b/test cases/unit/112 classpath/meson.build @@ -0,0 +1,14 @@ +project('simplejava', 'java') + +one = jar('one', 'com/mesonbuild/Simple.java', + main_class : 'com.mesonbuild.Simple', + install : true, + install_dir : get_option('bindir'), +) + +two = jar('two', 'com/mesonbuild/Simple.java', + main_class : 'com.mesonbuild.Simple', + install : true, + install_dir : get_option('bindir'), + link_with : one, +) diff --git a/test cases/unit/112 list build options/meson.build b/test cases/unit/112 list build options/meson.build deleted file mode 100644 index 2d634d38f..000000000 --- a/test cases/unit/112 list build options/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('feature user option', 'c') - -feature_opts = get_option('auto_features') -optional_opt = get_option('optional') - -message('Build options:', meson.build_options()) diff --git a/test cases/unit/112 list build options/meson_options.txt b/test cases/unit/112 list build options/meson_options.txt deleted file mode 100644 index d84f22a34..000000000 --- a/test cases/unit/112 list build options/meson_options.txt +++ /dev/null @@ -1 +0,0 @@ -option('optional', type : 'feature', value : 'auto', description : 'An optional feature') diff --git a/test cases/unit/113 complex link cases/main.c b/test cases/unit/113 complex link cases/main.c deleted file mode 100644 index 739b413af..000000000 --- a/test cases/unit/113 complex link cases/main.c +++ /dev/null @@ -1,6 +0,0 @@ -int s3(void); - -int main(int argc, char *argv[]) -{ - return s3(); -} diff --git a/test cases/unit/113 complex link cases/meson.build b/test cases/unit/113 complex link cases/meson.build deleted file mode 100644 index 3b4b898df..000000000 --- a/test cases/unit/113 complex link cases/meson.build +++ /dev/null @@ -1,111 +0,0 @@ -project('complex link cases', 'c') - -cc = meson.get_compiler('c') - -# In all tests, e1 uses s3 which uses s2 which uses s1. - -# Executable links with s3 and s1 but not s2 because it is included in s3. -s1 = static_library('t1-s1', 's1.c') -s2 = static_library('t1-s2', 's2.c', link_with: s1) -s3 = static_library('t1-s3', 's3.c', link_whole: s2) -e = executable('t1-e1', 'main.c', link_with: s3) - -# s3 is installed but not s1 so it has to include s1 too. -# Executable links only s3 because it contains s1 and s2. -s1 = static_library('t2-s1', 's1.c') -s2 = static_library('t2-s2', 's2.c', link_with: s1) -s3 = static_library('t2-s3', 's3.c', link_whole: s2, install: true) -e = executable('t2-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 only -s1 = static_library('t3-s1', 's1.c') -s2 = static_library('t3-s2', 's2.c', link_with: s1) -s3 = shared_library('t3-s3', 's3.c', link_with: s2) -e = executable('t3-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 and s2 -s1 = static_library('t4-s1', 's1.c') -s2 = shared_library('t4-s2', 's2.c', link_with: s1) -s3 = static_library('t4-s3', 's3.c', link_with: s2) -e = executable('t4-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 and s1 -s1 = shared_library('t5-s1', 's1.c') -s2 = static_library('t5-s2', 's2.c', link_with: s1) -s3 = static_library('t5-s3', 's3.c', link_with: s2, install: true) -e = executable('t5-e1', 'main.c', link_with: s3) - -# Executable needs to link with s3 and s2 -s1 = static_library('t6-s1', 's1.c') -s2 = static_library('t6-s2', 's2.c', link_with: s1, install: true) -s3 = static_library('t6-s3', 's3.c', link_with: s2, install: true) -e = executable('t6-e1', 'main.c', link_with: s3) - -# Regression test: s1 gets promoted to link_whole and that used to make all other -# libraries in the list (s2) to be ignored. -# Executable only needs to link with s3. -# See https://github.com/mesonbuild/meson/issues/11956. -s1 = static_library('t7-s1', 's1.c') -s2 = static_library('t7-s2', 's2.c') -s3 = static_library('t7-s3', 's3.c', link_with: [s1, s2], install: true) -e = executable('t7-e1', 'main.c', link_with: s3) - -# Regression test: s3 should come last in the linker command. This seems to be -# required for at least backward compatibility reasons: -# https://github.com/mesonbuild/meson/pull/11957#issuecomment-1629243208 -s1 = static_library('t8-s1', 's1.c') -s2 = static_library('t8-s2', 's2.c') -s3 = static_library('t8-s3', 's3.c') -e = executable('t8-e1', 'main.c', - link_with: [s1, s2], - dependencies: declare_dependency(link_with: s3), -) - -if cc.get_argument_syntax() == 'gcc' - # s1 is an internal static library, using custom target. - s1_o = custom_target( - input: 's1.c', - output: 's1.c.o', - command: [cc.cmd_array(), '-c', '-o', '@OUTPUT@', '@INPUT@'] - ) - s1 = custom_target( - output: 'libt9-s1.a', - command: ['ar', 'rcs', '@OUTPUT@', s1_o], - ) - - # Executable needs to link with s1, s2 and s3. - s2 = static_library('t9-s2', 's2.c', link_with: s1) - s3 = static_library('t9-s3', 's3.c', link_with: s2) - e = executable('t9-e1', 'main.c', link_with: s3) - - # s2 cannot be installed because s1 is not being installed and Meson cannot - # extract object files from the custom target. - testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t10-s2\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t10-s2\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') - s2 = static_library('t10-s2', 's2.c', link_with: s1, install: true) - endtestcase - - # s3 cannot be installed because s1 is not being installed and Meson cannot - # extract object files from the custom target. - testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t11-s3\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t11-s3\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') - s2 = static_library('t11-s2', 's2.c', link_with: s1) - s3 = static_library('t11-s3', 's3.c', link_with: s2, install: true) - endtestcase - - # s1 is an installed static library, using custom target. - s1 = custom_target( - output: 'libt12-s1.a', - command: ['ar', 'rcs', '@OUTPUT@', s1_o], - install: true, - install_dir: get_option('libdir'), - ) - - # Executable needs to link with s1, s2 and s3. - s2 = static_library('t12-s2', 's2.c', link_with: s1, install: true) - s3 = static_library('t12-s3', 's3.c', link_with: s2) - e = executable('t12-e1', 'main.c', link_with: s3) - - # Executable links with s3 and s1 but not s2 because it is included in s3. - s2 = static_library('t13-s2', 's2.c', link_with: s1) - s3 = static_library('t13-s3', 's3.c', link_with: s2, install: true) - e = executable('t13-e1', 'main.c', link_with: s3) -endif diff --git a/test cases/unit/113 complex link cases/s1.c b/test cases/unit/113 complex link cases/s1.c deleted file mode 100644 index 68bba4949..000000000 --- a/test cases/unit/113 complex link cases/s1.c +++ /dev/null @@ -1,3 +0,0 @@ -int s1(void) { - return 1; -} diff --git a/test cases/unit/113 complex link cases/s2.c b/test cases/unit/113 complex link cases/s2.c deleted file mode 100644 index 835870c04..000000000 --- a/test cases/unit/113 complex link cases/s2.c +++ /dev/null @@ -1,5 +0,0 @@ -int s1(void); - -int s2(void) { - return s1() + 1; -} diff --git a/test cases/unit/113 complex link cases/s3.c b/test cases/unit/113 complex link cases/s3.c deleted file mode 100644 index 08e062010..000000000 --- a/test cases/unit/113 complex link cases/s3.c +++ /dev/null @@ -1,5 +0,0 @@ -int s2(void); - -int s3(void) { - return s2() + 1; -} diff --git a/test cases/unit/113 list build options/meson.build b/test cases/unit/113 list build options/meson.build new file mode 100644 index 000000000..2d634d38f --- /dev/null +++ b/test cases/unit/113 list build options/meson.build @@ -0,0 +1,6 @@ +project('feature user option', 'c') + +feature_opts = get_option('auto_features') +optional_opt = get_option('optional') + +message('Build options:', meson.build_options()) diff --git a/test cases/unit/113 list build options/meson_options.txt b/test cases/unit/113 list build options/meson_options.txt new file mode 100644 index 000000000..d84f22a34 --- /dev/null +++ b/test cases/unit/113 list build options/meson_options.txt @@ -0,0 +1 @@ +option('optional', type : 'feature', value : 'auto', description : 'An optional feature') diff --git a/test cases/unit/114 c cpp stds/meson.build b/test cases/unit/114 c cpp stds/meson.build deleted file mode 100644 index 0b15efc08..000000000 --- a/test cases/unit/114 c cpp stds/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('c cpp stds', 'c', 'cpp', - default_options: [ - 'c_std=gnu89,c89', - 'cpp_std=gnu++98,vc++11', - ], -) diff --git a/test cases/unit/114 complex link cases/main.c b/test cases/unit/114 complex link cases/main.c new file mode 100644 index 000000000..739b413af --- /dev/null +++ b/test cases/unit/114 complex link cases/main.c @@ -0,0 +1,6 @@ +int s3(void); + +int main(int argc, char *argv[]) +{ + return s3(); +} diff --git a/test cases/unit/114 complex link cases/meson.build b/test cases/unit/114 complex link cases/meson.build new file mode 100644 index 000000000..3b4b898df --- /dev/null +++ b/test cases/unit/114 complex link cases/meson.build @@ -0,0 +1,111 @@ +project('complex link cases', 'c') + +cc = meson.get_compiler('c') + +# In all tests, e1 uses s3 which uses s2 which uses s1. + +# Executable links with s3 and s1 but not s2 because it is included in s3. +s1 = static_library('t1-s1', 's1.c') +s2 = static_library('t1-s2', 's2.c', link_with: s1) +s3 = static_library('t1-s3', 's3.c', link_whole: s2) +e = executable('t1-e1', 'main.c', link_with: s3) + +# s3 is installed but not s1 so it has to include s1 too. +# Executable links only s3 because it contains s1 and s2. +s1 = static_library('t2-s1', 's1.c') +s2 = static_library('t2-s2', 's2.c', link_with: s1) +s3 = static_library('t2-s3', 's3.c', link_whole: s2, install: true) +e = executable('t2-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 only +s1 = static_library('t3-s1', 's1.c') +s2 = static_library('t3-s2', 's2.c', link_with: s1) +s3 = shared_library('t3-s3', 's3.c', link_with: s2) +e = executable('t3-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 and s2 +s1 = static_library('t4-s1', 's1.c') +s2 = shared_library('t4-s2', 's2.c', link_with: s1) +s3 = static_library('t4-s3', 's3.c', link_with: s2) +e = executable('t4-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 and s1 +s1 = shared_library('t5-s1', 's1.c') +s2 = static_library('t5-s2', 's2.c', link_with: s1) +s3 = static_library('t5-s3', 's3.c', link_with: s2, install: true) +e = executable('t5-e1', 'main.c', link_with: s3) + +# Executable needs to link with s3 and s2 +s1 = static_library('t6-s1', 's1.c') +s2 = static_library('t6-s2', 's2.c', link_with: s1, install: true) +s3 = static_library('t6-s3', 's3.c', link_with: s2, install: true) +e = executable('t6-e1', 'main.c', link_with: s3) + +# Regression test: s1 gets promoted to link_whole and that used to make all other +# libraries in the list (s2) to be ignored. +# Executable only needs to link with s3. +# See https://github.com/mesonbuild/meson/issues/11956. +s1 = static_library('t7-s1', 's1.c') +s2 = static_library('t7-s2', 's2.c') +s3 = static_library('t7-s3', 's3.c', link_with: [s1, s2], install: true) +e = executable('t7-e1', 'main.c', link_with: s3) + +# Regression test: s3 should come last in the linker command. This seems to be +# required for at least backward compatibility reasons: +# https://github.com/mesonbuild/meson/pull/11957#issuecomment-1629243208 +s1 = static_library('t8-s1', 's1.c') +s2 = static_library('t8-s2', 's2.c') +s3 = static_library('t8-s3', 's3.c') +e = executable('t8-e1', 'main.c', + link_with: [s1, s2], + dependencies: declare_dependency(link_with: s3), +) + +if cc.get_argument_syntax() == 'gcc' + # s1 is an internal static library, using custom target. + s1_o = custom_target( + input: 's1.c', + output: 's1.c.o', + command: [cc.cmd_array(), '-c', '-o', '@OUTPUT@', '@INPUT@'] + ) + s1 = custom_target( + output: 'libt9-s1.a', + command: ['ar', 'rcs', '@OUTPUT@', s1_o], + ) + + # Executable needs to link with s1, s2 and s3. + s2 = static_library('t9-s2', 's2.c', link_with: s1) + s3 = static_library('t9-s3', 's3.c', link_with: s2) + e = executable('t9-e1', 'main.c', link_with: s3) + + # s2 cannot be installed because s1 is not being installed and Meson cannot + # extract object files from the custom target. + testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t10-s2\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t10-s2\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') + s2 = static_library('t10-s2', 's2.c', link_with: s1, install: true) + endtestcase + + # s3 cannot be installed because s1 is not being installed and Meson cannot + # extract object files from the custom target. + testcase expect_error('Cannot link_whole a custom or Rust target \'libt9-s1.a\' into a static library \'t11-s3\'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because \'t11-s3\' is installed but not \'libt9-s1.a\', and thus has to include objects from \'libt9-s1.a\' to be usable.') + s2 = static_library('t11-s2', 's2.c', link_with: s1) + s3 = static_library('t11-s3', 's3.c', link_with: s2, install: true) + endtestcase + + # s1 is an installed static library, using custom target. + s1 = custom_target( + output: 'libt12-s1.a', + command: ['ar', 'rcs', '@OUTPUT@', s1_o], + install: true, + install_dir: get_option('libdir'), + ) + + # Executable needs to link with s1, s2 and s3. + s2 = static_library('t12-s2', 's2.c', link_with: s1, install: true) + s3 = static_library('t12-s3', 's3.c', link_with: s2) + e = executable('t12-e1', 'main.c', link_with: s3) + + # Executable links with s3 and s1 but not s2 because it is included in s3. + s2 = static_library('t13-s2', 's2.c', link_with: s1) + s3 = static_library('t13-s3', 's3.c', link_with: s2, install: true) + e = executable('t13-e1', 'main.c', link_with: s3) +endif diff --git a/test cases/unit/114 complex link cases/s1.c b/test cases/unit/114 complex link cases/s1.c new file mode 100644 index 000000000..68bba4949 --- /dev/null +++ b/test cases/unit/114 complex link cases/s1.c @@ -0,0 +1,3 @@ +int s1(void) { + return 1; +} diff --git a/test cases/unit/114 complex link cases/s2.c b/test cases/unit/114 complex link cases/s2.c new file mode 100644 index 000000000..835870c04 --- /dev/null +++ b/test cases/unit/114 complex link cases/s2.c @@ -0,0 +1,5 @@ +int s1(void); + +int s2(void) { + return s1() + 1; +} diff --git a/test cases/unit/114 complex link cases/s3.c b/test cases/unit/114 complex link cases/s3.c new file mode 100644 index 000000000..08e062010 --- /dev/null +++ b/test cases/unit/114 complex link cases/s3.c @@ -0,0 +1,5 @@ +int s2(void); + +int s3(void) { + return s2() + 1; +} diff --git a/test cases/unit/114 empty project/expected_mods.json b/test cases/unit/114 empty project/expected_mods.json deleted file mode 100644 index 7463bcb12..000000000 --- a/test cases/unit/114 empty project/expected_mods.json +++ /dev/null @@ -1,242 +0,0 @@ -{ - "stdlib": { - "modules": [ - "__future__", - "__main__", - "_abc", - "_ast", - "_bisect", - "_blake2", - "_bz2", - "_codecs", - "_collections", - "_collections_abc", - "_compat_pickle", - "_compression", - "_datetime", - "_frozen_importlib", - "_frozen_importlib_external", - "_functools", - "_hashlib", - "_imp", - "_io", - "_json", - "_locale", - "_lsprof", - "_lzma", - "_opcode", - "_operator", - "_pickle", - "_posixsubprocess", - "_random", - "_sha512", - "_signal", - "_sitebuiltins", - "_socket", - "_sre", - "_ssl", - "_stat", - "_string", - "_struct", - "_thread", - "_uuid", - "_warnings", - "_weakref", - "_weakrefset", - "abc", - "argparse", - "array", - "ast", - "base64", - "binascii", - "bisect", - "builtins", - "bz2", - "cProfile", - "calendar", - "codecs", - "collections", - "collections.abc", - "configparser", - "contextlib", - "copy", - "copyreg", - "dataclasses", - "datetime", - "dis", - "email", - "email._encoded_words", - "email._parseaddr", - "email._policybase", - "email.base64mime", - "email.charset", - "email.encoders", - "email.errors", - "email.feedparser", - "email.header", - "email.iterators", - "email.message", - "email.parser", - "email.quoprimime", - "email.utils", - "encodings", - "encodings.aliases", - "encodings.utf_8", - "enum", - "errno", - "fcntl", - "fnmatch", - "functools", - "genericpath", - "gettext", - "glob", - "hashlib", - "http", - "http.client", - "importlib", - "importlib._bootstrap", - "importlib._bootstrap_external", - "importlib.machinery", - "inspect", - "io", - "itertools", - "json", - "json.decoder", - "json.encoder", - "json.scanner", - "keyword", - "linecache", - "locale", - "lzma", - "marshal", - "math", - "netrc", - "ntpath", - "opcode", - "operator", - "os", - "os.path", - "pathlib", - "pickle", - "platform", - "posix", - "posixpath", - "profile", - "quopri", - "random", - "re", - "reprlib", - "select", - "selectors", - "shlex", - "shutil", - "signal", - "site", - "socket", - "sre_compile", - "sre_constants", - "sre_parse", - "ssl", - "stat", - "string", - "struct", - "subprocess", - "sys", - "tempfile", - "textwrap", - "threading", - "time", - "token", - "tokenize", - "types", - "typing", - "typing.io", - "typing.re", - "urllib", - "urllib.error", - "urllib.parse", - "urllib.request", - "urllib.response", - "uu", - "uuid", - "warnings", - "weakref", - "zipimport", - "zlib" - ], - "count": 162 - }, - "meson": { - "modules": [ - "mesonbuild", - "mesonbuild._pathlib", - "mesonbuild.arglist", - "mesonbuild.ast", - "mesonbuild.ast.interpreter", - "mesonbuild.ast.introspection", - "mesonbuild.ast.postprocess", - "mesonbuild.ast.printer", - "mesonbuild.ast.visitor", - "mesonbuild.backend", - "mesonbuild.backend.backends", - "mesonbuild.backend.ninjabackend", - "mesonbuild.build", - "mesonbuild.compilers", - "mesonbuild.compilers.compilers", - "mesonbuild.compilers.detect", - "mesonbuild.coredata", - "mesonbuild.dependencies", - "mesonbuild.dependencies.base", - "mesonbuild.dependencies.detect", - "mesonbuild.depfile", - "mesonbuild.envconfig", - "mesonbuild.environment", - "mesonbuild.interpreter", - "mesonbuild.interpreter.compiler", - "mesonbuild.interpreter.dependencyfallbacks", - "mesonbuild.interpreter.interpreter", - "mesonbuild.interpreter.interpreterobjects", - "mesonbuild.interpreter.mesonmain", - "mesonbuild.interpreter.primitives", - "mesonbuild.interpreter.primitives.array", - "mesonbuild.interpreter.primitives.boolean", - "mesonbuild.interpreter.primitives.dict", - "mesonbuild.interpreter.primitives.integer", - "mesonbuild.interpreter.primitives.range", - "mesonbuild.interpreter.primitives.string", - "mesonbuild.interpreter.type_checking", - "mesonbuild.interpreterbase", - "mesonbuild.interpreterbase._unholder", - "mesonbuild.interpreterbase.baseobjects", - "mesonbuild.interpreterbase.decorators", - "mesonbuild.interpreterbase.disabler", - "mesonbuild.interpreterbase.exceptions", - "mesonbuild.interpreterbase.helpers", - "mesonbuild.interpreterbase.interpreterbase", - "mesonbuild.interpreterbase.operator", - "mesonbuild.linkers", - "mesonbuild.linkers.base", - "mesonbuild.linkers.detect", - "mesonbuild.mesonlib", - "mesonbuild.mesonmain", - "mesonbuild.mintro", - "mesonbuild.mlog", - "mesonbuild.modules", - "mesonbuild.mparser", - "mesonbuild.msetup", - "mesonbuild.optinterpreter", - "mesonbuild.programs", - "mesonbuild.scripts", - "mesonbuild.scripts.meson_exe", - "mesonbuild.utils", - "mesonbuild.utils.core", - "mesonbuild.utils.platform", - "mesonbuild.utils.posix", - "mesonbuild.utils.universal", - "mesonbuild.utils.vsenv", - "mesonbuild.wrap", - "mesonbuild.wrap.wrap" - ], - "count": 68 - } -} diff --git a/test cases/unit/114 empty project/meson.build b/test cases/unit/114 empty project/meson.build deleted file mode 100644 index b92b9b411..000000000 --- a/test cases/unit/114 empty project/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('empty project') diff --git a/test cases/unit/115 c cpp stds/meson.build b/test cases/unit/115 c cpp stds/meson.build new file mode 100644 index 000000000..0b15efc08 --- /dev/null +++ b/test cases/unit/115 c cpp stds/meson.build @@ -0,0 +1,6 @@ +project('c cpp stds', 'c', 'cpp', + default_options: [ + 'c_std=gnu89,c89', + 'cpp_std=gnu++98,vc++11', + ], +) diff --git a/test cases/unit/115 genvslite/main.cpp b/test cases/unit/115 genvslite/main.cpp deleted file mode 100644 index ca250bdd6..000000000 --- a/test cases/unit/115 genvslite/main.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include - -int main() { -#ifdef NDEBUG - printf("Non-debug\n"); -#else - printf("Debug\n"); -#endif - return 0; -} diff --git a/test cases/unit/115 genvslite/meson.build b/test cases/unit/115 genvslite/meson.build deleted file mode 100644 index 3445d7f33..000000000 --- a/test cases/unit/115 genvslite/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('genvslite', 'cpp', - default_options : ['b_ndebug=if-release'] - ) - -exe = executable('genvslite', 'main.cpp') diff --git a/test cases/unit/116 empty project/expected_mods.json b/test cases/unit/116 empty project/expected_mods.json new file mode 100644 index 000000000..7463bcb12 --- /dev/null +++ b/test cases/unit/116 empty project/expected_mods.json @@ -0,0 +1,242 @@ +{ + "stdlib": { + "modules": [ + "__future__", + "__main__", + "_abc", + "_ast", + "_bisect", + "_blake2", + "_bz2", + "_codecs", + "_collections", + "_collections_abc", + "_compat_pickle", + "_compression", + "_datetime", + "_frozen_importlib", + "_frozen_importlib_external", + "_functools", + "_hashlib", + "_imp", + "_io", + "_json", + "_locale", + "_lsprof", + "_lzma", + "_opcode", + "_operator", + "_pickle", + "_posixsubprocess", + "_random", + "_sha512", + "_signal", + "_sitebuiltins", + "_socket", + "_sre", + "_ssl", + "_stat", + "_string", + "_struct", + "_thread", + "_uuid", + "_warnings", + "_weakref", + "_weakrefset", + "abc", + "argparse", + "array", + "ast", + "base64", + "binascii", + "bisect", + "builtins", + "bz2", + "cProfile", + "calendar", + "codecs", + "collections", + "collections.abc", + "configparser", + "contextlib", + "copy", + "copyreg", + "dataclasses", + "datetime", + "dis", + "email", + "email._encoded_words", + "email._parseaddr", + "email._policybase", + "email.base64mime", + "email.charset", + "email.encoders", + "email.errors", + "email.feedparser", + "email.header", + "email.iterators", + "email.message", + "email.parser", + "email.quoprimime", + "email.utils", + "encodings", + "encodings.aliases", + "encodings.utf_8", + "enum", + "errno", + "fcntl", + "fnmatch", + "functools", + "genericpath", + "gettext", + "glob", + "hashlib", + "http", + "http.client", + "importlib", + "importlib._bootstrap", + "importlib._bootstrap_external", + "importlib.machinery", + "inspect", + "io", + "itertools", + "json", + "json.decoder", + "json.encoder", + "json.scanner", + "keyword", + "linecache", + "locale", + "lzma", + "marshal", + "math", + "netrc", + "ntpath", + "opcode", + "operator", + "os", + "os.path", + "pathlib", + "pickle", + "platform", + "posix", + "posixpath", + "profile", + "quopri", + "random", + "re", + "reprlib", + "select", + "selectors", + "shlex", + "shutil", + "signal", + "site", + "socket", + "sre_compile", + "sre_constants", + "sre_parse", + "ssl", + "stat", + "string", + "struct", + "subprocess", + "sys", + "tempfile", + "textwrap", + "threading", + "time", + "token", + "tokenize", + "types", + "typing", + "typing.io", + "typing.re", + "urllib", + "urllib.error", + "urllib.parse", + "urllib.request", + "urllib.response", + "uu", + "uuid", + "warnings", + "weakref", + "zipimport", + "zlib" + ], + "count": 162 + }, + "meson": { + "modules": [ + "mesonbuild", + "mesonbuild._pathlib", + "mesonbuild.arglist", + "mesonbuild.ast", + "mesonbuild.ast.interpreter", + "mesonbuild.ast.introspection", + "mesonbuild.ast.postprocess", + "mesonbuild.ast.printer", + "mesonbuild.ast.visitor", + "mesonbuild.backend", + "mesonbuild.backend.backends", + "mesonbuild.backend.ninjabackend", + "mesonbuild.build", + "mesonbuild.compilers", + "mesonbuild.compilers.compilers", + "mesonbuild.compilers.detect", + "mesonbuild.coredata", + "mesonbuild.dependencies", + "mesonbuild.dependencies.base", + "mesonbuild.dependencies.detect", + "mesonbuild.depfile", + "mesonbuild.envconfig", + "mesonbuild.environment", + "mesonbuild.interpreter", + "mesonbuild.interpreter.compiler", + "mesonbuild.interpreter.dependencyfallbacks", + "mesonbuild.interpreter.interpreter", + "mesonbuild.interpreter.interpreterobjects", + "mesonbuild.interpreter.mesonmain", + "mesonbuild.interpreter.primitives", + "mesonbuild.interpreter.primitives.array", + "mesonbuild.interpreter.primitives.boolean", + "mesonbuild.interpreter.primitives.dict", + "mesonbuild.interpreter.primitives.integer", + "mesonbuild.interpreter.primitives.range", + "mesonbuild.interpreter.primitives.string", + "mesonbuild.interpreter.type_checking", + "mesonbuild.interpreterbase", + "mesonbuild.interpreterbase._unholder", + "mesonbuild.interpreterbase.baseobjects", + "mesonbuild.interpreterbase.decorators", + "mesonbuild.interpreterbase.disabler", + "mesonbuild.interpreterbase.exceptions", + "mesonbuild.interpreterbase.helpers", + "mesonbuild.interpreterbase.interpreterbase", + "mesonbuild.interpreterbase.operator", + "mesonbuild.linkers", + "mesonbuild.linkers.base", + "mesonbuild.linkers.detect", + "mesonbuild.mesonlib", + "mesonbuild.mesonmain", + "mesonbuild.mintro", + "mesonbuild.mlog", + "mesonbuild.modules", + "mesonbuild.mparser", + "mesonbuild.msetup", + "mesonbuild.optinterpreter", + "mesonbuild.programs", + "mesonbuild.scripts", + "mesonbuild.scripts.meson_exe", + "mesonbuild.utils", + "mesonbuild.utils.core", + "mesonbuild.utils.platform", + "mesonbuild.utils.posix", + "mesonbuild.utils.universal", + "mesonbuild.utils.vsenv", + "mesonbuild.wrap", + "mesonbuild.wrap.wrap" + ], + "count": 68 + } +} diff --git a/test cases/unit/116 empty project/meson.build b/test cases/unit/116 empty project/meson.build new file mode 100644 index 000000000..b92b9b411 --- /dev/null +++ b/test cases/unit/116 empty project/meson.build @@ -0,0 +1 @@ +project('empty project') diff --git a/test cases/unit/116 meson package cache dir/cache_dir/bar/meson.build b/test cases/unit/116 meson package cache dir/cache_dir/bar/meson.build deleted file mode 100644 index dca36f656..000000000 --- a/test cases/unit/116 meson package cache dir/cache_dir/bar/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('bar') diff --git a/test cases/unit/116 meson package cache dir/cache_dir/foo.zip b/test cases/unit/116 meson package cache dir/cache_dir/foo.zip deleted file mode 100644 index 91bc36aca..000000000 Binary files a/test cases/unit/116 meson package cache dir/cache_dir/foo.zip and /dev/null differ diff --git a/test cases/unit/116 meson package cache dir/meson.build b/test cases/unit/116 meson package cache dir/meson.build deleted file mode 100644 index 2057bba89..000000000 --- a/test cases/unit/116 meson package cache dir/meson.build +++ /dev/null @@ -1,4 +0,0 @@ -project('meson package cache dir') - -subproject('foo') -subproject('bar') diff --git a/test cases/unit/116 meson package cache dir/subprojects/bar.wrap b/test cases/unit/116 meson package cache dir/subprojects/bar.wrap deleted file mode 100644 index 3ec58343b..000000000 --- a/test cases/unit/116 meson package cache dir/subprojects/bar.wrap +++ /dev/null @@ -1,3 +0,0 @@ -[wrap-file] -directory = bar - diff --git a/test cases/unit/116 meson package cache dir/subprojects/foo.wrap b/test cases/unit/116 meson package cache dir/subprojects/foo.wrap deleted file mode 100644 index b7dd41de5..000000000 --- a/test cases/unit/116 meson package cache dir/subprojects/foo.wrap +++ /dev/null @@ -1,5 +0,0 @@ -[wrap-file] -directory = foo -source_url = http://server.invalid/foo.zip -source_filename = foo.zip -source_hash = c5dd7e8fca93045f736c83700686722b0fbc20b7dc4597b295060684c5b05b72 diff --git a/test cases/unit/117 genvslite/main.cpp b/test cases/unit/117 genvslite/main.cpp new file mode 100644 index 000000000..ca250bdd6 --- /dev/null +++ b/test cases/unit/117 genvslite/main.cpp @@ -0,0 +1,10 @@ +#include + +int main() { +#ifdef NDEBUG + printf("Non-debug\n"); +#else + printf("Debug\n"); +#endif + return 0; +} diff --git a/test cases/unit/117 genvslite/meson.build b/test cases/unit/117 genvslite/meson.build new file mode 100644 index 000000000..3445d7f33 --- /dev/null +++ b/test cases/unit/117 genvslite/meson.build @@ -0,0 +1,5 @@ +project('genvslite', 'cpp', + default_options : ['b_ndebug=if-release'] + ) + +exe = executable('genvslite', 'main.cpp') diff --git a/test cases/unit/117 openssl cmake bug/meson.build b/test cases/unit/117 openssl cmake bug/meson.build deleted file mode 100644 index d08a8ef42..000000000 --- a/test cases/unit/117 openssl cmake bug/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('bug', 'cpp') - -# When cmake is not available, -# this triggers the bug described in #12098 -openssl_dep = dependency('openssl') diff --git a/test cases/unit/117 openssl cmake bug/nativefile.ini b/test cases/unit/117 openssl cmake bug/nativefile.ini deleted file mode 100644 index dd6b0ff29..000000000 --- a/test cases/unit/117 openssl cmake bug/nativefile.ini +++ /dev/null @@ -1,7 +0,0 @@ -[binaries] - -cmake = '/path/to/nothing' - -[built-in options] - -pkg_config_path = '' \ No newline at end of file diff --git a/test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build b/test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build new file mode 100644 index 000000000..dca36f656 --- /dev/null +++ b/test cases/unit/118 meson package cache dir/cache_dir/bar/meson.build @@ -0,0 +1 @@ +project('bar') diff --git a/test cases/unit/118 meson package cache dir/cache_dir/foo.zip b/test cases/unit/118 meson package cache dir/cache_dir/foo.zip new file mode 100644 index 000000000..91bc36aca Binary files /dev/null and b/test cases/unit/118 meson package cache dir/cache_dir/foo.zip differ diff --git a/test cases/unit/118 meson package cache dir/meson.build b/test cases/unit/118 meson package cache dir/meson.build new file mode 100644 index 000000000..2057bba89 --- /dev/null +++ b/test cases/unit/118 meson package cache dir/meson.build @@ -0,0 +1,4 @@ +project('meson package cache dir') + +subproject('foo') +subproject('bar') diff --git a/test cases/unit/118 meson package cache dir/subprojects/bar.wrap b/test cases/unit/118 meson package cache dir/subprojects/bar.wrap new file mode 100644 index 000000000..3ec58343b --- /dev/null +++ b/test cases/unit/118 meson package cache dir/subprojects/bar.wrap @@ -0,0 +1,3 @@ +[wrap-file] +directory = bar + diff --git a/test cases/unit/118 meson package cache dir/subprojects/foo.wrap b/test cases/unit/118 meson package cache dir/subprojects/foo.wrap new file mode 100644 index 000000000..b7dd41de5 --- /dev/null +++ b/test cases/unit/118 meson package cache dir/subprojects/foo.wrap @@ -0,0 +1,5 @@ +[wrap-file] +directory = foo +source_url = http://server.invalid/foo.zip +source_filename = foo.zip +source_hash = c5dd7e8fca93045f736c83700686722b0fbc20b7dc4597b295060684c5b05b72 diff --git a/test cases/unit/118 rewrite/meson.build b/test cases/unit/118 rewrite/meson.build deleted file mode 100644 index 7d0330b9e..000000000 --- a/test cases/unit/118 rewrite/meson.build +++ /dev/null @@ -1,189 +0,0 @@ -# This file should expose all possible meson syntaxes - # and ensure the AstInterpreter and RawPrinter are able - - # to parse and write a file identical to the original. - - project ( # project comment 1 - # project comment 2 - 'rewrite' , # argument comment - # project comment 3 - 'cpp', - 'c', - default_options: [ - 'unity=on', - 'unity_size=50', # number of cpp / unity. default is 4... - 'warning_level=2', # eqv to /W3 - 'werror=true', # treat warnings as errors - 'b_ndebug=if-release', # disable assert in Release - 'cpp_eh=a', # /EHa exception handling - 'cpp_std=c++17', - 'cpp_winlibs=' + ','.join([ # array comment - # in array - # comment - 'kernel32.lib', - 'user32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib' - # before comma comment - , - # after comma comment - 'ole32.lib', - 'oleaut32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - 'Delayimp.lib', # For delay loaded dll - 'OLDNAMES.lib', - 'dbghelp.lib', - 'psapi.lib', - ]), - ], - meson_version: '>=1.2', - version: '1.0.0', - ) # project comment 4 - -cppcoro_dep = dependency('andreasbuhr-cppcoro-cppcoro') -cppcoro = declare_dependency( - dependencies: [cppcoro_dep.partial_dependency( - includes: true, - link_args: true, - links: true, - sources: true, - )], - # '/await:strict' allows to use rather than with C++17. - # We can remove '/await:strict' once we update to C++20. - compile_args: ['/await:strict'], - # includes:true doesn't work for now in partial_dependency() - # This line could be removed once https://github.com/mesonbuild/meson/pull/10122 is released. - include_directories: cppcoro_dep.get_variable('includedir1'), -) - - -if get_option('unicode') #if comment -#if comment 2 - mfc=cpp_compiler.find_library(get_option('debug')?'mfc140ud':'mfc140u') - # if comment 3 -else#elsecommentnowhitespaces - # else comment 1 - mfc = cpp_compiler.find_library( get_option( 'debug' ) ? 'mfc140d' : 'mfc140') -# else comment 2 -endif #endif comment - - -assert(1 in [1, 2], '''1 should be in [1, 2]''') -assert(3 not in [1, 2], '''3 shouldn't be in [1, 2]''') -assert(not (3 in [1, 2]), '''3 shouldn't be in [1, 2]''') - -assert('b' in ['a', 'b'], ''''b' should be in ['a', 'b']''') -assert('c' not in ['a', 'b'], ''''c' shouldn't be in ['a', 'b']''') - -assert(exe1 in [exe1, exe2], ''''exe1 should be in [exe1, exe2]''') -assert(exe3 not in [exe1, exe2], ''''exe3 shouldn't be in [exe1, exe2]''') - -assert('a' in {'a': 'b'}, '''1 should be in {'a': 'b'}''') -assert('b'not in{'a':'b'}, '''1 should be in {'a': 'b'}''') - -assert('a'in'abc') -assert('b' not in 'def') - - -w = 'world' -d = {'a': 1, 'b': 0b10101010, 'c': 'pi', 'd': '''a -b -c''', 'e': f'hello @w@', 'f': f'''triple - formatted - string # this is not a comment - hello @w@ -''', 'g': [1, 2, 3], - - 'h' # comment a - : # comment b -0xDEADBEEF # comment c -, # comment d -'hh': 0xfeedc0de, # lowercase hexa -'hhh': 0XaBcD0123, # mixed case hexa -'oo': 0O123456, # upper O octa -'bb': 0B1111, # upper B binary -'i': {'aa': 11, # this is a comment - 'bb': 22}, # a comment inside a dict -'o': 0o754, -'m': -12, # minus number -'eq': 1 + 3 - 3 % 4 + -( 7 * 8 ), -} # end of dict comment - -hw = d['e'] -one = d['g'][0] - w += '!' - - -components = { - 'foo': ['foo.c'], - 'bar': ['bar.c'], - 'baz': ['baz.c'], # this line is indented with a tab! -} - -# compute a configuration based on system dependencies, custom logic -conf = configuration_data() -conf.set('USE_FOO', 1) - -# Determine the sources to compile -sources_to_compile = [] -foreach name, sources : components - if conf.get('USE_@0@'.format(name.to_upper()), 0) == 1 - sources_to_compile += sources - endif -endforeach - - -items = ['a', 'continue', 'b', 'break', 'c'] -result = [] -foreach i : items - if i == 'continue' - continue - elif i == 'break' - break - endif - result += i -endforeach -# result is ['a', 'b'] - - - -if a and b - # do something -endif -if c or d - # do something -endif -if not e - # do something -endif -if not (f or g) - # do something -endif - -single_quote = 'contains a \' character' -string_escapes = '\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}' -no_string_escapes = '''\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}''' - -# FIXME: is it supposed to work? (cont_eol inside string) -# cont_string = 'blablabla\ -# blablabla' - -# cont_eol with whitespace and comments after -if a \ # comment in cont 1 - and b \ # comment in cont 2 - or c # comment in cont 3 - message('ok') -endif - -if a \ - or b - debug('help!') -endif - - -# End of file comment with no linebreak \ No newline at end of file diff --git a/test cases/unit/119 executable suffix/main.c b/test cases/unit/119 executable suffix/main.c deleted file mode 100644 index 78f2de106..000000000 --- a/test cases/unit/119 executable suffix/main.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/unit/119 executable suffix/meson.build b/test cases/unit/119 executable suffix/meson.build deleted file mode 100644 index 8f952260c..000000000 --- a/test cases/unit/119 executable suffix/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('exectuable suffix', 'c') -foo = executable('foo', 'main.c') -foo_bin = executable('foo', 'main.c', name_suffix: 'bin') diff --git a/test cases/unit/119 openssl cmake bug/meson.build b/test cases/unit/119 openssl cmake bug/meson.build new file mode 100644 index 000000000..d08a8ef42 --- /dev/null +++ b/test cases/unit/119 openssl cmake bug/meson.build @@ -0,0 +1,5 @@ +project('bug', 'cpp') + +# When cmake is not available, +# this triggers the bug described in #12098 +openssl_dep = dependency('openssl') diff --git a/test cases/unit/119 openssl cmake bug/nativefile.ini b/test cases/unit/119 openssl cmake bug/nativefile.ini new file mode 100644 index 000000000..dd6b0ff29 --- /dev/null +++ b/test cases/unit/119 openssl cmake bug/nativefile.ini @@ -0,0 +1,7 @@ +[binaries] + +cmake = '/path/to/nothing' + +[built-in options] + +pkg_config_path = '' \ No newline at end of file diff --git a/test cases/unit/120 rewrite/meson.build b/test cases/unit/120 rewrite/meson.build new file mode 100644 index 000000000..7d0330b9e --- /dev/null +++ b/test cases/unit/120 rewrite/meson.build @@ -0,0 +1,189 @@ +# This file should expose all possible meson syntaxes + # and ensure the AstInterpreter and RawPrinter are able + + # to parse and write a file identical to the original. + + project ( # project comment 1 + # project comment 2 + 'rewrite' , # argument comment + # project comment 3 + 'cpp', + 'c', + default_options: [ + 'unity=on', + 'unity_size=50', # number of cpp / unity. default is 4... + 'warning_level=2', # eqv to /W3 + 'werror=true', # treat warnings as errors + 'b_ndebug=if-release', # disable assert in Release + 'cpp_eh=a', # /EHa exception handling + 'cpp_std=c++17', + 'cpp_winlibs=' + ','.join([ # array comment + # in array + # comment + 'kernel32.lib', + 'user32.lib', + 'gdi32.lib', + 'winspool.lib', + 'comdlg32.lib', + 'advapi32.lib', + 'shell32.lib' + # before comma comment + , + # after comma comment + 'ole32.lib', + 'oleaut32.lib', + 'uuid.lib', + 'odbc32.lib', + 'odbccp32.lib', + 'Delayimp.lib', # For delay loaded dll + 'OLDNAMES.lib', + 'dbghelp.lib', + 'psapi.lib', + ]), + ], + meson_version: '>=1.2', + version: '1.0.0', + ) # project comment 4 + +cppcoro_dep = dependency('andreasbuhr-cppcoro-cppcoro') +cppcoro = declare_dependency( + dependencies: [cppcoro_dep.partial_dependency( + includes: true, + link_args: true, + links: true, + sources: true, + )], + # '/await:strict' allows to use rather than with C++17. + # We can remove '/await:strict' once we update to C++20. + compile_args: ['/await:strict'], + # includes:true doesn't work for now in partial_dependency() + # This line could be removed once https://github.com/mesonbuild/meson/pull/10122 is released. + include_directories: cppcoro_dep.get_variable('includedir1'), +) + + +if get_option('unicode') #if comment +#if comment 2 + mfc=cpp_compiler.find_library(get_option('debug')?'mfc140ud':'mfc140u') + # if comment 3 +else#elsecommentnowhitespaces + # else comment 1 + mfc = cpp_compiler.find_library( get_option( 'debug' ) ? 'mfc140d' : 'mfc140') +# else comment 2 +endif #endif comment + + +assert(1 in [1, 2], '''1 should be in [1, 2]''') +assert(3 not in [1, 2], '''3 shouldn't be in [1, 2]''') +assert(not (3 in [1, 2]), '''3 shouldn't be in [1, 2]''') + +assert('b' in ['a', 'b'], ''''b' should be in ['a', 'b']''') +assert('c' not in ['a', 'b'], ''''c' shouldn't be in ['a', 'b']''') + +assert(exe1 in [exe1, exe2], ''''exe1 should be in [exe1, exe2]''') +assert(exe3 not in [exe1, exe2], ''''exe3 shouldn't be in [exe1, exe2]''') + +assert('a' in {'a': 'b'}, '''1 should be in {'a': 'b'}''') +assert('b'not in{'a':'b'}, '''1 should be in {'a': 'b'}''') + +assert('a'in'abc') +assert('b' not in 'def') + + +w = 'world' +d = {'a': 1, 'b': 0b10101010, 'c': 'pi', 'd': '''a +b +c''', 'e': f'hello @w@', 'f': f'''triple + formatted + string # this is not a comment + hello @w@ +''', 'g': [1, 2, 3], + + 'h' # comment a + : # comment b +0xDEADBEEF # comment c +, # comment d +'hh': 0xfeedc0de, # lowercase hexa +'hhh': 0XaBcD0123, # mixed case hexa +'oo': 0O123456, # upper O octa +'bb': 0B1111, # upper B binary +'i': {'aa': 11, # this is a comment + 'bb': 22}, # a comment inside a dict +'o': 0o754, +'m': -12, # minus number +'eq': 1 + 3 - 3 % 4 + -( 7 * 8 ), +} # end of dict comment + +hw = d['e'] +one = d['g'][0] + w += '!' + + +components = { + 'foo': ['foo.c'], + 'bar': ['bar.c'], + 'baz': ['baz.c'], # this line is indented with a tab! +} + +# compute a configuration based on system dependencies, custom logic +conf = configuration_data() +conf.set('USE_FOO', 1) + +# Determine the sources to compile +sources_to_compile = [] +foreach name, sources : components + if conf.get('USE_@0@'.format(name.to_upper()), 0) == 1 + sources_to_compile += sources + endif +endforeach + + +items = ['a', 'continue', 'b', 'break', 'c'] +result = [] +foreach i : items + if i == 'continue' + continue + elif i == 'break' + break + endif + result += i +endforeach +# result is ['a', 'b'] + + + +if a and b + # do something +endif +if c or d + # do something +endif +if not e + # do something +endif +if not (f or g) + # do something +endif + +single_quote = 'contains a \' character' +string_escapes = '\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}' +no_string_escapes = '''\\\'\a\b\f\n\r\t\v\046\x26\u2D4d\U00002d4d\N{GREEK CAPITAL LETTER DELTA}''' + +# FIXME: is it supposed to work? (cont_eol inside string) +# cont_string = 'blablabla\ +# blablabla' + +# cont_eol with whitespace and comments after +if a \ # comment in cont 1 + and b \ # comment in cont 2 + or c # comment in cont 3 + message('ok') +endif + +if a \ + or b + debug('help!') +endif + + +# End of file comment with no linebreak \ No newline at end of file diff --git a/test cases/unit/121 executable suffix/main.c b/test cases/unit/121 executable suffix/main.c new file mode 100644 index 000000000..78f2de106 --- /dev/null +++ b/test cases/unit/121 executable suffix/main.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/unit/121 executable suffix/meson.build b/test cases/unit/121 executable suffix/meson.build new file mode 100644 index 000000000..8f952260c --- /dev/null +++ b/test cases/unit/121 executable suffix/meson.build @@ -0,0 +1,3 @@ +project('exectuable suffix', 'c') +foo = executable('foo', 'main.c') +foo_bin = executable('foo', 'main.c', name_suffix: 'bin') diff --git a/test cases/unit/91 install skip subprojects/foo.c b/test cases/unit/91 install skip subprojects/foo.c new file mode 100644 index 000000000..25927f5a1 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/foo.c @@ -0,0 +1,4 @@ +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/test cases/unit/91 install skip subprojects/foo.dat b/test cases/unit/91 install skip subprojects/foo.dat new file mode 100644 index 000000000..421376db9 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/foo.dat @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/91 install skip subprojects/foo.h b/test cases/unit/91 install skip subprojects/foo.h new file mode 100644 index 000000000..a7e26ac6c --- /dev/null +++ b/test cases/unit/91 install skip subprojects/foo.h @@ -0,0 +1 @@ +#define FOO diff --git a/test cases/unit/91 install skip subprojects/foo/foofile b/test cases/unit/91 install skip subprojects/foo/foofile new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/91 install skip subprojects/meson.build b/test cases/unit/91 install skip subprojects/meson.build new file mode 100644 index 000000000..cfbae9483 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/meson.build @@ -0,0 +1,8 @@ +project('foo', 'c') + +install_data('foo.dat') +install_headers('foo.h') +install_subdir('foo', install_dir: '') +executable('foo', 'foo.c', install: true) + +subproject('bar') diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c new file mode 100644 index 000000000..25927f5a1 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.c @@ -0,0 +1,4 @@ +int main(int argc, char *argv[]) +{ + return 0; +} diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat new file mode 100644 index 000000000..421376db9 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.dat @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h new file mode 100644 index 000000000..a7e26ac6c --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar.h @@ -0,0 +1 @@ +#define FOO diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile b/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile new file mode 100644 index 000000000..421376db9 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/bar/barfile @@ -0,0 +1 @@ +dummy diff --git a/test cases/unit/91 install skip subprojects/subprojects/bar/meson.build b/test cases/unit/91 install skip subprojects/subprojects/bar/meson.build new file mode 100644 index 000000000..b5b073408 --- /dev/null +++ b/test cases/unit/91 install skip subprojects/subprojects/bar/meson.build @@ -0,0 +1,6 @@ +project('bar', 'c') + +install_data('bar.dat') +install_headers('bar.h') +install_subdir('bar', install_dir: '') +executable('bar', 'bar.c', install: true) diff --git a/test cases/unit/92 install skip subprojects/foo.c b/test cases/unit/92 install skip subprojects/foo.c deleted file mode 100644 index 25927f5a1..000000000 --- a/test cases/unit/92 install skip subprojects/foo.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char *argv[]) -{ - return 0; -} diff --git a/test cases/unit/92 install skip subprojects/foo.dat b/test cases/unit/92 install skip subprojects/foo.dat deleted file mode 100644 index 421376db9..000000000 --- a/test cases/unit/92 install skip subprojects/foo.dat +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/92 install skip subprojects/foo.h b/test cases/unit/92 install skip subprojects/foo.h deleted file mode 100644 index a7e26ac6c..000000000 --- a/test cases/unit/92 install skip subprojects/foo.h +++ /dev/null @@ -1 +0,0 @@ -#define FOO diff --git a/test cases/unit/92 install skip subprojects/foo/foofile b/test cases/unit/92 install skip subprojects/foo/foofile deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/92 install skip subprojects/meson.build b/test cases/unit/92 install skip subprojects/meson.build deleted file mode 100644 index cfbae9483..000000000 --- a/test cases/unit/92 install skip subprojects/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('foo', 'c') - -install_data('foo.dat') -install_headers('foo.h') -install_subdir('foo', install_dir: '') -executable('foo', 'foo.c', install: true) - -subproject('bar') diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c deleted file mode 100644 index 25927f5a1..000000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.c +++ /dev/null @@ -1,4 +0,0 @@ -int main(int argc, char *argv[]) -{ - return 0; -} diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat deleted file mode 100644 index 421376db9..000000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.dat +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h b/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h deleted file mode 100644 index a7e26ac6c..000000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar.h +++ /dev/null @@ -1 +0,0 @@ -#define FOO diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile b/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile deleted file mode 100644 index 421376db9..000000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/bar/barfile +++ /dev/null @@ -1 +0,0 @@ -dummy diff --git a/test cases/unit/92 install skip subprojects/subprojects/bar/meson.build b/test cases/unit/92 install skip subprojects/subprojects/bar/meson.build deleted file mode 100644 index b5b073408..000000000 --- a/test cases/unit/92 install skip subprojects/subprojects/bar/meson.build +++ /dev/null @@ -1,6 +0,0 @@ -project('bar', 'c') - -install_data('bar.dat') -install_headers('bar.h') -install_subdir('bar', install_dir: '') -executable('bar', 'bar.c', install: true) diff --git a/test cases/unit/92 new subproject in configured project/meson.build b/test cases/unit/92 new subproject in configured project/meson.build new file mode 100644 index 000000000..b82aa4173 --- /dev/null +++ b/test cases/unit/92 new subproject in configured project/meson.build @@ -0,0 +1,7 @@ +# SPDX-license-identifier: Apache-2.0 +# Copyright © 2021 Intel Corporation +project('existing project with new subproject', 'c') + +if get_option('use-sub') + dep = subproject('sub') +endif diff --git a/test cases/unit/92 new subproject in configured project/meson_options.txt b/test cases/unit/92 new subproject in configured project/meson_options.txt new file mode 100644 index 000000000..12d8395d4 --- /dev/null +++ b/test cases/unit/92 new subproject in configured project/meson_options.txt @@ -0,0 +1,3 @@ +# SPDX-license-identifier: Apache-2.0 +# Copyright © 2021 Intel Corporation +option('use-sub', type : 'boolean', value : false) diff --git a/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c b/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c new file mode 100644 index 000000000..9713d9f7f --- /dev/null +++ b/test cases/unit/92 new subproject in configured project/subprojects/sub/foo.c @@ -0,0 +1,6 @@ +/* SPDX-license-identifier: Apache-2.0 */ +/* Copyright © 2021 Intel Corporation */ + +int func(void) { + return 1; +} diff --git a/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build b/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build new file mode 100644 index 000000000..a833b0c35 --- /dev/null +++ b/test cases/unit/92 new subproject in configured project/subprojects/sub/meson.build @@ -0,0 +1,7 @@ +# SPDX-license-identifier: Apache-2.0 +# Copyright © 2021 Intel Corporation +project('new subproject', 'c') + +l = library('foo', 'foo.c') + +dep = declare_dependency(link_with : l) diff --git a/test cases/unit/93 clangformat/.clang-format b/test cases/unit/93 clangformat/.clang-format new file mode 100644 index 000000000..689bc6047 --- /dev/null +++ b/test cases/unit/93 clangformat/.clang-format @@ -0,0 +1,4 @@ +--- +BasedOnStyle: Google + +... diff --git a/test cases/unit/93 clangformat/.clang-format-ignore b/test cases/unit/93 clangformat/.clang-format-ignore new file mode 100644 index 000000000..7fc4d5a95 --- /dev/null +++ b/test cases/unit/93 clangformat/.clang-format-ignore @@ -0,0 +1,3 @@ + +# Ignore C files +*.c diff --git a/test cases/unit/93 clangformat/.clang-format-include b/test cases/unit/93 clangformat/.clang-format-include new file mode 100644 index 000000000..f057c0033 --- /dev/null +++ b/test cases/unit/93 clangformat/.clang-format-include @@ -0,0 +1,3 @@ + +# Only reformat in src/ +src/**/* diff --git a/test cases/unit/93 clangformat/meson.build b/test cases/unit/93 clangformat/meson.build new file mode 100644 index 000000000..8f4af981b --- /dev/null +++ b/test cases/unit/93 clangformat/meson.build @@ -0,0 +1 @@ +project('dummy', 'c', 'cpp') diff --git a/test cases/unit/93 clangformat/not-included/badformat.cpp b/test cases/unit/93 clangformat/not-included/badformat.cpp new file mode 100644 index 000000000..99a0ea60c --- /dev/null +++ b/test cases/unit/93 clangformat/not-included/badformat.cpp @@ -0,0 +1,2 @@ +class { +}; diff --git a/test cases/unit/93 clangformat/src/badformat.c b/test cases/unit/93 clangformat/src/badformat.c new file mode 100644 index 000000000..f1d18b7ed --- /dev/null +++ b/test cases/unit/93 clangformat/src/badformat.c @@ -0,0 +1,2 @@ +struct { +}; diff --git a/test cases/unit/93 clangformat/src/badformat.cpp b/test cases/unit/93 clangformat/src/badformat.cpp new file mode 100644 index 000000000..99a0ea60c --- /dev/null +++ b/test cases/unit/93 clangformat/src/badformat.cpp @@ -0,0 +1,2 @@ +class { +}; diff --git a/test cases/unit/93 new subproject in configured project/meson.build b/test cases/unit/93 new subproject in configured project/meson.build deleted file mode 100644 index b82aa4173..000000000 --- a/test cases/unit/93 new subproject in configured project/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -# Copyright © 2021 Intel Corporation -project('existing project with new subproject', 'c') - -if get_option('use-sub') - dep = subproject('sub') -endif diff --git a/test cases/unit/93 new subproject in configured project/meson_options.txt b/test cases/unit/93 new subproject in configured project/meson_options.txt deleted file mode 100644 index 12d8395d4..000000000 --- a/test cases/unit/93 new subproject in configured project/meson_options.txt +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -# Copyright © 2021 Intel Corporation -option('use-sub', type : 'boolean', value : false) diff --git a/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c b/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c deleted file mode 100644 index 9713d9f7f..000000000 --- a/test cases/unit/93 new subproject in configured project/subprojects/sub/foo.c +++ /dev/null @@ -1,6 +0,0 @@ -/* SPDX-license-identifier: Apache-2.0 */ -/* Copyright © 2021 Intel Corporation */ - -int func(void) { - return 1; -} diff --git a/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build b/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build deleted file mode 100644 index a833b0c35..000000000 --- a/test cases/unit/93 new subproject in configured project/subprojects/sub/meson.build +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-license-identifier: Apache-2.0 -# Copyright © 2021 Intel Corporation -project('new subproject', 'c') - -l = library('foo', 'foo.c') - -dep = declare_dependency(link_with : l) diff --git a/test cases/unit/94 clangformat/.clang-format b/test cases/unit/94 clangformat/.clang-format deleted file mode 100644 index 689bc6047..000000000 --- a/test cases/unit/94 clangformat/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ ---- -BasedOnStyle: Google - -... diff --git a/test cases/unit/94 clangformat/.clang-format-ignore b/test cases/unit/94 clangformat/.clang-format-ignore deleted file mode 100644 index 7fc4d5a95..000000000 --- a/test cases/unit/94 clangformat/.clang-format-ignore +++ /dev/null @@ -1,3 +0,0 @@ - -# Ignore C files -*.c diff --git a/test cases/unit/94 clangformat/.clang-format-include b/test cases/unit/94 clangformat/.clang-format-include deleted file mode 100644 index f057c0033..000000000 --- a/test cases/unit/94 clangformat/.clang-format-include +++ /dev/null @@ -1,3 +0,0 @@ - -# Only reformat in src/ -src/**/* diff --git a/test cases/unit/94 clangformat/meson.build b/test cases/unit/94 clangformat/meson.build deleted file mode 100644 index 8f4af981b..000000000 --- a/test cases/unit/94 clangformat/meson.build +++ /dev/null @@ -1 +0,0 @@ -project('dummy', 'c', 'cpp') diff --git a/test cases/unit/94 clangformat/not-included/badformat.cpp b/test cases/unit/94 clangformat/not-included/badformat.cpp deleted file mode 100644 index 99a0ea60c..000000000 --- a/test cases/unit/94 clangformat/not-included/badformat.cpp +++ /dev/null @@ -1,2 +0,0 @@ -class { -}; diff --git a/test cases/unit/94 clangformat/src/badformat.c b/test cases/unit/94 clangformat/src/badformat.c deleted file mode 100644 index f1d18b7ed..000000000 --- a/test cases/unit/94 clangformat/src/badformat.c +++ /dev/null @@ -1,2 +0,0 @@ -struct { -}; diff --git a/test cases/unit/94 clangformat/src/badformat.cpp b/test cases/unit/94 clangformat/src/badformat.cpp deleted file mode 100644 index 99a0ea60c..000000000 --- a/test cases/unit/94 clangformat/src/badformat.cpp +++ /dev/null @@ -1,2 +0,0 @@ -class { -}; diff --git a/test cases/unit/94 custominc/easytogrepfor/genh.py b/test cases/unit/94 custominc/easytogrepfor/genh.py new file mode 100644 index 000000000..48e033a72 --- /dev/null +++ b/test cases/unit/94 custominc/easytogrepfor/genh.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +f = open(sys.argv[1], 'w') +f.write('#define RETURN_VALUE 0') +f.close() diff --git a/test cases/unit/94 custominc/easytogrepfor/meson.build b/test cases/unit/94 custominc/easytogrepfor/meson.build new file mode 100644 index 000000000..e749753bc --- /dev/null +++ b/test cases/unit/94 custominc/easytogrepfor/meson.build @@ -0,0 +1,3 @@ +genh = custom_target('header', + output: 'generated.h', + command: [find_program('genh.py'), '@OUTPUT@']) diff --git a/test cases/unit/94 custominc/helper.c b/test cases/unit/94 custominc/helper.c new file mode 100644 index 000000000..3237441bc --- /dev/null +++ b/test cases/unit/94 custominc/helper.c @@ -0,0 +1,5 @@ +#include + +int func(void) { + return RETURN_VALUE; +} diff --git a/test cases/unit/94 custominc/meson.build b/test cases/unit/94 custominc/meson.build new file mode 100644 index 000000000..bab113908 --- /dev/null +++ b/test cases/unit/94 custominc/meson.build @@ -0,0 +1,9 @@ +project('implicit custom dirs', 'c') + +subdir('easytogrepfor') + +l = static_library('helper', 'helper.c', genh) +d = declare_dependency(link_with: l, sources: genh) +executable('prog', 'prog.c', dependencies: d, implicit_include_directories: false) + +executable('prog2', 'prog2.c', dependencies: d) diff --git a/test cases/unit/94 custominc/prog.c b/test cases/unit/94 custominc/prog.c new file mode 100644 index 000000000..db9df9d5e --- /dev/null +++ b/test cases/unit/94 custominc/prog.c @@ -0,0 +1,9 @@ +#include + +int func(void); + +int main(int argc, char **argv) { + (void)argc; + (void)(argv); + return func(); +} diff --git a/test cases/unit/94 custominc/prog2.c b/test cases/unit/94 custominc/prog2.c new file mode 100644 index 000000000..e64b22919 --- /dev/null +++ b/test cases/unit/94 custominc/prog2.c @@ -0,0 +1,10 @@ +#include +#include + +int func(void); + +int main(int argc, char **argv) { + (void)argc; + (void)(argv); + return func() + RETURN_VALUE; +} diff --git a/test cases/unit/95 custominc/easytogrepfor/genh.py b/test cases/unit/95 custominc/easytogrepfor/genh.py deleted file mode 100644 index 48e033a72..000000000 --- a/test cases/unit/95 custominc/easytogrepfor/genh.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -f = open(sys.argv[1], 'w') -f.write('#define RETURN_VALUE 0') -f.close() diff --git a/test cases/unit/95 custominc/easytogrepfor/meson.build b/test cases/unit/95 custominc/easytogrepfor/meson.build deleted file mode 100644 index e749753bc..000000000 --- a/test cases/unit/95 custominc/easytogrepfor/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -genh = custom_target('header', - output: 'generated.h', - command: [find_program('genh.py'), '@OUTPUT@']) diff --git a/test cases/unit/95 custominc/helper.c b/test cases/unit/95 custominc/helper.c deleted file mode 100644 index 3237441bc..000000000 --- a/test cases/unit/95 custominc/helper.c +++ /dev/null @@ -1,5 +0,0 @@ -#include - -int func(void) { - return RETURN_VALUE; -} diff --git a/test cases/unit/95 custominc/meson.build b/test cases/unit/95 custominc/meson.build deleted file mode 100644 index bab113908..000000000 --- a/test cases/unit/95 custominc/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -project('implicit custom dirs', 'c') - -subdir('easytogrepfor') - -l = static_library('helper', 'helper.c', genh) -d = declare_dependency(link_with: l, sources: genh) -executable('prog', 'prog.c', dependencies: d, implicit_include_directories: false) - -executable('prog2', 'prog2.c', dependencies: d) diff --git a/test cases/unit/95 custominc/prog.c b/test cases/unit/95 custominc/prog.c deleted file mode 100644 index db9df9d5e..000000000 --- a/test cases/unit/95 custominc/prog.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int func(void); - -int main(int argc, char **argv) { - (void)argc; - (void)(argv); - return func(); -} diff --git a/test cases/unit/95 custominc/prog2.c b/test cases/unit/95 custominc/prog2.c deleted file mode 100644 index e64b22919..000000000 --- a/test cases/unit/95 custominc/prog2.c +++ /dev/null @@ -1,10 +0,0 @@ -#include -#include - -int func(void); - -int main(int argc, char **argv) { - (void)argc; - (void)(argv); - return func() + RETURN_VALUE; -} diff --git a/test cases/unit/95 implicit force fallback/meson.build b/test cases/unit/95 implicit force fallback/meson.build new file mode 100644 index 000000000..623a338db --- /dev/null +++ b/test cases/unit/95 implicit force fallback/meson.build @@ -0,0 +1,8 @@ +project('implicit force fallback') + +# The dependency 'something' is provided by a subproject. Normally this won't +# use the fallback subproject because required is false. However this unit test +# is configured with wrap_mode=forcefallback and force_fallback_for=something +# in which case we are expecting the fallback to be done. +d = dependency('something', required: false) +assert(d.found()) diff --git a/test cases/unit/95 implicit force fallback/subprojects/something/meson.build b/test cases/unit/95 implicit force fallback/subprojects/something/meson.build new file mode 100644 index 000000000..89a4727dc --- /dev/null +++ b/test cases/unit/95 implicit force fallback/subprojects/something/meson.build @@ -0,0 +1,3 @@ +project('something') + +meson.override_dependency('something', declare_dependency()) diff --git a/test cases/unit/96 compiler.links file arg/meson.build b/test cases/unit/96 compiler.links file arg/meson.build new file mode 100644 index 000000000..c409dcbd1 --- /dev/null +++ b/test cases/unit/96 compiler.links file arg/meson.build @@ -0,0 +1,11 @@ +project('test', ['c', 'cpp']) + +cc = meson.get_compiler('c') +cxx = meson.get_compiler('cpp') + +# used by run_unittests.py to grab the path to the C and C++ compilers +assert(cc.compiles(files('test.c'))) +assert(cxx.compiles(files('test.c'))) + +assert(cc.links(files('test.c'))) +assert(cxx.links(files('test.c'))) diff --git a/test cases/unit/96 compiler.links file arg/test.c b/test cases/unit/96 compiler.links file arg/test.c new file mode 100644 index 000000000..78f2de106 --- /dev/null +++ b/test cases/unit/96 compiler.links file arg/test.c @@ -0,0 +1 @@ +int main(void) { return 0; } diff --git a/test cases/unit/96 implicit force fallback/meson.build b/test cases/unit/96 implicit force fallback/meson.build deleted file mode 100644 index 623a338db..000000000 --- a/test cases/unit/96 implicit force fallback/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -project('implicit force fallback') - -# The dependency 'something' is provided by a subproject. Normally this won't -# use the fallback subproject because required is false. However this unit test -# is configured with wrap_mode=forcefallback and force_fallback_for=something -# in which case we are expecting the fallback to be done. -d = dependency('something', required: false) -assert(d.found()) diff --git a/test cases/unit/96 implicit force fallback/subprojects/something/meson.build b/test cases/unit/96 implicit force fallback/subprojects/something/meson.build deleted file mode 100644 index 89a4727dc..000000000 --- a/test cases/unit/96 implicit force fallback/subprojects/something/meson.build +++ /dev/null @@ -1,3 +0,0 @@ -project('something') - -meson.override_dependency('something', declare_dependency()) diff --git a/test cases/unit/97 compiler.links file arg/meson.build b/test cases/unit/97 compiler.links file arg/meson.build deleted file mode 100644 index c409dcbd1..000000000 --- a/test cases/unit/97 compiler.links file arg/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('test', ['c', 'cpp']) - -cc = meson.get_compiler('c') -cxx = meson.get_compiler('cpp') - -# used by run_unittests.py to grab the path to the C and C++ compilers -assert(cc.compiles(files('test.c'))) -assert(cxx.compiles(files('test.c'))) - -assert(cc.links(files('test.c'))) -assert(cxx.links(files('test.c'))) diff --git a/test cases/unit/97 compiler.links file arg/test.c b/test cases/unit/97 compiler.links file arg/test.c deleted file mode 100644 index 78f2de106..000000000 --- a/test cases/unit/97 compiler.links file arg/test.c +++ /dev/null @@ -1 +0,0 @@ -int main(void) { return 0; } diff --git a/test cases/unit/97 link full name/.gitignore b/test cases/unit/97 link full name/.gitignore new file mode 100644 index 000000000..812960172 --- /dev/null +++ b/test cases/unit/97 link full name/.gitignore @@ -0,0 +1,5 @@ +*.a +*.o +a.out +libtestprovider.a +build diff --git a/test cases/unit/97 link full name/libtestprovider/meson.build b/test cases/unit/97 link full name/libtestprovider/meson.build new file mode 100644 index 000000000..128c213ac --- /dev/null +++ b/test cases/unit/97 link full name/libtestprovider/meson.build @@ -0,0 +1,20 @@ +project('libtestprovider','c') + +libtestprovider=static_library('testprovider', + files('./provider.c'), + install:true, + c_args:['-Wall','-Werror'], +) + +pkg = import('pkgconfig') + + +pkg.generate( + name:'testprovider', + filebase:'libtestprovider', + description: 'fortest', + requires: [], + libraries_private: ['-Wl,--whole-archive'] + + ['-L${libdir}','-l:libtestprovider.a']+ + ['-Wl,--no-whole-archive'] +) diff --git a/test cases/unit/97 link full name/libtestprovider/provider.c b/test cases/unit/97 link full name/libtestprovider/provider.c new file mode 100644 index 000000000..5e79966f7 --- /dev/null +++ b/test cases/unit/97 link full name/libtestprovider/provider.c @@ -0,0 +1,12 @@ +#include +static int g_checked = 0; + +static void __attribute__((constructor(101), used)) init_checked(void) { + g_checked=100; + fprintf(stdout, "inited\n"); +} + + +int get_checked(void) { + return g_checked; +} diff --git a/test cases/unit/97 link full name/proguser/meson.build b/test cases/unit/97 link full name/proguser/meson.build new file mode 100644 index 000000000..5be5bc998 --- /dev/null +++ b/test cases/unit/97 link full name/proguser/meson.build @@ -0,0 +1,11 @@ +project('testprovider','c') + +deplib = dependency('libtestprovider', static:true) + +dprovidertest = executable('dprovidertest', + files('./receiver.c'), + dependencies:[deplib], + c_args:['-Wall','-Werror'], +) + +test('testprovider',dprovidertest) diff --git a/test cases/unit/97 link full name/proguser/receiver.c b/test cases/unit/97 link full name/proguser/receiver.c new file mode 100644 index 000000000..d661ae4ca --- /dev/null +++ b/test cases/unit/97 link full name/proguser/receiver.c @@ -0,0 +1,18 @@ +#include +int __attribute__((weak)) get_checked(void) { + return -1; +} + + +#define CHECK_VALUE (100) +#define TEST_SUCCESS (0) +#define TEST_FAILURE (-1) + +int main(void) { + if (get_checked() == CHECK_VALUE) { + fprintf(stdout,"good\n"); + return TEST_SUCCESS; + } + fprintf(stdout,"bad\n"); + return TEST_FAILURE; +} diff --git a/test cases/unit/98 install all targets/bar-custom.txt b/test cases/unit/98 install all targets/bar-custom.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/bar-devel.h b/test cases/unit/98 install all targets/bar-devel.h new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/bar-notag.txt b/test cases/unit/98 install all targets/bar-notag.txt new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/custom_files/data.txt b/test cases/unit/98 install all targets/custom_files/data.txt new file mode 100644 index 000000000..557db03de --- /dev/null +++ b/test cases/unit/98 install all targets/custom_files/data.txt @@ -0,0 +1 @@ +Hello World diff --git a/test cases/unit/98 install all targets/excludes/excluded.txt b/test cases/unit/98 install all targets/excludes/excluded.txt new file mode 100644 index 000000000..59b064403 --- /dev/null +++ b/test cases/unit/98 install all targets/excludes/excluded.txt @@ -0,0 +1 @@ +Excluded diff --git a/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt b/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt new file mode 100644 index 000000000..3b94f9157 --- /dev/null +++ b/test cases/unit/98 install all targets/excludes/excluded/placeholder.txt @@ -0,0 +1 @@ +Placeholder diff --git a/test cases/unit/98 install all targets/excludes/installed.txt b/test cases/unit/98 install all targets/excludes/installed.txt new file mode 100644 index 000000000..84376928c --- /dev/null +++ b/test cases/unit/98 install all targets/excludes/installed.txt @@ -0,0 +1 @@ +Installed diff --git a/test cases/unit/98 install all targets/foo.in b/test cases/unit/98 install all targets/foo.in new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/foo1-devel.h b/test cases/unit/98 install all targets/foo1-devel.h new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/lib.c b/test cases/unit/98 install all targets/lib.c new file mode 100644 index 000000000..2ea9c7dd1 --- /dev/null +++ b/test cases/unit/98 install all targets/lib.c @@ -0,0 +1,9 @@ +#if defined _WIN32 || defined __CYGWIN__ +#define DLL_PUBLIC __declspec(dllexport) +#else +#define DLL_PUBLIC +#endif + +int DLL_PUBLIC foo(void) { + return 0; +} diff --git a/test cases/unit/98 install all targets/main.c b/test cases/unit/98 install all targets/main.c new file mode 100644 index 000000000..0fb4389f7 --- /dev/null +++ b/test cases/unit/98 install all targets/main.c @@ -0,0 +1,3 @@ +int main(int argc, char *argv[]) { + return 0; +} diff --git a/test cases/unit/98 install all targets/meson.build b/test cases/unit/98 install all targets/meson.build new file mode 100644 index 000000000..c5f33a054 --- /dev/null +++ b/test cases/unit/98 install all targets/meson.build @@ -0,0 +1,116 @@ +project('install tag', 'c') + +subproject('subproject') + +subdir('subdir') + +# Those files should not be tagged +configure_file(input: 'foo.in', output: 'foo-notag.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +install_data('bar-notag.txt', + install_dir: get_option('datadir') +) +custom_target('ct1', + output: ['out1-notag.txt', 'out2-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) + +# Those files should be tagged as devel +install_headers('foo1-devel.h') +install_data('bar-devel.h', + install_dir: get_option('includedir'), +) +configure_file(input: 'foo.in', output: 'foo2-devel.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('includedir'), + install: true, +) +static_library('static', 'lib.c', + install: true, +) +custom_target('ct-header1', + output: ['ct-header1.h'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('includedir'), + install: true, +) +custom_target('ct-header2', + output: ['ct-header2.h', 'ct-header3.h'], + command: ['script.py', '@OUTPUT@'], + install_dir: [false, get_option('includedir')], + install: true, +) +install_emptydir(get_option('includedir') / 'subdir-devel') +install_subdir('custom_files', + install_dir: get_option('includedir'), +) + +# Those files should have 'runtime' tag +executable('app', 'main.c', + install: true, +) +executable('app-otherdir', 'main.c', + install: true, + install_dir: 'otherbin', +) +shared_library('shared', 'lib.c', + install: true, +) +both_libraries('both', 'lib.c', + install: true, +) + +# Unversioned .so file should have 'devel' tag, others should have 'runtime' tag +shared_library('versioned_shared', 'lib.c', + install: true, + version: '1.2.3', +) + +# Those files should have custom tag +install_data('bar-custom.txt', + install_dir: get_option('datadir'), + install_tag: 'custom') +configure_file(input: 'foo.in', output: 'foo-custom.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install_tag: 'custom', + install: true, +) +both_libraries('bothcustom', 'lib.c', + install_tag: 'custom', + install: true, +) +custom_target('ct2', + output: ['out1-custom.txt', 'out2-custom.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install_tag: 'custom', + install: true, +) +install_subdir('custom_files', + install_dir: get_option('datadir'), + install_tag: 'custom', +) +install_subdir('excludes', + install_dir: get_option('datadir'), + install_tag: 'custom', + exclude_directories: 'excluded', + exclude_files: 'excluded.txt', +) + +# First is custom, 2nd is devel, 3rd has no tag +custom_target('ct3', + output: ['out3-custom.txt', 'out-devel.h', 'out3-notag.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: [get_option('datadir'), get_option('includedir'), get_option('datadir')], + install_tag: ['custom', 'devel', false], + install: true, +) + +meson.add_install_script('script.py', install_tag: 'custom') +meson.add_install_script('script.py') diff --git a/test cases/unit/98 install all targets/script.py b/test cases/unit/98 install all targets/script.py new file mode 100644 index 000000000..c5f3be9ed --- /dev/null +++ b/test cases/unit/98 install all targets/script.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +for f in sys.argv[1:]: + with open(f, 'w') as f: + pass diff --git a/test cases/unit/98 install all targets/subdir/bar2-devel.h b/test cases/unit/98 install all targets/subdir/bar2-devel.h new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/subdir/foo2.in b/test cases/unit/98 install all targets/subdir/foo2.in new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/subdir/foo3-devel.h b/test cases/unit/98 install all targets/subdir/foo3-devel.h new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/98 install all targets/subdir/lib.c b/test cases/unit/98 install all targets/subdir/lib.c new file mode 100644 index 000000000..2ea9c7dd1 --- /dev/null +++ b/test cases/unit/98 install all targets/subdir/lib.c @@ -0,0 +1,9 @@ +#if defined _WIN32 || defined __CYGWIN__ +#define DLL_PUBLIC __declspec(dllexport) +#else +#define DLL_PUBLIC +#endif + +int DLL_PUBLIC foo(void) { + return 0; +} diff --git a/test cases/unit/98 install all targets/subdir/main.c b/test cases/unit/98 install all targets/subdir/main.c new file mode 100644 index 000000000..0fb4389f7 --- /dev/null +++ b/test cases/unit/98 install all targets/subdir/main.c @@ -0,0 +1,3 @@ +int main(int argc, char *argv[]) { + return 0; +} diff --git a/test cases/unit/98 install all targets/subdir/meson.build b/test cases/unit/98 install all targets/subdir/meson.build new file mode 100644 index 000000000..53c796abe --- /dev/null +++ b/test cases/unit/98 install all targets/subdir/meson.build @@ -0,0 +1,21 @@ +configure_file(input: 'foo2.in', output: 'foo2.h', + configuration: {'foo': 'bar'}, + install_dir: get_option('datadir'), + install: true, +) +custom_target('ct4', + output: ['out1.txt', 'out2.txt'], + command: ['script.py', '@OUTPUT@'], + install_dir: get_option('datadir'), + install: true, +) +install_headers('foo3-devel.h') +install_data('bar2-devel.h', + install_dir: get_option('includedir'), +) +executable('app2', 'main.c', + install: true, +) +both_libraries('both2', 'lib.c', + install: true, +) diff --git a/test cases/unit/98 install all targets/subdir/script.py b/test cases/unit/98 install all targets/subdir/script.py new file mode 100644 index 000000000..c5f3be9ed --- /dev/null +++ b/test cases/unit/98 install all targets/subdir/script.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python3 + +import sys + +for f in sys.argv[1:]: + with open(f, 'w') as f: + pass diff --git a/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt b/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt new file mode 100644 index 000000000..43d5a8ed6 --- /dev/null +++ b/test cases/unit/98 install all targets/subprojects/subproject/aaa.txt @@ -0,0 +1 @@ +AAA diff --git a/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt b/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt new file mode 100644 index 000000000..ba629238c --- /dev/null +++ b/test cases/unit/98 install all targets/subprojects/subproject/bbb.txt @@ -0,0 +1 @@ +BBB diff --git a/test cases/unit/98 install all targets/subprojects/subproject/meson.build b/test cases/unit/98 install all targets/subprojects/subproject/meson.build new file mode 100644 index 000000000..ff474ace1 --- /dev/null +++ b/test cases/unit/98 install all targets/subprojects/subproject/meson.build @@ -0,0 +1,5 @@ +project('subproject') + +install_data('aaa.txt') + +install_data('bbb.txt', install_tag: 'data') diff --git a/test cases/unit/98 link full name/.gitignore b/test cases/unit/98 link full name/.gitignore deleted file mode 100644 index 812960172..000000000 --- a/test cases/unit/98 link full name/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.a -*.o -a.out -libtestprovider.a -build diff --git a/test cases/unit/98 link full name/libtestprovider/meson.build b/test cases/unit/98 link full name/libtestprovider/meson.build deleted file mode 100644 index 128c213ac..000000000 --- a/test cases/unit/98 link full name/libtestprovider/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -project('libtestprovider','c') - -libtestprovider=static_library('testprovider', - files('./provider.c'), - install:true, - c_args:['-Wall','-Werror'], -) - -pkg = import('pkgconfig') - - -pkg.generate( - name:'testprovider', - filebase:'libtestprovider', - description: 'fortest', - requires: [], - libraries_private: ['-Wl,--whole-archive'] + - ['-L${libdir}','-l:libtestprovider.a']+ - ['-Wl,--no-whole-archive'] -) diff --git a/test cases/unit/98 link full name/libtestprovider/provider.c b/test cases/unit/98 link full name/libtestprovider/provider.c deleted file mode 100644 index 5e79966f7..000000000 --- a/test cases/unit/98 link full name/libtestprovider/provider.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -static int g_checked = 0; - -static void __attribute__((constructor(101), used)) init_checked(void) { - g_checked=100; - fprintf(stdout, "inited\n"); -} - - -int get_checked(void) { - return g_checked; -} diff --git a/test cases/unit/98 link full name/proguser/meson.build b/test cases/unit/98 link full name/proguser/meson.build deleted file mode 100644 index 5be5bc998..000000000 --- a/test cases/unit/98 link full name/proguser/meson.build +++ /dev/null @@ -1,11 +0,0 @@ -project('testprovider','c') - -deplib = dependency('libtestprovider', static:true) - -dprovidertest = executable('dprovidertest', - files('./receiver.c'), - dependencies:[deplib], - c_args:['-Wall','-Werror'], -) - -test('testprovider',dprovidertest) diff --git a/test cases/unit/98 link full name/proguser/receiver.c b/test cases/unit/98 link full name/proguser/receiver.c deleted file mode 100644 index d661ae4ca..000000000 --- a/test cases/unit/98 link full name/proguser/receiver.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -int __attribute__((weak)) get_checked(void) { - return -1; -} - - -#define CHECK_VALUE (100) -#define TEST_SUCCESS (0) -#define TEST_FAILURE (-1) - -int main(void) { - if (get_checked() == CHECK_VALUE) { - fprintf(stdout,"good\n"); - return TEST_SUCCESS; - } - fprintf(stdout,"bad\n"); - return TEST_FAILURE; -} diff --git a/test cases/unit/99 custom target name/file.txt.in b/test cases/unit/99 custom target name/file.txt.in new file mode 100644 index 000000000..e69de29bb diff --git a/test cases/unit/99 custom target name/meson.build b/test cases/unit/99 custom target name/meson.build new file mode 100644 index 000000000..82876149f --- /dev/null +++ b/test cases/unit/99 custom target name/meson.build @@ -0,0 +1,14 @@ +project('custom target name', 'c') + +python = find_program('python3') + +# Name argument is optional and should default to 'file.txt' +custom_target( + input: 'file.txt.in', + output: '@BASENAME@', + command: [python, '--version'], + build_by_default: true, + capture: true, +) + +subdir('subdir') diff --git a/test cases/unit/99 custom target name/subdir/meson.build b/test cases/unit/99 custom target name/subdir/meson.build new file mode 100644 index 000000000..785a7b366 --- /dev/null +++ b/test cases/unit/99 custom target name/subdir/meson.build @@ -0,0 +1,9 @@ +# Name argument is optional and should default to 'file.txt', but should be +# displayed as 'subdir/file.txt' by ninja. +custom_target( + input: '../file.txt.in', + output: ['@BASENAME@'], + command: [python, '--version'], + build_by_default: true, + capture: true, +) diff --git a/test cases/unit/99 install all targets/bar-custom.txt b/test cases/unit/99 install all targets/bar-custom.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/bar-devel.h b/test cases/unit/99 install all targets/bar-devel.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/bar-notag.txt b/test cases/unit/99 install all targets/bar-notag.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/custom_files/data.txt b/test cases/unit/99 install all targets/custom_files/data.txt deleted file mode 100644 index 557db03de..000000000 --- a/test cases/unit/99 install all targets/custom_files/data.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/test cases/unit/99 install all targets/excludes/excluded.txt b/test cases/unit/99 install all targets/excludes/excluded.txt deleted file mode 100644 index 59b064403..000000000 --- a/test cases/unit/99 install all targets/excludes/excluded.txt +++ /dev/null @@ -1 +0,0 @@ -Excluded diff --git a/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt b/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt deleted file mode 100644 index 3b94f9157..000000000 --- a/test cases/unit/99 install all targets/excludes/excluded/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ -Placeholder diff --git a/test cases/unit/99 install all targets/excludes/installed.txt b/test cases/unit/99 install all targets/excludes/installed.txt deleted file mode 100644 index 84376928c..000000000 --- a/test cases/unit/99 install all targets/excludes/installed.txt +++ /dev/null @@ -1 +0,0 @@ -Installed diff --git a/test cases/unit/99 install all targets/foo.in b/test cases/unit/99 install all targets/foo.in deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/foo1-devel.h b/test cases/unit/99 install all targets/foo1-devel.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/lib.c b/test cases/unit/99 install all targets/lib.c deleted file mode 100644 index 2ea9c7dd1..000000000 --- a/test cases/unit/99 install all targets/lib.c +++ /dev/null @@ -1,9 +0,0 @@ -#if defined _WIN32 || defined __CYGWIN__ -#define DLL_PUBLIC __declspec(dllexport) -#else -#define DLL_PUBLIC -#endif - -int DLL_PUBLIC foo(void) { - return 0; -} diff --git a/test cases/unit/99 install all targets/main.c b/test cases/unit/99 install all targets/main.c deleted file mode 100644 index 0fb4389f7..000000000 --- a/test cases/unit/99 install all targets/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char *argv[]) { - return 0; -} diff --git a/test cases/unit/99 install all targets/meson.build b/test cases/unit/99 install all targets/meson.build deleted file mode 100644 index c5f33a054..000000000 --- a/test cases/unit/99 install all targets/meson.build +++ /dev/null @@ -1,116 +0,0 @@ -project('install tag', 'c') - -subproject('subproject') - -subdir('subdir') - -# Those files should not be tagged -configure_file(input: 'foo.in', output: 'foo-notag.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -install_data('bar-notag.txt', - install_dir: get_option('datadir') -) -custom_target('ct1', - output: ['out1-notag.txt', 'out2-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) - -# Those files should be tagged as devel -install_headers('foo1-devel.h') -install_data('bar-devel.h', - install_dir: get_option('includedir'), -) -configure_file(input: 'foo.in', output: 'foo2-devel.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('includedir'), - install: true, -) -static_library('static', 'lib.c', - install: true, -) -custom_target('ct-header1', - output: ['ct-header1.h'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('includedir'), - install: true, -) -custom_target('ct-header2', - output: ['ct-header2.h', 'ct-header3.h'], - command: ['script.py', '@OUTPUT@'], - install_dir: [false, get_option('includedir')], - install: true, -) -install_emptydir(get_option('includedir') / 'subdir-devel') -install_subdir('custom_files', - install_dir: get_option('includedir'), -) - -# Those files should have 'runtime' tag -executable('app', 'main.c', - install: true, -) -executable('app-otherdir', 'main.c', - install: true, - install_dir: 'otherbin', -) -shared_library('shared', 'lib.c', - install: true, -) -both_libraries('both', 'lib.c', - install: true, -) - -# Unversioned .so file should have 'devel' tag, others should have 'runtime' tag -shared_library('versioned_shared', 'lib.c', - install: true, - version: '1.2.3', -) - -# Those files should have custom tag -install_data('bar-custom.txt', - install_dir: get_option('datadir'), - install_tag: 'custom') -configure_file(input: 'foo.in', output: 'foo-custom.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install_tag: 'custom', - install: true, -) -both_libraries('bothcustom', 'lib.c', - install_tag: 'custom', - install: true, -) -custom_target('ct2', - output: ['out1-custom.txt', 'out2-custom.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install_tag: 'custom', - install: true, -) -install_subdir('custom_files', - install_dir: get_option('datadir'), - install_tag: 'custom', -) -install_subdir('excludes', - install_dir: get_option('datadir'), - install_tag: 'custom', - exclude_directories: 'excluded', - exclude_files: 'excluded.txt', -) - -# First is custom, 2nd is devel, 3rd has no tag -custom_target('ct3', - output: ['out3-custom.txt', 'out-devel.h', 'out3-notag.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: [get_option('datadir'), get_option('includedir'), get_option('datadir')], - install_tag: ['custom', 'devel', false], - install: true, -) - -meson.add_install_script('script.py', install_tag: 'custom') -meson.add_install_script('script.py') diff --git a/test cases/unit/99 install all targets/script.py b/test cases/unit/99 install all targets/script.py deleted file mode 100644 index c5f3be9ed..000000000 --- a/test cases/unit/99 install all targets/script.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -for f in sys.argv[1:]: - with open(f, 'w') as f: - pass diff --git a/test cases/unit/99 install all targets/subdir/bar2-devel.h b/test cases/unit/99 install all targets/subdir/bar2-devel.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/subdir/foo2.in b/test cases/unit/99 install all targets/subdir/foo2.in deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/subdir/foo3-devel.h b/test cases/unit/99 install all targets/subdir/foo3-devel.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/test cases/unit/99 install all targets/subdir/lib.c b/test cases/unit/99 install all targets/subdir/lib.c deleted file mode 100644 index 2ea9c7dd1..000000000 --- a/test cases/unit/99 install all targets/subdir/lib.c +++ /dev/null @@ -1,9 +0,0 @@ -#if defined _WIN32 || defined __CYGWIN__ -#define DLL_PUBLIC __declspec(dllexport) -#else -#define DLL_PUBLIC -#endif - -int DLL_PUBLIC foo(void) { - return 0; -} diff --git a/test cases/unit/99 install all targets/subdir/main.c b/test cases/unit/99 install all targets/subdir/main.c deleted file mode 100644 index 0fb4389f7..000000000 --- a/test cases/unit/99 install all targets/subdir/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main(int argc, char *argv[]) { - return 0; -} diff --git a/test cases/unit/99 install all targets/subdir/meson.build b/test cases/unit/99 install all targets/subdir/meson.build deleted file mode 100644 index 53c796abe..000000000 --- a/test cases/unit/99 install all targets/subdir/meson.build +++ /dev/null @@ -1,21 +0,0 @@ -configure_file(input: 'foo2.in', output: 'foo2.h', - configuration: {'foo': 'bar'}, - install_dir: get_option('datadir'), - install: true, -) -custom_target('ct4', - output: ['out1.txt', 'out2.txt'], - command: ['script.py', '@OUTPUT@'], - install_dir: get_option('datadir'), - install: true, -) -install_headers('foo3-devel.h') -install_data('bar2-devel.h', - install_dir: get_option('includedir'), -) -executable('app2', 'main.c', - install: true, -) -both_libraries('both2', 'lib.c', - install: true, -) diff --git a/test cases/unit/99 install all targets/subdir/script.py b/test cases/unit/99 install all targets/subdir/script.py deleted file mode 100644 index c5f3be9ed..000000000 --- a/test cases/unit/99 install all targets/subdir/script.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -for f in sys.argv[1:]: - with open(f, 'w') as f: - pass diff --git a/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt b/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt deleted file mode 100644 index 43d5a8ed6..000000000 --- a/test cases/unit/99 install all targets/subprojects/subproject/aaa.txt +++ /dev/null @@ -1 +0,0 @@ -AAA diff --git a/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt b/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt deleted file mode 100644 index ba629238c..000000000 --- a/test cases/unit/99 install all targets/subprojects/subproject/bbb.txt +++ /dev/null @@ -1 +0,0 @@ -BBB diff --git a/test cases/unit/99 install all targets/subprojects/subproject/meson.build b/test cases/unit/99 install all targets/subprojects/subproject/meson.build deleted file mode 100644 index ff474ace1..000000000 --- a/test cases/unit/99 install all targets/subprojects/subproject/meson.build +++ /dev/null @@ -1,5 +0,0 @@ -project('subproject') - -install_data('aaa.txt') - -install_data('bbb.txt', install_tag: 'data') diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 059be2d4f..53a0042c2 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -474,7 +474,7 @@ class AllPlatformTests(BasePlatformTests): ''' if not shutil.which('xmllint'): raise SkipTest('xmllint not installed') - testdir = os.path.join(self.unit_test_dir, '110 replace unencodable xml chars') + testdir = os.path.join(self.unit_test_dir, '111 replace unencodable xml chars') self.init(testdir) tests_command_output = self.run_tests() junit_xml_logs = Path(self.logdir, 'testlog.junit.xml') @@ -634,7 +634,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']) @@ -1958,7 +1958,7 @@ class AllPlatformTests(BasePlatformTests): check_pcfile('libvartest2.pc', relocatable=False) self.wipe() - testdir_abs = os.path.join(self.unit_test_dir, '106 pkgconfig relocatable with absolute path') + testdir_abs = os.path.join(self.unit_test_dir, '105 pkgconfig relocatable with absolute path') self.init(testdir_abs) check_pcfile('libsimple.pc', relocatable=True, levels=3) @@ -2040,7 +2040,7 @@ class AllPlatformTests(BasePlatformTests): self.assertDictEqual(original, expected) def test_executable_names(self): - testdir = os.path.join(self.unit_test_dir, '119 executable suffix') + testdir = os.path.join(self.unit_test_dir, '121 executable suffix') self.init(testdir) self.build() exe1 = os.path.join(self.builddir, 'foo' + exe_suffix) @@ -2131,7 +2131,7 @@ class AllPlatformTests(BasePlatformTests): def test_options_listed_in_build_options(self) -> None: """Detect when changed options become listed in build options.""" - testdir = os.path.join(self.unit_test_dir, '112 list build options') + testdir = os.path.join(self.unit_test_dir, '113 list build options') out = self.init(testdir) for line in out.splitlines(): @@ -2236,9 +2236,9 @@ class AllPlatformTests(BasePlatformTests): for (t, f) in [ ('10 out of bounds', 'meson.build'), ('18 wrong plusassign', 'meson.build'), - ('59 bad option argument', 'meson_options.txt'), - ('97 subdir parse error', os.path.join('subdir', 'meson.build')), - ('98 invalid option file', 'meson_options.txt'), + ('57 bad option argument', 'meson_options.txt'), + ('95 subdir parse error', os.path.join('subdir', 'meson.build')), + ('96 invalid option file', 'meson_options.txt'), ]: tdir = os.path.join(self.src_root, 'test cases', 'failing', t) @@ -2369,7 +2369,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) @@ -4206,7 +4206,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() @@ -4253,7 +4253,7 @@ class AllPlatformTests(BasePlatformTests): check_installed_files(['--skip-subprojects', 'another'], all_expected) def test_adding_subproject_to_configure_project(self) -> None: - srcdir = os.path.join(self.unit_test_dir, '93 new subproject in configured project') + srcdir = os.path.join(self.unit_test_dir, '92 new subproject in configured project') self.init(srcdir) self.build() self.setconf('-Duse-sub=true') @@ -4303,7 +4303,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() @@ -4328,7 +4328,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() @@ -4368,7 +4368,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() @@ -4539,7 +4539,7 @@ class AllPlatformTests(BasePlatformTests): 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) @@ -4791,7 +4791,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', encoding='utf-8') as f: f.write(template.format(0)) @@ -4839,7 +4839,7 @@ class AllPlatformTests(BasePlatformTests): return 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: @@ -4900,7 +4900,7 @@ class AllPlatformTests(BasePlatformTests): oldmtime = newmtime def test_c_cpp_stds(self): - testdir = os.path.join(self.unit_test_dir, '114 c cpp stds') + testdir = os.path.join(self.unit_test_dir, '115 c cpp stds') self.init(testdir) # Invalid values should fail whatever compiler we have with self.assertRaises(subprocess.CalledProcessError): diff --git a/unittests/linuxliketests.py b/unittests/linuxliketests.py index 024d4338a..de86fa7fa 100644 --- a/unittests/linuxliketests.py +++ b/unittests/linuxliketests.py @@ -1366,7 +1366,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 @@ -1379,7 +1379,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 @@ -1791,7 +1791,7 @@ class LinuxlikeTests(BasePlatformTests): @skipUnless(is_linux() or is_osx(), 'Test only applicable to Linux and macOS') 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() @@ -1847,7 +1847,7 @@ class LinuxlikeTests(BasePlatformTests): @skipUnless(is_linux(), "Ninja file differs on different platforms") def test_complex_link_cases(self): - testdir = os.path.join(self.unit_test_dir, '113 complex link cases') + testdir = os.path.join(self.unit_test_dir, '114 complex link cases') self.init(testdir) self.build() with open(os.path.join(self.builddir, 'build.ninja'), encoding='utf-8') as f: diff --git a/unittests/machinefiletests.py b/unittests/machinefiletests.py index 9e71810c9..d2309f802 100644 --- a/unittests/machinefiletests.py +++ b/unittests/machinefiletests.py @@ -375,7 +375,7 @@ class NativeFileTests(BasePlatformTests): def test_java_classpath(self): if self.backend is not Backend.ninja: raise SkipTest('Jar is only supported with Ninja') - testdir = os.path.join(self.unit_test_dir, '111 classpath') + testdir = os.path.join(self.unit_test_dir, '112 classpath') self.init(testdir) self.build() one_build_path = get_classpath(os.path.join(self.builddir, 'one.jar')) diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index 204a22ba5..f094e988a 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -39,7 +39,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): @@ -75,11 +75,11 @@ class PlatformAgnosticTests(BasePlatformTests): interp.process(fname) def test_python_dependency_without_pkgconfig(self): - testdir = os.path.join(self.unit_test_dir, '103 python without pkgconfig') + testdir = os.path.join(self.unit_test_dir, '102 python without pkgconfig') self.init(testdir, override_envvars={'PKG_CONFIG': 'notfound'}) def test_debug_function_outputs_to_meson_log(self): - testdir = os.path.join(self.unit_test_dir, '105 debug function') + testdir = os.path.join(self.unit_test_dir, '104 debug function') log_msg = 'This is an example debug output, should only end up in debug log' output = self.init(testdir) @@ -250,7 +250,7 @@ class PlatformAgnosticTests(BasePlatformTests): thing to do as new features are added, but keeping track of them is good. ''' - testdir = os.path.join(self.unit_test_dir, '114 empty project') + testdir = os.path.join(self.unit_test_dir, '116 empty project') self.init(testdir) self._run(self.meson_command + ['--internal', 'regenerate', '--profile-self', testdir, self.builddir]) @@ -265,7 +265,7 @@ class PlatformAgnosticTests(BasePlatformTests): def test_meson_package_cache_dir(self): # Copy testdir into temporary directory to not pollute meson source tree. - testdir = os.path.join(self.unit_test_dir, '116 meson package cache dir') + testdir = os.path.join(self.unit_test_dir, '118 meson package cache dir') srcdir = os.path.join(self.builddir, 'srctree') shutil.copytree(testdir, srcdir) builddir = os.path.join(srcdir, '_build') @@ -274,7 +274,7 @@ class PlatformAgnosticTests(BasePlatformTests): def test_cmake_openssl_not_found_bug(self): """Issue #12098""" - testdir = os.path.join(self.unit_test_dir, '117 openssl cmake bug') + testdir = os.path.join(self.unit_test_dir, '119 openssl cmake bug') self.meson_native_files.append(os.path.join(testdir, 'nativefile.ini')) out = self.init(testdir, allow_fail=True) self.assertNotIn('Unhandled python exception', out) diff --git a/unittests/rewritetests.py b/unittests/rewritetests.py index c33884442..7932fecae 100644 --- a/unittests/rewritetests.py +++ b/unittests/rewritetests.py @@ -402,7 +402,7 @@ class RewriterTests(BasePlatformTests): self.assertDictEqual(out, expected) def test_raw_printer_is_idempotent(self): - test_path = Path(self.unit_test_dir, '118 rewrite') + test_path = Path(self.unit_test_dir, '120 rewrite') meson_build_file = test_path / 'meson.build' # original_contents = meson_build_file.read_bytes() original_contents = meson_build_file.read_text(encoding='utf-8') diff --git a/unittests/windowstests.py b/unittests/windowstests.py index 37e92996d..be53d65a0 100644 --- a/unittests/windowstests.py +++ b/unittests/windowstests.py @@ -195,7 +195,7 @@ class WindowsTests(BasePlatformTests): if self.backend is not Backend.ninja: raise SkipTest('Test only applies when using the Ninja backend') - testdir = os.path.join(self.unit_test_dir, '115 genvslite') + testdir = os.path.join(self.unit_test_dir, '117 genvslite') env = get_fake_env(testdir, self.builddir, self.prefix) cc = detect_c_compiler(env, MachineChoice.HOST) -- cgit v1.2.3