diff options
author | Siri Hansen <[email protected]> | 2017-04-12 11:17:36 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-04-12 11:17:36 +0200 |
commit | 85c956da8303096bba8c5c2307aa07d6e007f620 (patch) | |
tree | a459523ab31ed2fe59ccfbf2dfdc3052f8c44758 | |
parent | e19e06d91eff086b4649c5524b3756e9c8e79fbe (diff) | |
parent | 2a0986a613f87f942d260c9b1a4f8552ef66ab12 (diff) | |
download | otp-85c956da8303096bba8c5c2307aa07d6e007f620.tar.gz otp-85c956da8303096bba8c5c2307aa07d6e007f620.tar.bz2 otp-85c956da8303096bba8c5c2307aa07d6e007f620.zip |
Merge branch 'siri/ct/scale-on-valgrind'
* siri/ct/scale-on-valgrind:
[ct] Scale timetraps when running valgrind
-rw-r--r-- | lib/common_test/src/test_server.erl | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/common_test/src/test_server.erl b/lib/common_test/src/test_server.erl index be49191f2e..0256206e59 100644 --- a/lib/common_test/src/test_server.erl +++ b/lib/common_test/src/test_server.erl @@ -359,10 +359,10 @@ stick_all_sticky(Node,Sticky) -> %% cover. run_test_case_apply({Mod,Func,Args,Name,RunInit,TimetrapData}) -> - case os:getenv("TS_RUN_VALGRIND") of + case is_valgrind() of false -> ok; - _ -> + true -> os:putenv("VALGRIND_LOGFILE_INFIX",atom_to_list(Mod)++"."++ atom_to_list(Func)++"-") end, @@ -1827,7 +1827,8 @@ timetrap_scale_factor() -> { 2, fun() -> has_lock_checking() end}, { 3, fun() -> has_superfluous_schedulers() end}, { 6, fun() -> is_debug() end}, - {10, fun() -> is_cover() end} + {10, fun() -> is_cover() end}, + {10, fun() -> is_valgrind() end} ]). timetrap_scale_factor(Scales) -> @@ -2729,6 +2730,16 @@ is_commercial() -> _ -> true end. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% is_valgrind() -> boolean() +%% +%% Returns true if valgrind is running, else false +is_valgrind() -> + case os:getenv("TS_RUN_VALGRIND") of + false -> false; + _ -> true + end. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% Apply given function and reply to caller or proxy. |