Mercurial > urweb
comparison Makefile.am @ 2246:4769b27aa436
Merge.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Sun, 02 Aug 2015 18:26:44 -0700 |
parents | 728aaeea12fd |
children | 7dfce558aca2 |
comparison
equal
deleted
inserted
replaced
2245:27899da8780b | 2246:4769b27aa436 |
---|---|
13 | 13 |
14 all-local: smlnj mlton | 14 all-local: smlnj mlton |
15 | 15 |
16 SUBDIRS = src/c | 16 SUBDIRS = src/c |
17 | 17 |
18 .PHONY: smlnj mlton package reauto | 18 .PHONY: smlnj mlton package reauto test |
19 | 19 |
20 smlnj: src/urweb.cm xml/entities.sml | 20 smlnj: src/urweb.cm xml/entities.sml |
21 mlton: bin/urweb | 21 mlton: bin/urweb |
22 | 22 |
23 clean-local: | 23 clean-local: |
112 ./autogen.sh | 112 ./autogen.sh |
113 | 113 |
114 EXTRA_DIST = demo doc lib/js lib/ur xml \ | 114 EXTRA_DIST = demo doc lib/js lib/ur xml \ |
115 src/coq src/*.sig src/*.sml src/*.mlb src/config.sml.in src/elisp src/*.cm src/sources src/*.grm src/*.lex \ | 115 src/coq src/*.sig src/*.sml src/*.mlb src/config.sml.in src/elisp src/*.cm src/sources src/*.grm src/*.lex \ |
116 CHANGELOG LICENSE urweb.ebuild include/urweb/*.h bin | 116 CHANGELOG LICENSE urweb.ebuild include/urweb/*.h bin |
117 | |
118 TESTDB = /tmp/urweb.db | |
119 TESTPID = /tmp/urweb.pid | |
120 | |
121 test: | |
122 urweb -dbms sqlite -db $(TESTDB) -demo /Demo demo | |
123 rm -f $(TESTDB) | |
124 sqlite3 $(TESTDB) < demo/demo.sql | |
125 demo/demo.exe & echo $$! > $(TESTPID) | |
126 sleep 1 | |
127 (curl -s 'http://localhost:8080/Demo/Hello/main' | diff tests/hello.html -) || (kill `cat $(TESTPID)`; echo "Test 'Hello' failed"; /bin/false) | |
128 (curl -s 'http://localhost:8080/Demo/Crud1/create?A=1&B=2&C=3&D=4' | diff tests/crud1.html -) || (kill `cat $(TESTPID)`; echo "Test 'Crud1' failed"; /bin/false) | |
129 kill `cat $(TESTPID)` | |
130 echo Tests succeeded. |