Permalink
Browse files

Copying nitrogen's makefiles and coverage info

  • Loading branch information...
1 parent 67cc5aa commit e26e2c312dbdb4f67bd3e55d3454f05d91073eab @dbravender committed Dec 9, 2009
Showing with 41 additions and 5 deletions.
  1. +2 −0 .gitignore
  2. +3 −0 .gitmodules
  3. +4 −0 Emakefile
  4. +28 −0 Makefile
  5. +1 −0 lib/coverize
  6. +0 −5 make
  7. 0 { → src}/gerl.erl
  8. +3 −0 { → src}/gerl_test.erl
  9. 0 { → src}/simple_gp.erl
View
@@ -1 +1,3 @@
+coverage/*
*.beam
+ebin
View
@@ -0,0 +1,3 @@
+[submodule "lib/coverize"]
+ path = lib/coverize
+ url = git://github.com/mmullis/coverize.git
View
@@ -0,0 +1,4 @@
+{ './src/*', [ debug_info,
+ { i, "./ebin" },
+ { outdir, "./ebin" }
+]}.
View
@@ -0,0 +1,28 @@
+all: compile test
+
+compile:
+ mkdir -p ebin
+ erl -make
+
+clean:
+ rm -rf ./coverage/*.*
+ rm -rf ./ebin/*.*
+ rm -rf ./test/ebin/*.*
+
+test: compile
+ erl -noshell \
+ -pa ebin \
+ -s gerl_test test \
+ -s init stop
+
+coverage: compile
+ git submodule init lib/coverize
+ git submodule update lib/coverize
+ make -C lib/coverize
+ mkdir -p coverage
+ erl -noshell \
+ -pa ebin \
+ -pa test/ebin \
+ -pa lib/coverize/ebin \
+ -s gerl_test run_cover \
+ -s init stop
Submodule coverize added at 860452
View
5 make
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-erlc -pa . *erl
-erlc *test.erl
-erl -s gerl_test test -noshell -s init stop
File renamed without changes.
@@ -18,3 +18,6 @@ update_variable_test() ->
generate_test() ->
random:seed({21015,29080,278}),
?assert({add,[{mul,[{y,[]},{y,[]}]},{sub,[{add,[{x,[]},{x,[]}]},{x,[]}]}]} =:= gerl:generate(simple_gp)).
+
+run_cover() ->
+ coverize:run(["./src"], gerl_test).
File renamed without changes.

0 comments on commit e26e2c3

Please sign in to comment.