From 38c8040879c2ec0161660984ee4766cb99aa2380 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Mon, 20 Jun 2016 15:44:46 -0400 Subject: [PATCH] vmcheck: clean before building and adapt to new json If the dir that was rsync'ed already contains build artifacts, we don't want those contaminating our build process. Closes: #336 Approved by: cgwalters --- tests/vmcheck/Makefile | 2 +- tests/vmcheck/checkout.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/vmcheck/Makefile b/tests/vmcheck/Makefile index f5267ba1..fb396ac1 100644 --- a/tests/vmcheck/Makefile +++ b/tests/vmcheck/Makefile @@ -11,7 +11,7 @@ buildimg: build: $(BUILDER_RUN) ./autogen.sh --prefix=/usr --libdir=/usr/lib64 - $(BUILDER_RUN) make -j 4 + $(BUILDER_RUN) sh -c 'make clean && make -j 4' install: build sudo sh checkout.sh diff --git a/tests/vmcheck/checkout.sh b/tests/vmcheck/checkout.sh index 3a4bca4f..9e75d2bf 100644 --- a/tests/vmcheck/checkout.sh +++ b/tests/vmcheck/checkout.sh @@ -3,7 +3,9 @@ set -euo pipefail # ugly but simple way of fetching commit we're sitting on commit=$(rpm-ostree status --json | \ - python -c 'import sys, json; print json.load(sys.stdin)[0]["checksum"]') + python -c ' +import sys, json; +print json.load(sys.stdin)["deployments"][0]["checksum"]') if [[ -z $commit ]] || ! ostree rev-parse $commit; then echo "Error while determining current commit" >&2