Skip to content

Commit

Permalink
Set TESTING_FS_ROOT for unit tests
Browse files Browse the repository at this point in the history
This is needs by some of the templating tests which render out package
config directories

Signed-off-by: James Casey <james@chef.io>
  • Loading branch information
James Casey committed Jan 23, 2019
1 parent fa37d5f commit ab5737a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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))))
Expand Down
3 changes: 0 additions & 3 deletions support/ci/rust_tests.sh
Original file line number Diff line number Diff line change
@@ -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=$?

Expand Down

0 comments on commit ab5737a

Please sign in to comment.