From ab5737a005202d64b0abc29b386a99c9448d5030 Mon Sep 17 00:00:00 2001 From: James Casey Date: Wed, 23 Jan 2019 15:11:23 -0800 Subject: [PATCH] Set TESTING_FS_ROOT for unit tests This is needs by some of the templating tests which render out package config directories Signed-off-by: James Casey --- Makefile | 3 ++- support/ci/rust_tests.sh | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 5c9c83be6a2..98badbb1974 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ UNAME_S := $(shell uname -s) HAS_DOCKER := $(shell command -v docker 2> /dev/null) +TESTING_FS_ROOT := $(shell mktemp -d) ifneq (${IN_DOCKER},) IN_DOCKER := ${IN_DOCKER} else ifeq ($(UNAME_S),Darwin) @@ -186,7 +187,7 @@ $(foreach component,$(ALL),$(eval $(call BUILD,$(component)))) define UNIT unit-$1: image ## executes the $1 component's unit test suite - $(run) sh -c 'cd components/$1 && cargo test $(CARGO_FLAGS)' + $(run) sh -c 'cd components/$1 && TESTING_FS_ROOT=$(TESTING_FS_ROOT) cargo test $(CARGO_FLAGS)' .PHONY: unit-$1 endef $(foreach component,$(ALL),$(eval $(call UNIT,$(component)))) diff --git a/support/ci/rust_tests.sh b/support/ci/rust_tests.sh index 34d9156b0e0..0947cb24f67 100755 --- a/support/ci/rust_tests.sh +++ b/support/ci/rust_tests.sh @@ -1,8 +1,5 @@ #!/bin/bash -sudo mkdir -p /hab -sudo chmod o+w /hab - git log HEAD~1..HEAD | grep -q '!!! Temporary Commit !!!' is_tmp_commit=$?