rpm-ostree/tests/vmcheck/sync.sh
Colin Walters e666a5b350 vmcheck: Support VMCHECK_INSTTREE
I need to build ostree from git too.  So now my workflow is:

```
export insttree=/srv/walters/tmp/rootfs
cd ostree
make && make install DESTDIR=${insttree}
cd rpm-ostree
make && make install DESTDIR=${insttree}
env VMCHECK_INSTTREE=${insttree} make vmoverlay
```

Closes: #705
Approved by: jlebon
2017-03-27 17:48:39 +00:00

34 lines
732 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
if test -z "${INSIDE_VM:-}"; then
# do this in the host
. ${commondir}/libvm.sh
vm_setup
if ! vm_ssh_wait 30; then
echo "ERROR: A running VM is required for 'make vmcheck'."
exit 1
fi
set -x
cd ${topsrcdir}
export VMCHECK_INSTTREE=${VMCHECK_INSTTREE:-$(pwd)/insttree}
make install DESTDIR=${VMCHECK_INSTTREE}
vm_rsync
$SSH "env INSIDE_VM=1 /var/roothome/sync/tests/vmcheck/sync.sh"
exit 0
else
# then do this in the VM
set -x
ostree admin unlock || :
rsync -rlv /var/roothome/sync/insttree/usr/ /usr/
restorecon -v /usr/bin/rpm-ostree
restorecon -v /usr/libexec/rpm-ostreed
systemctl restart rpm-ostreed
fi