Fix AT_CHECK_EUNIT for versions of Erlang/OTP without init:stop/1.

* lib/autotest/specific.m4 (AT_CHECK_EUNIT): Support older
versions of Erlang/OTP with an erlang:stop() function that doesn't
take arguments.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
Romain Lenglet 2009-08-22 10:48:38 +02:00 committed by Ralf Wildenhues
parent 1c17608e79
commit 206564ac3e
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2009-08-22 Romain Lenglet <romain.lenglet@laposte.net>
Fix AT_CHECK_EUNIT for versions of Erlang/OTP without init:stop/1.
* lib/autotest/specific.m4 (AT_CHECK_EUNIT): Support older
versions of Erlang/OTP with an erlang:stop() function that doesn't
take arguments.
2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Drop unneeded line in Eunit test.

View File

@ -74,12 +74,13 @@ test(Options) ->
TestSpec = $2,
ReturnValue = case code:load_file(eunit) of
{module, _} -> case eunit:test(TestSpec, Options) of
ok -> 0; %% test passes
_ -> 1 %% test fails
ok -> "0\n"; %% test passes
_ -> "1\n" %% test fails
end;
_ -> 77 %% EUnit not found, test skipped
_ -> "77\n" %% EUnit not found, test skipped
end,
init:stop(ReturnValue).
file:write_file("$1.result", ReturnValue),
init:stop().
]])
AT_CHECK(["$ERLC" $ERLCFLAGS -b beam $1.erl])
## Make EUnit verbose when testsuite is verbose:
@ -90,4 +91,6 @@ else
fi
AT_CHECK(["$ERL" $3 -s $1 test $at_eunit_options -noshell], [0], [ignore], [],
[$4], [$5])
AT_CAPTURE_FILE([$1.result])
AT_CHECK([test -f "$1.result" && (exit `cat "$1.result"`)])
])