forked from adaptlearning/adapt_authoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (35 loc) · 921 Bytes
/
Makefile
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
42
43
44
#OS detect and setup
ifdef SystemRoot
#RM = del /Q
FixPath = $(subst /,\,$1)
TESTDIRS = $(shell .\win_find.bat .\plugins)
NODEENV = Set NODE_ENV=test
else
ifeq ($(shell uname), Linux)
RM = rm -f
FixPath = $1
NODEENV = @NODE_ENV=test
TESTDIRS= $(shell find plugins -maxdepth 3 -name test -type d -exec find {} -maxdepth 1 -name "*.js" -o -name '*.coffee' \;)
endif
endif
MOCHA_OPTS=
REPORTER = dot
test: test-core test-plugins
#test: test-plugins
test-core:
@echo "Running Core Tests:"
$(NODEENV) && $(call FixPath,"./node_modules/.bin/mocha") \
--reporter $(REPORTER) \
$(MOCHA_OPTS)
test-plugins:
ifneq ("$(TESTDIRS)", "")
@echo "Running Plugin Tests:"
$(NODEENV) && $(call FixPath,"./node_modules/.bin/mocha") \
$(TESTDIRS) \
--reporter $(REPORTER) \
$(MOCHA_OPTS)
endif
.PHONY: test test-core test-plugins
#for /r %%F in (*) do (
# echo %%~fF
#)