-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
67 lines (50 loc) · 1.98 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
MAKEFILE_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
include $(MAKEFILE_DIR)/standard_defs.mk
export TEST_SPEC ?= --exclude ConfigManagementServiceIT:CMSetAndGetTimeModel
$(MARKERS): test-dars
test-dars:
mkdir -p test-dars
build: $(MARKERS)/build_mvn $(MARKERS)/build_ledgertest
$(MARKERS)/build_ledgertest: $(MARKERS)
docker build -f docker/ledger-api-testtool.docker -t ledger-api-testtool:$(ISOLATION_ID) . ;
docker run --rm -v `pwd`/test-dars:/out \
ledger-api-testtool:$(ISOLATION_ID) bash \
-c "java -jar ledger-api-test-tool.jar -x && cp *.dar /out"
touch $@
package: $(MARKERS)/package_mvn $(MARKERS)/package_docker
$(MARKERS)/package_docker:
docker-compose -f docker-compose-installed.yaml build
touch $@
test: test_mvn test_integration
.PHONY: test_mvn
test_mvn:
$(DOCKER_MVN) test
.PHONY: test_integration
test_integration: package
docker-compose -p $(ISOLATION_ID) -f docker/daml-test.yaml down \
-v || true
docker-compose -p $(ISOLATION_ID) -f docker/daml-test.yaml up \
--exit-code-from ledger-api-testtool || true
docker-compose -p $(ISOLATION_ID) -f docker/daml-test.yaml logs \
ledger-api-testtool > build/results.txt 2>&1
./run_tests ./build/results.txt PUBLIC > build/daml-test.results
docker-compose -p $(ISOLATION_ID) -f docker/daml-test.yaml down \
|| true
.PHONY: clean_test_integration
clean_test_integration:
docker-compose -p $(ISOLATION_ID) -f docker/daml-test.yaml \
rm -f || true
docker-compose -p $(ISOLATION_ID) -f docker/daml-test.yaml down \
-v || true
analyze: analyze_sonar_mvn
clean: clean_mvn clean_containers clean_test_integration
.PHONY: clean_containers
clean_containers:
docker-compose -f docker/docker-compose-build.yaml rm -f || true
docker-compose -f docker/docker-compose-build.yaml down -v || true
distclean: clean_docker
.PHONY: clean_docker
clean_docker:
docker-compose -f docker/docker-compose-build.yaml rm -f || true
docker-compose -f docker/docker-compose-build.yaml down -v --rmi all|| true
publish: $(MARKERS)/publish_mvn