Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 82 lines (60 sloc) 2.029 kB
7f510c5 @samoht Few makefile tweaks
samoht authored
1 # Make sure to have ocp-get-server running before launchin the tests
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored
2 LOCALHOST ?= 127.0.0.1
3 OPAM_ROOT = /tmp/OPAM.TEST
4 OPAM_SERVER_ROOT = /tmp/OPAM.SERVER.TEST
5cf8b97 @samoht Improve test Makefile
samoht authored
5 BIN = /tmp
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored
6
61f6fd5 @tuong P3 test succeeds.
tuong authored
7 ENV = export OCAMLRUNPARAM=b OPAM_ROOT=$(OPAM_ROOT) PATH=$(BIN):$(PATH) &&
5cf8b97 @samoht Improve test Makefile
samoht authored
8 OCPGET = $(ENV) ocp-get --debug --root $(OPAM_ROOT)
9 OCPGET_SERVER = $(ENV) ocp-get-server --debug --root $(OPAM_SERVER_ROOT)
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored
10
6f58fac @samoht - is not a valid character in version strings
samoht authored
11 PACKAGES = P1-1 P1-2 P2-1 P2-1 P3-1~weird.version P4-1
7f510c5 @samoht Few makefile tweaks
samoht authored
12
13 ARCHIVES = $(PACKAGES:%=packages/%.tar.gz)
5cf8b97 @samoht Improve test Makefile
samoht authored
14
7f510c5 @samoht Few makefile tweaks
samoht authored
15 .PHONY: all upload
16
a802765 @samoht Add a simple remove tests
samoht authored
17 all: fresh init upload list install upload-new upgrade downgrade ocpbuild remove
7f510c5 @samoht Few makefile tweaks
samoht authored
18 @
19
1bcaf57 @samoht New format for user provided files
samoht authored
20 $(BIN)/ocp-get: ../ocp-get
21 cp ../ocp-get $(BIN)/ocp-get
5cf8b97 @samoht Improve test Makefile
samoht authored
22
1bcaf57 @samoht New format for user provided files
samoht authored
23 $(BIN)/ocp-get-server: ../ocp-get-server
24 cp ../ocp-get-server $(BIN)/ocp-get-server
25
a245cc4 @tuong When testing, the "ocp-build" program can be mentioned in any ".spec".
tuong authored
26 $(BIN)/ocp-build: ../_obuild/unixrun
27 echo 'exec $(PWD)/_obuild/unixrun $(PWD)/boot/ocp-build.boot "$$@"' > $(BIN)/ocp-build
28 chmod +x $(BIN)/ocp-build
29
1bcaf57 @samoht New format for user provided files
samoht authored
30 runserver: fresh $(BIN)/ocp-get-server
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored
31 $(OCPGET_SERVER)
32
1bcaf57 @samoht New format for user provided files
samoht authored
33 init: fresh $(BIN)/ocp-get
7f510c5 @samoht Few makefile tweaks
samoht authored
34 $(OCPGET) init $(LOCALHOST)
35
a245cc4 @tuong When testing, the "ocp-build" program can be mentioned in any ".spec".
tuong authored
36 ocpbuild: $(BIN)/ocp-build
37
7f510c5 @samoht Few makefile tweaks
samoht authored
38 upload: $(ARCHIVES) init
5cf8b97 @samoht Improve test Makefile
samoht authored
39 cd packages && $(OCPGET) upload P1
40 cd packages && $(OCPGET) upload P2
41 cd packages && $(OCPGET) upload P3
42 cd packages && $(OCPGET) upload P4
7f510c5 @samoht Few makefile tweaks
samoht authored
43
0acb675 @samoht 'ocp-get list' returns the list of available packages
samoht authored
44 list: upload
45 $(OCPGET) list
7f510c5 @samoht Few makefile tweaks
samoht authored
46
a802765 @samoht Add a simple remove tests
samoht authored
47 remove: upload
48 cd packages && $(OCPGET) install P1
49 cd packages && $(OCPGET) remove P1
50
51 install: remove upload
757fe55 @samoht Add more tests
samoht authored
52 $(OCPGET) install P1
53 $(OCPGET) install P2
a779ca3 @samoht More tests
samoht authored
54 $(OCPGET) install P3
55 $(OCPGET) install P4
56
57 upload-new: install
8afaa59 @samoht Cool new features
samoht authored
58 cd packages && $(OCPGET) upload P1-2.spec
59 cd packages && $(OCPGET) upload P4-2.spec
ba89245 @samoht Add a test for 'patches'. Seems to work.
samoht authored
60 cd packages && $(OCPGET) upload P4-3.spec
a779ca3 @samoht More tests
samoht authored
61
40ddc96 @samoht The upgrade test proposes the good solution, but it fails just after …
samoht authored
62 upgrade: upload-new
0acb675 @samoht 'ocp-get list' returns the list of available packages
samoht authored
63 $(OCPGET) list
a779ca3 @samoht More tests
samoht authored
64 $(OCPGET) upgrade
0acb675 @samoht 'ocp-get list' returns the list of available packages
samoht authored
65 $(OCPGET) list
757fe55 @samoht Add more tests
samoht authored
66
bac61a0 @samoht Version contraints + downgrade works
samoht authored
67 downgrade: upgrade
68 $(OCPGET) install P4-2
69 $(OCPGET) list
70
7e293d3 @tuong Finish the bootstrap (for the case we only consider the library part …
tuong authored
71 ocpget: fresh init ocpbuild
72 cd packages/bootstrap && for i in *spec ; do $(OCPGET) upload $$i ; done
73 $(OCPGET) install ocpget
74
5cf8b97 @samoht Improve test Makefile
samoht authored
75 packages/%.tar.gz: packages/% packages/%/*
7f510c5 @samoht Few makefile tweaks
samoht authored
76 cd packages && tar cz $* > $*.tar.gz
77
78 clean:
79 rm -f $(ARCHIVES)
80
81 fresh:
f8dc221 @samoht Add --root to ocp-get and ocp-get-server to change the default root p…
samoht authored
82 rm -rf $(OPAM_ROOT) $(OPAM_SERVER_ROOT)
Something went wrong with that request. Please try again.