source: project/release/4/spock/stuff/Makefile @ 22992

Last change on this file since 22992 was 22992, checked in by felix winkelmann, 10 years ago

uses jsmin egg; bugfixes

File size: 1.6 KB
Line 
1##### Makefile for SPOCK tests
2
3
4# use v8, if you can (rhino will die, for example)
5JS = js
6SPOCK = chicken-spock
7TIME = /usr/bin/time --quiet -f '%U+%S'
8JSMIN = csi -R utils -R jsmin -p "(jsmin-string (read-all))"
9SPOCK_OPTIONS = -optimize
10SPOCK_DIR = `csi -p "(repository-path)"`/spock
11
12.PHONY: check checkprograms checklibrary
13
14
15check: checklibrary checkprograms
16
17checklibrary: test.scm
18        @echo "======================================== library tests (debug)"
19        @$(SPOCK) $(SPOCK_OPTIONS) -debug test.scm library-tests.scm test-end.scm \
20          -o tests/library-test-debug.js
21        @$(TIME) $(JS) -f $(SPOCK_DIR)/spock-runtime-debug.js -f tests/library-test-debug.js
22        @echo "======================================== library tests (debug + strict)"
23        @$(SPOCK) $(SPOCK_OPTIONS) -debug -strict test.scm library-tests.scm test-end.scm \
24          -o tests/library-test-strict.js
25        @$(TIME) $(JS) -f $(SPOCK_DIR)/spock-runtime-debug.js -f tests/library-test-strict.js
26        @echo "======================================== library tests (default)"
27        @$(SPOCK) $(SPOCK_OPTIONS) test.scm library-tests.scm test-end.scm \
28          -o tests/library-test.js
29        @$(TIME) $(JS) -f $(SPOCK_DIR)/spock-runtime.js -f tests/library-test.js
30
31checkprograms: test.scm
32        @for x in `ls tests/*.scm`; do \
33          tests/runtest.sh $(SPOCK) $$x $(SPOCK_OPTIONS) -debug \
34            -o tests/`basename $$x .scm`.js || exit 1; \
35          $(TIME) $(JS) -f $(SPOCK_DIR)/spock-runtime-debug.js \
36            -f tests/`basename $$x .scm`.js || exit 1; \
37        done
38
39minify-tests:
40        rm -f tmp.js
41        for x in `ls tests/*.js`; do \
42          $(JSMIN) <$$x >tmp.js; \
43          mv tmp.js $$x; \
44        done
45        rm -f tmp.js
Note: See TracBrowser for help on using the repository browser.