added test for one module
This commit is contained in:
parent
873e88eefd
commit
0c76c85d8f
1 changed files with 20 additions and 12 deletions
32
Makefile
32
Makefile
|
@ -7,22 +7,30 @@ BEAMDIR=./ebin
|
||||||
all: compile erlang_js
|
all: compile erlang_js
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
@ mkdir -p $(BEAMDIR) ;
|
mkdir -p $(BEAMDIR) ;
|
||||||
@ $(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(SRCDIR)/*.erl ;
|
$(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(SRCDIR)/*.erl ;
|
||||||
|
|
||||||
erlang_js:
|
erlang_js:
|
||||||
$(MAKE) -C erlang_js/
|
$(MAKE) -C erlang_js/ ;
|
||||||
|
|
||||||
test: compile erlang_js
|
test:
|
||||||
@ mkdir -p $(BEAMDIR) ;
|
echo "==> test $(MOD)" ;
|
||||||
@ $(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(TESTDIR)/*.erl ;
|
mkdir -p $(BEAMDIR) ;
|
||||||
@ cd $(BEAMDIR) ; erl -noinput -eval 'eunit:test({dir, "."}, [verbose]), init:stop()' ;
|
ifeq ($(strip $(MOD)),)
|
||||||
|
$(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(TESTDIR)/*.erl ;
|
||||||
|
cd $(BEAMDIR) ; erl -noinput -eval 'eunit:test({dir, "."}, [verbose]), init:stop()' ;
|
||||||
|
else
|
||||||
|
$(ERLC) $(ERLCFLAGS) $(BEAMDIR) $(TESTDIR)/$(MOD)_test.erl ;
|
||||||
|
cd $(BEAMDIR) ; erl -noinput -eval 'eunit:test($(MOD)_test, [verbose]), init:stop()' ;
|
||||||
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@ rm -rf $(BEAMDIR)/*.beam ;
|
rm -rf $(BEAMDIR)/*.beam ;
|
||||||
@ rm -rf erl_crush.dump ;
|
rm -rf erl_crush.dump ;
|
||||||
@ echo "==> clean ggs" ;
|
echo "==> clean ggs" ;
|
||||||
@ $(MAKE) -C erlang_js/ clean
|
$(MAKE) -C erlang_js/ clean
|
||||||
|
|
||||||
run:
|
run:
|
||||||
@ erl -sname ggs -mnesia -boot start_sasl -pa erlang_js/ebin/ -pa ebin -pa src -s start_ggs
|
erl -sname ggs -mnesia -boot start_sasl -pa erlang_js/ebin/ -pa ebin -pa src -s start_ggs
|
||||||
|
|
||||||
|
|
Reference in a new issue