-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
166 lines (133 loc) · 5.93 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
############################################################################
# Liquidity #
# #
# Copyright (C) 2017-2020 OCamlPro SAS #
# #
# Authors: Fabrice Le Fessant #
# Alain Mebsout #
# David Declerck #
# Steven De Oliveira #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
############################################################################
all: build
clone-dune-network:
git submodule update --init
_obuild/liquidity/liquidity.asm: _obuild
ocp-build build liquidity
_obuild/liquidity-mini/liquidity-mini.asm: _obuild
ocp-build build liquidity-mini
_obuild/liquidity-client/liquidity-client.asm: _obuild
ocp-build build liquidity-client
liquidity-client: _obuild/liquidity-client/liquidity-client.asm
cp -f _obuild/liquidity-client/liquidity-client.asm liquidity-client
liquidity-mini: _obuild/liquidity-mini/liquidity-mini.asm
cp -f _obuild/liquidity-mini/liquidity-mini.asm liquidity-mini
liquidity: _obuild/liquidity/liquidity.asm
cp -f _obuild/liquidity/liquidity.asm liquidity
client: liquidity-client
mini: liquidity-mini
build: liquidity liquidity-mini liquidity-client
install: _obuild
ocp-build install liquidity
_obuild: Makefile
ocp-build init
clean-tests:
$(MAKE) -C tests clean
clean-sources:
rm -f tools/*/*~ libs/*/*~
clean: _obuild clean-tests clean-sources
ocp-build clean
rm -f liquidity
_opam:
opam switch create . 4.07.1 --no-install
eval $$(opam env)
build-deps: _opam
opam install . --deps-only --working-dir -y
distclean: clean
rm -rf _obuild
doc:
$(MAKE) -C docs/sphinx/
headers:
headache -h misc/header -c misc/headache_config \
Makefile build.ocp2 \
scripts/*.sh travis-scripts/*.sh \
tools/liquidity/build.ocp2 \
tools/liquidity/*.ml[ily] \
tools/liquidity/*.ml \
tools/liquidity/with*-dune-network/*.ml[ily] \
tools/liquidity/with*-dune-network/*.ml \
tools/liquidity/reason/liquidReasonParse.ml \
libs/*/build.ocp2 \
libs/*/*.ml[ily] \
libs/*/*.ml \
libs/*/*/*.ml
# All of these tests must be run with with_dune_network=true
NTESTS=43
NREVTESTS=10
SIMPLE_TESTS=$(shell seq -f 'test%.0f.liq' 0 $(NTESTS))
MORE_TESTS=test_ifcons test_if test_loop test_option test_transfer test_call test_left \
test_extfun test_left_constr test_closure test_closure2 test_closure3 \
test_map test_rev test_reduce_closure test_map_closure test_mapreduce_closure \
test_mapmap_closure test_setreduce_closure test_left_match test_loop_left \
test_fold test_iter test_big_map test_map_fold_closure test_inline test_rec_fun \
bug_annot0 inline_fail bug_annot1 test_infer_unpack test_infer_param test_record \
bug187 test_modules lambda_const votes bug_197 curry bug_210 bug_213 \
bug_214 bug_216 bug_steven1 bug_steven2 bug_inline2
RE_TESTS=bug202
OTHER_TESTS=others/broker others/demo others/auction others/multisig others/alias others/game others/mist_wallet_current others/token others/token_vote others/token_no_fee others/new_token
DOC_TESTS=$(shell cd tests; find doc -regex "[^\.]+.liq" | sort -V)
REV_TESTS=$(shell find tests/reverse -regex "[^\.]+.tz" | sort -V)
NEW_DUNE_TESTS=fail weather_insurance
FAILING_DUNE_TESTS=originator
DUNE_TESTS=$(shell find dune-network/src/bin_client/test/contracts -regex "[^\.]+.tz" \
! -path "*concat_hello.tz" \
! -path "*/deprecated/*" \
! -path "*pexec*.tz" \
| sort -V \
| xargs)
TESTS=$(DOC_TESTS) $(SIMPLE_TESTS) $(MORE_TESTS:=.liq) $(RE_TESTS:=.reliq) $(OTHER_TESTS:=.liq)
TODO_LOVE_TESTS=doc/doc76.liq \
test19.liq test_loop_left.liq \
bug_216.liq bug_steven1.liq bug_steven2.liq bug202.reliq \
others/token_vote.liq others/token_no_fee.liq
EXTRA_LOVE_TESTS=test_view.liq
LOVE_TESTS:=$(filter-out $(TODO_LOVE_TESTS) , $(TESTS)) $(EXTRA_LOVE_TESTS)
tests: build
@echo ---------------------
@echo Run full tests
@echo ---------------------
@scripts/run-list.sh scripts/check.sh $(TESTS)
tests-love: build
@echo ---------------------
@echo Run Love tests
@echo ---------------------
@scripts/run-list.sh scripts/check_love.sh $(LOVE_TESTS)
tests-love-fail: build
@echo ---------------------
@echo Run Love tests with known failing tests
@echo ---------------------
@scripts/run-list.sh scripts/check_love.sh $(TODO_LOVE_TESTS)
tests-mini: mini
@echo ---------------------
@echo Run mini tests
@echo ---------------------
@scripts/run-list.sh scripts/check-mini.sh $(TESTS)
RTESTS=$(REV_TESTS) $(DUNE_TESTS)
rev-tests: build
@echo ---------------------
@echo Run reverse tests
@echo ---------------------
@scripts/run-list.sh scripts/check-rev.sh $(RTESTS)
all-tests: tests tests-mini rev-tests tests-love