Skip to content

Commit

Permalink
Generate rpmtests.at automatically to avoid redundant book-keeping
Browse files Browse the repository at this point in the history
We have the list of tests in cmake, we can just as well generate the
master rpmtests.at file from there.

As the order of tests now depends on the list in tests/CMakeLists.txt,
update it to match the former order in rpmtests.at. As arbitrary as
that order is, people seem to get attached to certain test numbers. Er.
  • Loading branch information
pmatilai committed Feb 19, 2024
1 parent 3db1229 commit 19f4cfd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 43 deletions.
38 changes: 21 additions & 17 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,39 @@ endif()
set(HAVE_UNSHARE ${HAVE_UNSHARE})

set(TESTSUITE_AT
rpmtests.at
rpmpgp.at
rpmgeneral.at
rpmvercmp.at
rpmmacro.at
rpmdevel.at
rpmpython.at
rpmdepmatch.at
rpmquery.at
rpmspec.at
rpmvfylevel.at
rpmsigdig.at
rpmio.at
rpmverify.at
rpmdb.at
rpmbuild.at
rpmbuildid.at
rpmi.at
rpme.at
rpmvercmp.at
rpmorder.at
rpmbuild.at
rpmbuildid.at
rpmscript.at
rpmdeps.at
rpmconflict.at
rpmreplace.at
rpmconfig.at
rpmconfig2.at
rpmconfig3.at
rpmreplace.at
rpmmacro.at
rpmpython.at
rpmdepmatch.at
rpmscript.at
rpmsigdig.at
rpmspec.at
rpmio.at
rpmorder.at
rpmvfylevel.at
rpmpgp.at
rpmdevel.at
)

FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/rpmtests.at)
foreach(at ${TESTSUITE_AT})
FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/rpmtests.at "m4_include([${at}])\n")
endforeach()

set(TESTPROGS rpmpgpcheck rpmpgppubkeyfingerprint)
foreach(prg ${TESTPROGS})
add_executable(${prg} EXCLUDE_FROM_ALL ${prg}.c)
Expand Down Expand Up @@ -110,7 +114,7 @@ if (MKTREE_NATIVE)
add_custom_command(OUTPUT rpmtests
COMMAND ${AUTOTEST} -I ${CMAKE_CURRENT_SOURCE_DIR}
-o rpmtests rpmtests.at
DEPENDS ${TESTSUITE_AT}
DEPENDS ${TESTSUITE_AT} rpmtests.at
DEPENDS local.at
)

Expand Down
26 changes: 0 additions & 26 deletions tests/rpmtests.at

This file was deleted.

0 comments on commit 19f4cfd

Please sign in to comment.