diff options
author | Sverker Eriksson <[email protected]> | 2013-02-18 19:15:57 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-02-18 19:15:57 +0100 |
commit | 2c6b13d13ef25a7995d5efeeaf735942a2cc9d21 (patch) | |
tree | cdc69e260bc058e581833881336d5fe329a27de7 /lib/test_server/src | |
parent | 08549c6245f9ee31308618f9f3782a638af05a3e (diff) | |
parent | e8de3281557ebb9c296a722735aa3ae9d256eb88 (diff) | |
download | otp-2c6b13d13ef25a7995d5efeeaf735942a2cc9d21.tar.gz otp-2c6b13d13ef25a7995d5efeeaf735942a2cc9d21.tar.bz2 otp-2c6b13d13ef25a7995d5efeeaf735942a2cc9d21.zip |
Merge branch 'sverk/valgrind-cuddling'
* sverk/valgrind-cuddling:
test_server: Increase timeout for VALGRIND
erts: Use native atomics and fallback spinlock to mutex for VALGRIND
Diffstat (limited to 'lib/test_server/src')
-rw-r--r-- | lib/test_server/src/ts_run.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/test_server/src/ts_run.erl b/lib/test_server/src/ts_run.erl index 741dd483f5..2be892d8d3 100644 --- a/lib/test_server/src/ts_run.erl +++ b/lib/test_server/src/ts_run.erl @@ -261,13 +261,17 @@ run_batch(Vars, _Spec, State) -> ts_lib:progress(Vars, 1, "Command: ~s~n", [Command]), io:format(user, "Command: ~s~n",[Command]), Port = open_port({spawn, Command}, [stream, in, eof]), - tricky_print_data(Port). + Timeout = 30000 * case os:getenv("TS_RUN_VALGRIND") of + false -> 1; + _ -> 100 + end, + tricky_print_data(Port, Timeout). -tricky_print_data(Port) -> +tricky_print_data(Port, Timeout) -> receive {Port, {data, Bytes}} -> io:put_chars(Bytes), - tricky_print_data(Port); + tricky_print_data(Port, Timeout); {Port, eof} -> Port ! {self(), close}, receive @@ -280,7 +284,7 @@ tricky_print_data(Port) -> after 1 -> % force context switch ok end - after 30000 -> + after Timeout -> case erl_epmd:names() of {ok,Names} -> case is_testnode_dead(Names) of @@ -288,10 +292,10 @@ tricky_print_data(Port) -> io:put_chars("WARNING: No EOF, but " "test_server node is down!\n"); false -> - tricky_print_data(Port) + tricky_print_data(Port, Timeout) end; _ -> - tricky_print_data(Port) + tricky_print_data(Port, Timeout) end end. |