aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_run.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-04-24 16:34:34 +0200
committerSiri Hansen <[email protected]>2017-04-24 16:34:34 +0200
commit658bbc5604e07dbc6a893ce3d24f4d3f68d0a5c9 (patch)
tree19aa92d6b7c660240a3eb14e3b61c235d23229ba /lib/common_test/src/ct_run.erl
parent739bca3fc267c55d84c8f5c193d16c0b2a7eee13 (diff)
parentd7101fd2c2ce8bf609670043585c57010a3707c6 (diff)
downloadotp-658bbc5604e07dbc6a893ce3d24f4d3f68d0a5c9.tar.gz
otp-658bbc5604e07dbc6a893ce3d24f4d3f68d0a5c9.tar.bz2
otp-658bbc5604e07dbc6a893ce3d24f4d3f68d0a5c9.zip
Merge branch 'siri/ct/delete-old-logs/OTP-14179'
* siri/ct/delete-old-logs/OTP-14179: [ct] Add 'keep_logs' option
Diffstat (limited to 'lib/common_test/src/ct_run.erl')
-rw-r--r--lib/common_test/src/ct_run.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index cac176de3a..ba27303c81 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -363,6 +363,12 @@ script_start1(Parent, Args) ->
_ ->
application:set_env(common_test, disable_log_cache, true)
end,
+ %% log_cleanup - used by ct_logs
+ KeepLogs = get_start_opt(keep_logs,
+ fun ct_logs:parse_keep_logs/1,
+ all,
+ Args),
+ application:set_env(common_test, keep_logs, KeepLogs),
Opts = #opts{label = Label, profile = Profile,
vts = Vts, shell = Shell,
@@ -970,6 +976,12 @@ run_test1(StartOpts) when is_list(StartOpts) ->
stop_trace(Tracing),
exit(Res);
RefreshDir ->
+ %% log_cleanup - used by ct_logs
+ KeepLogs = get_start_opt(keep_logs,
+ fun ct_logs:parse_keep_logs/1,
+ all,
+ StartOpts),
+ application:set_env(common_test, keep_logs, KeepLogs),
ok = refresh_logs(?abs(RefreshDir)),
exit(done)
end.
@@ -1131,6 +1143,12 @@ run_test2(StartOpts) ->
DisableCacheBool ->
application:set_env(common_test, disable_log_cache, DisableCacheBool)
end,
+ %% log_cleanup - used by ct_logs
+ KeepLogs = get_start_opt(keep_logs,
+ fun ct_logs:parse_keep_logs/1,
+ all,
+ StartOpts),
+ application:set_env(common_test, keep_logs, KeepLogs),
%% stepped execution
Step = get_start_opt(step, value, StartOpts),