Skip to content

Commit 6676167

Browse files
committed
FIXUP: Make dir idempotent
1 parent a275828 commit 6676167

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
LARGE_TEST_REPO_DIR ?= tests/test_docs_large
1+
LARGE_TEST_REPO_DIR ?= tests/test_docs_large/
22

33
GIT_DESC := $(shell git describe --always 2>/dev/null || echo "unknown")
44

55
JUNIT_FLAGS := --capture=sys -o junit_logging=all
66
TEST_GROUP_COUNT ?= 1
77
TEST_GROUP ?= 1
88
TEST_GROUP_RANDOM_SEED ?= 999999999
9-
RESULTS_DIR ?= tests/results
9+
RESULTS_DIR ?= tests/results/
1010

1111
.PHONY: lint ruff ty fix large-tests-list large-tests-requirements large-tests
1212

@@ -25,8 +25,10 @@ $(RESULTS_DIR):
2525
mkdir -p $(RESULTS_DIR)
2626

2727
$(LARGE_TEST_REPO_DIR): large-tests-requirements
28-
git clone --depth 1 https://github.com/freedomofpress/dangerzone-test-set.git $(LARGE_TEST_REPO_DIR)
29-
cd $(LARGE_TEST_REPO_DIR) && git lfs pull
28+
@if [ ! -d "$(LARGE_TEST_REPO_DIR)" ]; then \
29+
git clone --depth 1 https://github.com/freedomofpress/dangerzone-test-set.git $(LARGE_TEST_REPO_DIR); \
30+
fi
31+
git -C $(LARGE_TEST_REPO_DIR) lfs pull
3032

3133
large-tests-list: $(LARGE_TEST_REPO_DIR)
3234
@echo "=== Test cases in group $(TEST_GROUP) of $(TEST_GROUP_COUNT) ==="

0 commit comments

Comments
 (0)