Commit 3eeab5a
committed
tests: Respect compression formats rpmio supports in module_index test
If rpm does not support all compression formats and libmodulemd is
configured with rpmio support, module_index_release test failed:
$ MESON_SOURCE_ROOT=/tmp/libmodulemd-2.15.0 TEST_DATA_PATH=/tmp/libmodulemd-2.15.0/modulemd/tests/test_data /tmp/b/modulemd/module_index
TAP version 14
# random seed: R02Sf9e05b79de9e908ae8cb3de188499581
1..18
# Start of modulemd tests
# Start of v2 tests
# Start of module tests
# Start of index tests
ok 1 /modulemd/v2/module/index/dump
ok 2 /modulemd/v2/module/index/read
ok 3 /modulemd/v2/module/index/remove_module
ok 4 /modulemd/v2/module/index/custom_read
ok 5 /modulemd/v2/module/index/custom_write
ok 6 /modulemd/v2/module/index/get_default_streams
ok 7 /modulemd/v2/module/index/empty
**
libmodulemd:ERROR:../libmodulemd-2.15.0/modulemd/tests/test-modulemd-moduleindex.c:1493:test_module_index_read_compressed: assertion failed (error == NULL): Parser error (modulemd-yaml-error-quark, 2)
not ok /modulemd/v2/module/index/compressed - libmodulemd:ERROR:../libmodulemd-2.15.0/modulemd/tests/test-modulemd-moduleindex.c:1493:test_module_index_read_compressed: assertion failed (error == NULL): Parser
+error (modulemd-yaml-error-quark, 2)
Bail out!
The test assumed that rpmio library supports all compression formats.
That's not guaranteed, the support is optional for each format.
This patch fixes it by probing rpmio library for each compression
format and if that does not work (rpmio returns compressed data), the
test will assume that that format is not supported.
Implementation details: The probing happens at run-time and thus links
the rpmio library to the the tests. Probing at configure time would
not work when crosscompiling.
Resolve: #6301 parent e7f179e commit 3eeab5a
2 files changed
+61
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
1377 | 1382 | | |
1378 | 1383 | | |
1379 | 1384 | | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1380 | 1389 | | |
1381 | 1390 | | |
1382 | 1391 | | |
| |||
1386 | 1395 | | |
1387 | 1396 | | |
1388 | 1397 | | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1389 | 1425 | | |
1390 | 1426 | | |
1391 | 1427 | | |
| |||
1402 | 1438 | | |
1403 | 1439 | | |
1404 | 1440 | | |
| 1441 | + | |
1405 | 1442 | | |
1406 | 1443 | | |
1407 | 1444 | | |
1408 | 1445 | | |
| 1446 | + | |
1409 | 1447 | | |
1410 | 1448 | | |
1411 | | - | |
1412 | | - | |
1413 | | - | |
1414 | | - | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1415 | 1457 | | |
1416 | 1458 | | |
1417 | 1459 | | |
| |||
1475 | 1517 | | |
1476 | 1518 | | |
1477 | 1519 | | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
1478 | 1533 | | |
1479 | 1534 | | |
1480 | 1535 | | |
| |||
0 commit comments