From d7101fd2c2ce8bf609670043585c57010a3707c6 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 14 Mar 2017 11:18:46 +0100 Subject: [ct] Add 'keep_logs' option If setting the value for this option to an integer, N, common_test will remove all ct_run.* directories in the current log directory, except the N newest. The default value for the 'keep_logs' option is 'all', which means that no logs will be deleted. 'keep_logs' can be used in combination with refresh_logs, or in a normal common_test test run. --- lib/common_test/test/ct_test_support.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/common_test/test/ct_test_support.erl') diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl index 05a452b99d..06d591871f 100644 --- a/lib/common_test/test/ct_test_support.erl +++ b/lib/common_test/test/ct_test_support.erl @@ -351,6 +351,9 @@ check_result(CtRunTestResult,ExitStatus,Opts) catch _:_ -> {error,{unexpected_return_value,{CtRunTestResult,ExitStatus}}} end; +check_result(done,0,_Opts) -> + %% refresh_logs return + ok; check_result(CtRunTestResult,ExitStatus,_Opts) -> {error,{unexpected_return_value,{CtRunTestResult,ExitStatus}}}. -- cgit v1.2.3