forked from broadinstitute/palantir-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (25 loc) · 984 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
TEST_JSON= $(shell find test -name '*.json')
VALIDATE_WDL= $(shell find . -name '*.wdl' ! -path './test/*')
TEST=java -jar $(CROMWELL_JAR) run
VALIDATE=java -jar $(WOMTOOL_JAR) validate
all-tests := $(addsuffix .test, $(TEST_JSON))
all-validations := $(addsuffix .validate, $(VALIDATE_WDL))
all-validations-with-json := $(addsuffix .validate, $(TEST_JSON))
.PHONY: all
all: test validate
.PHONY: test
test: $(all-tests)
.PHONY: validate
validate: $(all-validations)
.PHONY: validate-with-json
validate-with-json: $(all-validations-with-json)
.PHONY: %.wdl.validate
%.wdl.validate:
$(VALIDATE) $(basename $@)
.PHONY: %.json.test
%.json.test:
mkdir -p logs
$(TEST) $(subst _json/,.wdl, $(dir $(basename $@))) -i $(basename $@) -o test_options.json 2>&1 | tee logs/$(notdir $(subst _json/,.wdl, $(dir $(basename $@))))_with_$(notdir $(basename $@)).log
.PHONY: %.json.validate
%.json.validate:
$(VALIDATE) $(subst _json/,.wdl, $(dir $(basename $@))) -i $(basename $@)