Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile-daemon.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
dbus_built_sources = rpm-ostreed-generated.h rpm-ostreed-generated.c

# TODO: Add --c-generate-autocleanup=all once we depend on GLib 2.50+
# https://github.com/projectatomic/rpm-ostree/pull/705
rpm-ostreed-generated.h: rpm-ostreed-generated.c
rpm-ostreed-generated.c: Makefile.am $(top_srcdir)/src/daemon/org.projectatomic.rpmostree1.xml
rpm-ostreed-generated.c: Makefile $(top_srcdir)/src/daemon/org.projectatomic.rpmostree1.xml
$(AM_V_GEN) gdbus-codegen \
--interface-prefix org.projectatomic.rpmostree1 \
--c-namespace RPMOSTree \
Expand All @@ -12,6 +14,7 @@ rpm-ostreed-generated.c: Makefile.am $(top_srcdir)/src/daemon/org.projectatomic.
$(NULL)
BUILT_SOURCES += $(dbus_built_sources)
CLEANFILES += rpm-ostreed-generated-org.projectatomic.rpmostree1.OS.xml \
rpm-ostreed-generated-org.projectatomic.rpmostree1.OSExperimental.xml \
rpm-ostreed-generated-org.projectatomic.rpmostree1.Sysroot.xml \
rpm-ostreed-generated-org.projectatomic.rpmostree1.Transaction.xml \
$(NULL)
Expand Down
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
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(And now if one wants to build with e.g. asan, install it into the insttree too)

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 ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update the rm -rf in Makefile-tests.am.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a fixup to add the VMCHECK_INSTTREE stuff to this one, but i removed the rm -rf for now since handling the logic correctly would need to check if it was set or not...and anyways we want to nuke all of this logic later with livefs + rpm installs or so.


vm_rsync

Expand Down
4 changes: 2 additions & 2 deletions tests/vmcheck/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down