Skip to content

Commit

Permalink
vmcheck: Support VMCHECK_INSTTREE
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
cgwalters committed Mar 24, 2017
1 parent f625e37 commit 14e0c9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 4 additions & 0 deletions tests/common/libvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
17 changes: 7 additions & 10 deletions tests/vmcheck/overlay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 14e0c9c

Please sign in to comment.