diff options
author | Sverker Eriksson <[email protected]> | 2013-02-13 16:31:17 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-02-13 16:31:17 +0100 |
commit | e8de3281557ebb9c296a722735aa3ae9d256eb88 (patch) | |
tree | 7dede4b867c24e346a388a4ad551b49f9deb3ccf | |
parent | dc0223f9425ff2390686833557ff333f1f3d7414 (diff) | |
download | otp-e8de3281557ebb9c296a722735aa3ae9d256eb88.tar.gz otp-e8de3281557ebb9c296a722735aa3ae9d256eb88.tar.bz2 otp-e8de3281557ebb9c296a722735aa3ae9d256eb88.zip |
test_server: Increase timeout for VALGRIND
-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. |