rpm/tests
Panu Matilainen 122bb4ffae Add parsed and expanded spec to src.rpm header (#1241)
The trend of packaging is to hide more and more of what actually happens
behind helper macros and other dynamically generated constructs. While
this is mostly a good thing, it makes understanding and postmortem
analysis harder than it should be. Add the spec in its parsed and
expanded form into the src.rpm header to make the actual contents of the
build more trackable.

It can be argued this does not belong in the header and should be in
payload instead, my rationale for the placement is that this way the
payload remains effectively arch independent, whereas the header already
heavily reflects the particular environment where it was built.

Probably worth noting that %setup and %patch built-in macros are not
properly expanded in the stored spec, but that's a separate issue
related the special way %prep is processed.

Fixes: #1241
2022-05-09 14:03:03 +02:00
..
data Clean up redundant and/or considered harmful crap from testsuite specs 2022-05-04 09:56:35 +03:00
Makefile.am Test that signatures made by bad subkeys are rejected 2022-04-29 14:36:44 +03:00
README.md test/README: Improve wording, convert to markdown (#1662) 2021-04-29 13:25:55 +02:00
atlocal.in Test that signatures made by bad subkeys are rejected 2022-04-29 14:36:44 +03:00
local.at Disable implicit database creation on read-only handle 2020-11-24 07:18:20 +02:00
rpmbuild.at Add parsed and expanded spec to src.rpm header (#1241) 2022-05-09 14:03:03 +02:00
rpmbuildid.at Use external debuginfo tooling 2021-06-21 12:52:39 +03:00
rpmconfig.at Merge %config tests sharing built content into common groups 2020-06-15 11:59:40 +02:00
rpmconfig2.at Merge %config symlink tests sharing built content into common groups 2020-06-15 11:59:40 +02:00
rpmconfig3.at Merge config filetype change tests sharing built content into common groups 2020-06-15 11:59:40 +02:00
rpmconflict.at Remove now redundant TOPDIR removals from tests 2020-06-12 13:18:56 +03:00
rpmdb.at Add a bunch of file-erasure related testcases 2022-03-28 10:43:36 +03:00
rpmdepmatch.at Rearrange test-suite python helper macros a bit 2011-06-09 13:19:14 +03:00
rpmdeps.at Unbreak checking of installed rich dependencies 2021-06-10 09:28:11 +03:00
rpme.at Add test for colored file upgrade/reinstall 2022-04-25 12:54:12 +03:00
rpmgeneral.at Add parsed and expanded spec to src.rpm header (#1241) 2022-05-09 14:03:03 +02:00
rpmi.at Add a test-case for cross-directory hardlinks 2022-02-16 10:57:18 +02:00
rpmio.at Merge RPMDB_CLEAR into RPMDB_INIT, they're never used separately 2020-06-12 13:18:56 +03:00
rpmmacro.at Use rpmuncompress to handle %{uncompress:...} 2022-04-04 10:04:25 +03:00
rpmorder.at Merge RPMDB_CLEAR into RPMDB_INIT, they're never used separately 2020-06-12 13:18:56 +03:00
rpmpgp.at Add test for OpenPGP packet parsing bug 2021-11-01 13:39:11 +02:00
rpmpgpcheck.c Fix the OpenPGP parser tests 2022-03-31 09:37:47 +03:00
rpmpython.at Drop the klunky and ugly rpm.fi python binding finally 2022-04-08 13:16:50 +03:00
rpmquery.at Add a testcase for --dump query 2022-02-11 15:09:08 +02:00
rpmreplace.at Make Lua a hard requirement for rpm 2021-02-09 13:57:27 +02:00
rpmscript.at Make Lua a hard requirement for rpm 2021-02-09 13:57:27 +02:00
rpmsigdig.at Test that signatures made by bad subkeys are rejected 2022-04-29 14:36:44 +03:00
rpmspec.at Fix %setup and %patch not getting expanded in rpmspec --parse output 2022-05-05 10:59:16 +03:00
rpmtests.at Fix the OpenPGP parser tests 2022-03-31 09:37:47 +03:00
rpmvercmp.at Make Lua a hard requirement for rpm 2021-02-09 13:57:27 +02:00
rpmverify.at Reimplement --restore as a transaction element, obsolete --setperms & co 2022-02-03 13:47:28 +02:00
rpmvfylevel.at Remove now redundant TOPDIR removals from tests 2020-06-12 13:18:56 +03:00

README.md

To run these tests, you need at least these dependencies on the host:

  1. fakechroot
  2. gdb
  3. gnupg >= 2.0

Then run the command

make check

The number of tests performed depends on features enabled at configure time, at least --with-/--without-lua and --enable-/--disable-python. See also the INSTALL file for more information.

To run single tests, you can run the commands:

make populate_testing && ./rpmtests $NNN $MMM ...

where NNN and MMM are the numbers of the tests to be run.

To get the list of available tests, use the command:

  ./rpmtests -l

You can also select tests by keywords used in their description by using the command:

 ./rpmtests -k $KEYWORD

Use multiple -k parameters to have tests with different keywords run. Use -k $KEYWORD1,$KEYWORD2 to execute tests matching both KEYWORD1 and KEYWORD2.

See the output of the command:

./rpmtests --help

for more options. But be aware some (like -j) need not work properly with the test suite unless a very restricted set of test is run.