From 6708f4e2ee7e05eacd72780bd6ae38cd0944e81b Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 12 Sep 2011 17:09:27 +0200 Subject: Minor diameter_ct simplification --- lib/diameter/test/Makefile | 2 +- lib/diameter/test/diameter_ct.erl | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/diameter/test/Makefile b/lib/diameter/test/Makefile index 08a4067cf9..ddf49b4573 100644 --- a/lib/diameter/test/Makefile +++ b/lib/diameter/test/Makefile @@ -185,7 +185,7 @@ $(SUITES): log targets $(ERL) -noshell \ -pa ../ebin \ -sname diameter_test_$@ \ - -s diameter_ct run $@ \ + -s diameter_ct run diameter_$@_SUITE \ -s init stop \ | awk '1{rc=0} {print} / FAILED /{rc=1} END{exit rc}' # Shorter in sed but requires a GNU extension (ie. Q). diff --git a/lib/diameter/test/diameter_ct.erl b/lib/diameter/test/diameter_ct.erl index 6842ca03c5..f8ee3dc1d7 100644 --- a/lib/diameter/test/diameter_ct.erl +++ b/lib/diameter/test/diameter_ct.erl @@ -26,20 +26,16 @@ -export([run/1]). %% ct:run_test/1 is currently documented as returning a list of test -%% results ... but no. Instead it returns the phenomenally useful -%% value 'ok' regardless of whether or not the suite in question has -%% failed testcases. +%% results ... but no. Instead it returns 'ok' regardless of whether +%% or not the suite in question has failed testcases. -run([Name]) -> +run([Suite]) -> Start = info(), - ok = ct:run_test([{suite, suite(Name)}, + ok = ct:run_test([{suite, Suite}, {logdir, "./log"}, {auto_compile, false}]), info(Start , info()). -suite(Name) -> - list_to_atom("diameter_" ++ atom_to_list(Name) ++ "_SUITE"). - info() -> [{time, now()}, {process_count, erlang:system_info(process_count)} -- cgit v1.2.3