/
Makefile.expect
41 lines (37 loc) · 1.7 KB
/
Makefile.expect
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
#**************************************************************************
#* *
#* OCaml *
#* *
#* Jeremie Dimino, Jane Street Europe *
#* *
#* Copyright 2016 Jane Street Group LLC *
#* *
#* All rights reserved. This file is distributed under the terms of *
#* the GNU Lesser General Public License version 2.1, with the *
#* special exception on linking described in the file LICENSE. *
#* *
#**************************************************************************
.PHONY: default
default:
@for file in *.ml; do \
printf " ... testing '$$file':"; \
TERM=dumb $(EXPECT_TEST) $(EXPECT_FLAGS) -repo-root $(OTOPDIR) $$file && \
TERM=dumb $(EXPECT_TEST) $(EXPECT_FLAGS) -repo-root $(OTOPDIR) -principal \
$$file.corrected && \
mv $$file.corrected.corrected $$file.corrected && \
$(DIFF) $$file $$file.corrected && \
echo " => passed" || echo " => failed"; \
done
# Builds everything needed to run an expect test
.PHONY: deps
deps:
@$(MAKE) -C $(OTOPDIR) coldstart ocaml ocamlc
@$(MAKE) -C $(OTOPDIR)/testsuite/tools expect_test$(EXE)
.PHONY: promote
promote:
@for file in *.corrected; do \
cp $$file `basename $$file .corrected`; \
done
.PHONY: clean
clean: defaultclean
@rm -f *.corrected