forked from rpm-software-management/rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PoC split test-root setup out of make_install()
- Loading branch information
Showing
5 changed files
with
35 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ case $CMD in | |
build) | ||
source ./mktree.common | ||
make_install / | ||
./setup.sh / | ||
;; | ||
check) | ||
./rpmtests "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash -x | ||
|
||
# Setup the environment inside the test-image | ||
# DESTDIR is only for testing purposes, inside the image it's always / | ||
export DESTDIR=${1:-/} | ||
|
||
mkdir -p $DESTDIR/build | ||
ln -sf ../data/SOURCES $DESTDIR/build/ | ||
|
||
# setup an empty db that all tests are pointed to by default | ||
dbpath="/var/lib/rpm-testsuite" | ||
mkdir -p $DESTDIR/$dbpath | ||
echo "%_dbpath $dbpath" > $DESTDIR/@CMAKE_INSTALL_FULL_SYSCONFDIR@/rpm/macros.db | ||
rpmdb --dbpath $DESTDIR/$dbpath --initdb | ||
|
||
# system-wide config to match our test environment | ||
cp /data/macros.testenv $DESTDIR/@CMAKE_INSTALL_FULL_SYSCONFDIR@/rpm/ | ||
|
||
# gpg-connect-agent is very, very unhappy if this doesn't exist | ||
mkdir -p $DESTDIR/root/.gnupg | ||
chmod 700 $DESTDIR/root/.gnupg | ||
|
||
# set up new-style XDG config directory | ||
mkdir -p $DESTDIR/root/.config/rpm | ||
|