|
| 1 | +[setup] |
| 2 | + [setup.env] |
| 3 | + PKG_CONFIG_PATH="{test_root}/lib1" |
| 4 | + |
| 5 | +[noargs] |
| 6 | + exitcode = 1 |
| 7 | + stderr = '<ignore>' |
| 8 | + expected_fail = true |
| 9 | + |
| 10 | +[libs] |
| 11 | + stdout = "-L/test/lib -lfoo\n" |
| 12 | + args = ["--libs", "foo"] |
| 13 | + expected_fail = true |
| 14 | + |
| 15 | +[lib_cflags] |
| 16 | + stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n" |
| 17 | + args = ["--cflags", "--libs", "foo"] |
| 18 | + expected_fail = true |
| 19 | + |
| 20 | +[lib_cflags_version] |
| 21 | + stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n" |
| 22 | + args = ["--cflags", "--libs", "foo > 1.2"] |
| 23 | + expected_fail = true |
| 24 | + |
| 25 | +[lib_cflags_version_multiple] |
| 26 | + stdout = "-fPIC -I/test/include/foo -L/test/lib -lbar -lfoo\n" |
| 27 | + args = ["--cflags", "--libs", "foo > 1.2 bar >= 1.3"] |
| 28 | + expected_fail = true |
| 29 | + |
| 30 | +[lib_cflags_version_multiple_comma] |
| 31 | + stdout = "-fPIC -I/test/include/foo -L/test/lib -lbar -lfoo\n" |
| 32 | + args = ["--cflags", "--libs", "foo > 1.2,bar >= 1.3"] |
| 33 | + expected_fail = true |
| 34 | + |
| 35 | +[lib_cflags_version_alt] |
| 36 | + stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n" |
| 37 | + args = ["--cflags", "--libs", "foo", ">", "1.2"] |
| 38 | + expected_fail = true |
| 39 | + |
| 40 | +[lib_cflags_version_different] |
| 41 | + stdout = "-fPIC -I/test/include/foo -L/test/lib -lfoo\n" |
| 42 | + args = ["--cflags", "--libs", "foo", "!=", "1.3"] |
| 43 | + expected_fail = true |
| 44 | + |
| 45 | +[lib_cflags_version_different_bad] |
| 46 | + exitcode = 1 |
| 47 | + stderr = "Package dependency requirement 'foo != 1.2.3' could not be satisfied.\nPackage 'foo' has version '1.2.3', required version is '!= 1.2.3'\n" |
| 48 | + args = ["--cflags", "--libs", "foo", "!=", "1.2.3"] |
| 49 | + expected_fail = true |
| 50 | + |
| 51 | +[exists_nonexistent] |
| 52 | + exitcode = 1 |
| 53 | + args = ["--exists", "nonexistant"] |
| 54 | + expected_fail = true |
| 55 | + |
| 56 | +[nonexistent] |
| 57 | + exitcode = 1 |
| 58 | + args = ["nonexistant"] |
| 59 | + |
| 60 | +[exists_version] |
| 61 | + args = ["--exists", "foo > 1.2"] |
| 62 | + expected_fail = true |
| 63 | + |
| 64 | +[exists_version_alt] |
| 65 | + args = ["--exists", "foo", ">", "1.2"] |
| 66 | + expected_fail = true |
| 67 | + |
| 68 | +[exists_version_bad] |
| 69 | + exitcode = 1 |
| 70 | + args = ["--exists", "foo > 1.2.3"] |
| 71 | + expected_fail = true |
| 72 | + |
| 73 | +[uninstalled_bad] |
| 74 | + exitcode = 1 |
| 75 | + args = ["--uninstalled", "foo"] |
| 76 | + expected_fail = true |
| 77 | + |
| 78 | +[uninstalled] |
| 79 | + args = ["--uninstalled", "omg"] |
| 80 | + expected_fail = true |
| 81 | + |
| 82 | +[exists_version_bad2] |
| 83 | + exitcode = 1 |
| 84 | + args = ["--exists", "foo >= "] |
| 85 | + expected_fail = true |
| 86 | + |
| 87 | +[exists_version_bad3] |
| 88 | + exitcode = 1 |
| 89 | + args = ["--exists", "tilde >= 1.0.0"] |
| 90 | + expected_fail = true |
| 91 | + |
| 92 | +[exists] |
| 93 | + args = ["--exists", "tilde >= 1.0.0"] |
| 94 | + expected_fail = true |
| 95 | + |
| 96 | +[exists2] |
| 97 | + args = ["--exists", "tilde >= 1.0.0~rc1"] |
| 98 | + expected_fail = true |
| 99 | + |
| 100 | +[exists3] |
| 101 | + args = ["--exists", "", "foo"] |
| 102 | + expected_fail = true |
| 103 | + |
| 104 | +[intermediary] |
| 105 | + args = ["--libs", "intermediary-1", "intermediary-2"] |
| 106 | + stdout = "-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz\n" |
| 107 | + expected_fail = true |
| 108 | + |
| 109 | +[circular2] |
| 110 | + args = ["circular-2", "--validate"] |
| 111 | + stdout = "circular-1: breaking circular reference (circular-1 -> circular-2 -> circular-1)\n" |
| 112 | + expected_fail = true |
| 113 | + |
| 114 | +[circular1] |
| 115 | + args = ["circular-1", "--validate"] |
| 116 | + stdout = "circular-3: breaking circular reference (circular-3 -> circular-1 -> circular-3)\n" |
| 117 | + expected_fail = true |
| 118 | + |
| 119 | +[circular_direct_pc] |
| 120 | + args = ["--libs", "{test_root}/lib1/circular-3.pc"] |
| 121 | + stdout = "-lcircular-3 -lcircular-1 -lcircular-2\n" |
| 122 | + expected_fail = true |
| 123 | + |
| 124 | +[libs_static] |
| 125 | + args = ["--libs", "static-archive-libs"] |
| 126 | + stdout = "/libfoo.a -pthread\n" |
| 127 | + expected_fail = true |
| 128 | + |
| 129 | +[pkg_config_path] |
| 130 | + args = ["--libs", "foo"] |
| 131 | + stdout = "-L/test/lib -lfoo\n" |
| 132 | + expected_fail = true |
| 133 | + |
| 134 | + [pkg_config_path.env] |
| 135 | + PKG_CONFIG_PATH = "{test_root}/lib1:{test_root}/lib2" |
| 136 | + |
| 137 | +[pkg_config_path2] |
| 138 | + args = ["--libs", "bar"] |
| 139 | + stdout = "-L/test/lib -lbar -lfoo\n" |
| 140 | + expected_fail = true |
| 141 | + |
| 142 | + [pkg_config_path2.env] |
| 143 | + PKG_CONFIG_PATH = "{test_root}/lib1:{test_root}/lib2" |
| 144 | + |
| 145 | +[with_path] |
| 146 | + args = ["--with-path={test_root}/lib", "--with-path={test_root}/lib2", "--libs", "foo"] |
| 147 | + stdout = "-L/test/lib -lfoo\n" |
| 148 | + expected_fail = true |
| 149 | + |
| 150 | +[with_path2] |
| 151 | + args = ["--with-path={test_root}/lib", "--with-path={test_root}/lib2", "--libs", "bar"] |
| 152 | + stdout = "-L/test/lib -lbar -lfoo\n" |
| 153 | + expected_fail = true |
| 154 | + |
| 155 | +[nolibs] |
| 156 | + args = ["--libs", "nolib"] |
| 157 | + stdout = "\n" |
| 158 | + expected_fail = true |
| 159 | + |
| 160 | +[nocflags] |
| 161 | + args = ["--cflags", "nocflag"] |
| 162 | + stdout = "\n" |
| 163 | + |
| 164 | +# TODO: [arbitrary_path] |
| 165 | + |
| 166 | +# TODO: This doesn't work, needs some more magic? |
| 167 | +#[relocatable_body] |
| 168 | +# args = ["--define-prefix", "--variable=prefix", "tests/lib-relocatable/lib/pkgconfig/foo.pc"] |
| 169 | +# stdout = "tests/lib-relocatable\n" |
| 170 | + |
| 171 | +[single_depth_selectors] |
| 172 | + args = ["--with-path={test_root}/lib3", "--print-requires", "bar"] |
| 173 | + stdout = "foo\n" |
| 174 | + expected_fail = true |
| 175 | + |
| 176 | + [single_depth_selectors.env] |
| 177 | + PKG_CONFIG_MAXIMUM_TRAVERSAL_DEPTH = "1" |
| 178 | + |
| 179 | +[license_isc] |
| 180 | + args = ["--license", "foo"] |
| 181 | + stdout = "foo: ISC\n" |
| 182 | + expected_fail = true |
| 183 | + |
| 184 | +[license_noassertion] |
| 185 | + args = ["--license", "bar"] |
| 186 | + stdout = "bar: NOASSERTION\nfoo: ISC\n" |
| 187 | + expected_fail = true |
| 188 | + |
| 189 | +[modversion_noflatten] |
| 190 | + args = ["--modversion", "bar"] |
| 191 | + stdout = "1.3\n" |
| 192 | + expected_fail = true |
| 193 | + |
| 194 | +[exists_cflags] |
| 195 | + args = ["--with-path={test_root}/lib", "--cflags", "--exists-cflags", "--fragment-filter=D", "foo"] |
| 196 | + stdout = "-DHAVE_FOO\n" |
| 197 | + expected_fail = true |
| 198 | + |
| 199 | +[exists_cflags_env] |
| 200 | + args = ["--with-path={test_root}/lib", "--cflags", "--exists-cflags", "--fragment-filter=D", "--env=FOO", "foo"] |
| 201 | + stdout = "FOO_CFLAGS='-DHAVE_FOO'\n" |
| 202 | + expected_fail = true |
| 203 | + |
| 204 | +[libs_env] |
| 205 | + args = ["--with-path={test_root}/lib", "--libs", "--env=FOO", "foo"] |
| 206 | + stdout = "FOO_LIBS='-L/test/lib -lfoo'\n" |
| 207 | + expected_fail = true |
| 208 | + |
| 209 | +[print_variables_env] |
| 210 | + args = ["--with-path={test_root}/lib", "--env=FOO", "--print-variables", "--cflags", "--libs", "foo"] |
| 211 | + stdout = "FOO_CFLAGS='-fPIC -I/test/include/foo'\nFOO_LIBS='-L/test/lib -lfoo'\nFOO_INCLUDEDIR='/test/include'\nFOO_LIBDIR='/test/lib'\nFOO_EXEC_PREFIX='/test'\nFOO_PREFIX='/test'\nFOO_PCFILEDIR='{test_root}/lib1'\n" |
| 212 | + expected_fail = true |
| 213 | + |
| 214 | +[variable_env] |
| 215 | + args = ["--with-path={test_root}/lib", "--env=FOO", "--variable=includedir", "foo"] |
| 216 | + stdout = "FOO_INCLUDEDIR='/test/include'\n" |
| 217 | + expected_fail = true |
| 218 | + |
| 219 | +# TODO: variable_env |
0 commit comments