Browse Source

Add EUNIT_TEST_SPEC variable

Allows configuring setup/teardown or more complex
test definitions.
Arpit Tarang Saxena 6 years ago
parent
commit
2287a1d78f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      plugins/eunit.mk

+ 2 - 1
plugins/eunit.mk

@@ -8,6 +8,7 @@
 
 EUNIT_OPTS ?=
 EUNIT_ERL_OPTS ?=
+EUNIT_TEST_SPEC ?= $1
 
 # Core targets.
 
@@ -23,7 +24,7 @@ help::
 define eunit.erl
 	$(call cover.erl)
 	CoverSetup(),
-	case eunit:test($1, [$(EUNIT_OPTS)]) of
+	case eunit:test($(call EUNIT_TEST_SPEC,$1), [$(EUNIT_OPTS)]) of
 		ok -> ok;
 		error -> halt(2)
 	end,