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
This commit is contained in:
parent
fa0af8b317
commit
e666a5b350
@ -45,6 +45,10 @@ vm_rsync() {
|
||||
fi
|
||||
rsync -az --no-owner --no-group -e "$rsyncopts" \
|
||||
--exclude .git/ . $VM:/var/roothome/sync
|
||||
if test -n "${VMCHECK_INSTTREE:-}"; then
|
||||
rsync -az --no-owner --no-group -e "$rsyncopts" \
|
||||
${VMCHECK_INSTTREE}/ $VM:/var/roothome/sync/insttree/
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
}
|
||||
|
@ -15,21 +15,18 @@ if test -z "${INSIDE_VM:-}"; then
|
||||
|
||||
cd ${topsrcdir}
|
||||
|
||||
# Support local development with e.g. an ostree built from git too,
|
||||
# or libasan.
|
||||
export VMCHECK_INSTTREE=${VMCHECK_INSTTREE:-$(pwd)/insttree}
|
||||
|
||||
# Use a lock in case we're called in parallel (make install might fail).
|
||||
# Plus, we can just share the same install tree, and sharing is caring!
|
||||
flock insttree.lock sh -ec \
|
||||
'[ ! -d insttree ] || exit 0
|
||||
DESTDIR=$(pwd)/insttree
|
||||
'[ ! -d ${VMCHECK_INSTTREE} ] || exit 0
|
||||
DESTDIR=${VMCHECK_INSTTREE}
|
||||
make install DESTDIR=${DESTDIR}
|
||||
for san in a t ub; do
|
||||
if eu-readelf -d ${DESTDIR}/usr/bin/rpm-ostree | \
|
||||
grep -q \"NEEDED.*lib${san}san\"; then
|
||||
echo \"Installing extra sanitizier: lib${san}san\"
|
||||
cp /usr/lib64/lib${san}san*.so.* ${DESTDIR}/usr/lib64
|
||||
fi
|
||||
done
|
||||
touch ${DESTDIR}/.completed'
|
||||
[ -f insttree/.completed ]
|
||||
[ -f ${VMCHECK_INSTTREE}/.completed ]
|
||||
|
||||
vm_rsync
|
||||
|
||||
|
@ -15,8 +15,8 @@ if test -z "${INSIDE_VM:-}"; then
|
||||
set -x
|
||||
|
||||
cd ${topsrcdir}
|
||||
rm insttree -rf
|
||||
make install DESTDIR=$(pwd)/insttree
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user