Skip to content

Commit 283da31

Browse files
committed
ci: tmpdir in checkout dir
Signed-off-by: Dr. Jan-Philip Gehrcke <[email protected]>
1 parent 181f0c6 commit 283da31

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/bats/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ endif
5656
BATS_IMAGE = batstests:$(GIT_COMMIT_SHORT)
5757
KUBECONFIG ?= $(HOME)/.kube/config
5858

59-
# Add `docker run` arguments when not running
60-
# in Github Actions / GitLab CI.
59+
60+
TMPDIR ?= "/tmp"
61+
62+
# Add `docker run` arguments when not running in Github Actions / GitLab CI. Set
63+
# TMPDIR to checkout directory (easier for runner setup).
6164
DOCKER_RUN_FLAGS :=
6265
ifeq ($(CI),)
66+
TMPDIR = "."
6367
DOCKER_RUN_FLAGS += -it
6468
endif
6569

@@ -82,7 +86,7 @@ image:
8286
.PHONY: tests
8387
tests: image
8488
echo "KUBECONFIG: $(KUBECONFIG)" && \
85-
export _RUNDIR=$${TMPDIR:=/tmp}/k8s-dra-driver-gpu-tests-out/bats-tests-$$(date +%s) && \
89+
export _RUNDIR=$(TMPDIR)/k8s-dra-driver-gpu-tests-out/bats-tests-$$(date +%s) && \
8690
mkdir -p "$${_RUNDIR}" && stat "$${_RUNDIR}" && \
8791
docker run \
8892
--rm \

0 commit comments

Comments
 (0)