From c9f6f5b9c20ada3dfa1e682cf49c09e3311db248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Wed, 6 Apr 2016 20:18:57 +0200 Subject: Eliminate use of test_server:fail/0,1 --- lib/tools/test/cover_SUITE.erl | 6 +++--- lib/tools/test/emem_SUITE.erl | 6 +++--- lib/tools/test/fprof_SUITE.erl | 6 +++--- lib/tools/test/instrument_SUITE.erl | 4 ++-- lib/tools/test/make_SUITE.erl | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'lib/tools/test') diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl index 421957315c..4628e5f1b1 100644 --- a/lib/tools/test/cover_SUITE.erl +++ b/lib/tools/test/cover_SUITE.erl @@ -1029,21 +1029,21 @@ otp_6115(Config) when is_list(Config) -> Beam when is_list(Beam) -> ok; Other -> - ?t:fail({"f1 is not reloaded", Other}) + ct:fail({"f1 is not reloaded", Other}) end, case process_info(Pid1) of undefined -> ok; _PI1 -> RefToOldP1 = erlang:check_process_code(Pid1, f1), - ?t:fail({"Pid1 still alive", RefToOldP1}) + ct:fail({"Pid1 still alive", RefToOldP1}) end, case process_info(Pid2) of undefined -> ok; _PI2 -> RefToOldP2 = erlang:check_process_code(Pid1, f2), - ?t:fail({"Pid2 still alive", RefToOldP2}) + ct:fail({"Pid2 still alive", RefToOldP2}) end, file:set_cwd(CWD), diff --git a/lib/tools/test/emem_SUITE.erl b/lib/tools/test/emem_SUITE.erl index ddd11b6a22..2533a23dcc 100644 --- a/lib/tools/test/emem_SUITE.erl +++ b/lib/tools/test/emem_SUITE.erl @@ -512,7 +512,7 @@ run_emem_on_casefile(Config) -> File = filename:join([?config(data_dir, Config), CaseName ++ ".gz"]), case check_file(File) of not_found -> - ?t:fail({error, {filenotfound, File}}); + ct:fail({error, {filenotfound, File}}); _ -> ok end, @@ -621,12 +621,12 @@ start_emem(Config) when is_list(Config) -> case open_port({spawn, Emem ++ " -t -n -o -i 1"}, Cd ++ [{line, 1024}, eof]) of Port when is_port(Port) -> {ok, read_emu_flag(Port), Port}; - Error -> ?t:fail(Error) + Error -> ct:fail(Error) end. read_emu_flag(Port) -> Line = case get_emem_line(Port) of - eof -> ?t:fail(unexpected_end_of_file); + eof -> ct:fail(unexpected_end_of_file); L -> L end, case has_prefix("> Emulator command line argument:", Line) of diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl index b942111026..1483c654c6 100644 --- a/lib/tools/test/fprof_SUITE.erl +++ b/lib/tools/test/fprof_SUITE.erl @@ -546,12 +546,12 @@ cpu_create_file_slow(Config) when is_list(Config) -> case {os:type(), os:version()} of {{unix, sunos}, {Major, Minor, _}} when Major >= 5, Minor >= 7 -> - test_server:fail(Result); + ct:fail(Result); _ -> {skipped, "not_supported"} end; _ -> - test_server:fail(Result) + ct:fail(Result) end, TestResult. @@ -1137,7 +1137,7 @@ compare([],Rest) -> [] -> ok; _ -> io:format("\nMissing in simulator results:\n~p\n",[Error]) end, - ?t:fail({error,mismatch_between_simulator_and_fprof}) + ct:fail({error,mismatch_between_simulator_and_fprof}) end. remove_undefined([{{_Pid,undefined},_,_}|Rest],Result) -> diff --git a/lib/tools/test/instrument_SUITE.erl b/lib/tools/test/instrument_SUITE.erl index 619ef9597d..db19a6912c 100644 --- a/lib/tools/test/instrument_SUITE.erl +++ b/lib/tools/test/instrument_SUITE.erl @@ -56,7 +56,7 @@ all() -> end, 0, AL), N =< S3; Other -> - ?t:fail(Other) + ct:fail(Other) end, lists:foldl( fun ({TDescr,Addr,Size,Proc}, MinAddr) -> @@ -72,7 +72,7 @@ all() -> undefined -> ok; BadProc -> - ?t:fail({badproc, BadProc}) + ct:fail({badproc, BadProc}) end, NextMinAddr = Addr+Size, true = NextMinAddr =< High, diff --git a/lib/tools/test/make_SUITE.erl b/lib/tools/test/make_SUITE.erl index 5e3b3772fc..c277d8c9ce 100644 --- a/lib/tools/test/make_SUITE.erl +++ b/lib/tools/test/make_SUITE.erl @@ -186,7 +186,7 @@ otp_6057_a(Config) when is_list(Config) -> case ensure_exists([Test1, Test2, Test3]) of ok -> ok; Missing -> - ?t:fail({"missing beam file", Missing}) + ct:fail({"missing beam file", Missing}) end, %% Check creation date of test1.beam and make sure it is not @@ -201,7 +201,7 @@ otp_6057_a(Config) when is_list(Config) -> case FileInfo2#file_info.mtime of Date1 -> ok; _Date2 -> - ?t:fail({"recompiled beam file", Test1++".beam"}) + ct:fail({"recompiled beam file", Test1++".beam"}) end, %% Remove the beam files @@ -238,7 +238,7 @@ otp_6057_b(Config) when is_list(Config) -> case ensure_exists([Test3]) of ok -> ok; Missing -> - ?t:fail({"missing beam file", Missing}) + ct:fail({"missing beam file", Missing}) end, %% Remove the beam file @@ -277,7 +277,7 @@ otp_6057_c(Config) when is_list(Config) -> case ensure_exists([Test1, Test2]) of ok -> ok; Missing -> - ?t:fail({"missing beam file", Missing}) + ct:fail({"missing beam file", Missing}) end, %% Remove the beam files @@ -309,6 +309,6 @@ ensure_no_messages(N) -> after 0 -> case N of 0 -> ok; - N -> ?t:fail() + N -> ct:fail(failed) end end. -- cgit v1.2.3