forked from rpm-software-management/mock
-
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.
Test that mockchain works, with tmpfs plugin ON (keep_mounted=True), nocache plugin ON, and dynamic buildrequires package. Relates: rpm-software-management#482, rpm-software-management#512, rpm-software-management#479
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
if test -z "$TESTDIR"; then | ||
TESTDIR=$(dirname "$(readlink -f "$0")") | ||
fi | ||
|
||
. ${TESTDIR}/functions | ||
|
||
: "${MOCKCMD=mock}" | ||
: "${MOCKCHAIN=mockchain}" | ||
|
||
header "online mockchain, tmpfs.keep_mounted=True, nosync and one package having generated BuildRequires" | ||
|
||
test "$(rpm -qa nosync | wc -l)" -eq 2 || die "nosync.x86_64 and nosync.i686 needs to be installed" | ||
|
||
confdir=$HOME/.config | ||
mkdir -p "$confdir" | ||
local_config=$confdir/mock.cfg | ||
|
||
# cleanup potentially mounted stuff we'll overmount by tmpfs | ||
runcmd "$MOCKCMD --scrub=chroot" | ||
runcmd "$MOCKCMD --scrub=bootstrap" | ||
|
||
test -f "$local_config" && die "please remove $local_config first" | ||
|
||
cat > "$local_config" <<EOF | ||
config_opts['plugin_conf']['tmpfs_enable'] = True | ||
config_opts['plugin_conf']['tmpfs_opts']['keep_mounted'] = True | ||
config_opts['nosync'] = True | ||
EOF | ||
cleanup() { | ||
rm "$local_config" | ||
} | ||
trap cleanup EXIT | ||
|
||
packages=" | ||
https://github.com/rpm-software-management/mock-test-data/raw/master/python-copr-999-1.src.rpm | ||
https://github.com/rpm-software-management/mock-test-data/raw/master/dep-on-python-copr-999-1-0.src.rpm | ||
" | ||
|
||
eval 'set -- $packages' | ||
runcmd "$MOCKCHAIN $*" || die "mockchain build failed" |