Skip to content

Commit

Permalink
Eliminate the last --define from test-suite run() function
Browse files Browse the repository at this point in the history
The snapshot case always needs a wrapper function of some kind,
so it makes sense to optimize the setup for the non-snapshot case to
allow running commands without any wrappers in the way.

Set the test-suite %_tmppath as per non-snapshot case and move the
last remaining command line --define override to runroot() instead.
This makes run() entirely redundant.

The %_tmppath override in runroot() shouldn't really be necessary but
scriptlet related tests fail without that. I suspect it's related to
/tmp being tmpfs in the test-suite but dunno. It's a mystery for some
other day...
  • Loading branch information
pmatilai committed Nov 18, 2024
1 parent dad2f97 commit d0e22ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/atlocal.in
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ setup_env()

run()
{
"$@" \
--define "_tmppath ${RPMTEST}/tmp"
"$@"
}

rundebug()
Expand All @@ -127,7 +126,8 @@ rundebug()

runroot()
{
snapshot exec "$@"
snapshot exec "$@" \
--define "_tmppath /var/tmp"
}

runroot_other()
Expand Down
1 change: 1 addition & 0 deletions tests/data/macros.testenv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# root's macro config in the test-environment
%_buildhost testhost
%_topdir %{getenv:RPMTEST}/build
%_tmppath %{getenv:RPMTEST}/tmp

0 comments on commit d0e22ba

Please sign in to comment.