Add unit-test to master Makefile.
And add unit-test to test-target. Also fetch the paths to browsers that are going to be used in testing from the browser_manifest.json.
This commit is contained in:
parent
1a119bcb08
commit
27ba65dc6f
13
Makefile
13
Makefile
@ -43,7 +43,10 @@ PDF_JS_FILES = \
|
||||
server:
|
||||
@cd test; python test.py --port=8888;
|
||||
|
||||
test: shell-test browser-test
|
||||
# make test
|
||||
#
|
||||
# This target runs all the tests. This can be used for testing all browsers.
|
||||
test: unit-test shell-test browser-test
|
||||
|
||||
#
|
||||
# Create production output (pdf.js, and corresponding changes to web files)
|
||||
@ -68,6 +71,14 @@ bundle: | $(BUILD_DIR)
|
||||
rm -f *.tmp; \
|
||||
cd ..
|
||||
|
||||
# make unit-test
|
||||
#
|
||||
# This target runs in-browser unit tests with js-test-driver and jasmine unit
|
||||
# test framework.
|
||||
|
||||
unit-test:
|
||||
@cd test/unit/ ; make ;
|
||||
|
||||
# make browser-test
|
||||
#
|
||||
# This target runs in-browser tests using two primary arguments: a
|
||||
|
@ -1,7 +1,20 @@
|
||||
PROG=java -Xms512m -Xmx1024m -jar ../../external/jsTestDriver/JsTestDriver-1.3.3d.jar --reset --port 4224 --browser firefox --tests all --testOutput ./test_reports/
|
||||
# Fetch the paths to browsers that are going to be used in testing.
|
||||
MANIFEST=../resources/browser_manifests/browser_manifest.json
|
||||
BROWSERS=$(shell echo `sed -n 's/.*"path":\(.*\)/\1,/p' $(MANIFEST) | tr -d '\n'`)
|
||||
|
||||
# Command to invoke the unit test.
|
||||
PROG=java \
|
||||
-Xms512m \
|
||||
-Xmx1024m \
|
||||
-jar ../../external/jsTestDriver/JsTestDriver-1.3.3d.jar \
|
||||
--reset \
|
||||
--port 4224 \
|
||||
--browser $(BROWSERS) \
|
||||
--tests all \
|
||||
--testOutput ./test_reports/
|
||||
|
||||
test:
|
||||
$(PROG) ; \
|
||||
$(PROG)
|
||||
|
||||
.phony:: test
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user