aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_test_support.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-03-14 11:18:46 +0100
committerSiri Hansen <[email protected]>2017-03-20 11:09:24 +0100
commitd7101fd2c2ce8bf609670043585c57010a3707c6 (patch)
tree695b717cfe82bd0729d13a19cb5b923925486f13 /lib/common_test/test/ct_test_support.erl
parent35e38c97f5f731e3b1689b0740efa305bac9d16e (diff)
downloadotp-d7101fd2c2ce8bf609670043585c57010a3707c6.tar.gz
otp-d7101fd2c2ce8bf609670043585c57010a3707c6.tar.bz2
otp-d7101fd2c2ce8bf609670043585c57010a3707c6.zip
[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.
Diffstat (limited to 'lib/common_test/test/ct_test_support.erl')
-rw-r--r--lib/common_test/test/ct_test_support.erl3
1 files changed, 3 insertions, 0 deletions
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}}}.