diff options
author | Anders Svensson <[email protected]> | 2015-05-24 00:35:07 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-05-24 00:36:15 +0200 |
commit | 4686d216fd41d534e1f362a6c0c5bba066f17b22 (patch) | |
tree | 8acd264dc7505375fa6ee556c46859779dfd241e /lib/diameter | |
parent | efbfe9602983ff451b864e557bdf3733222b78ba (diff) | |
download | otp-4686d216fd41d534e1f362a6c0c5bba066f17b22.tar.gz otp-4686d216fd41d534e1f362a6c0c5bba066f17b22.tar.bz2 otp-4686d216fd41d534e1f362a6c0c5bba066f17b22.zip |
Make tls suite crash more verbosely
To see why it's failing on at least one test machine.
Diffstat (limited to 'lib/diameter')
-rw-r--r-- | lib/diameter/test/diameter_tls_SUITE.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl index 55565692ec..e5bbda9c91 100644 --- a/lib/diameter/test/diameter_tls_SUITE.erl +++ b/lib/diameter/test/diameter_tls_SUITE.erl @@ -319,19 +319,19 @@ make_cert(Dir, Base) -> make_cert(Dir, Base ++ "_key.pem", Base ++ "_ca.pem"). make_cert(Dir, Keyfile, Certfile) -> - [K,C] = Paths = [filename:join([Dir, F]) || F <- [Keyfile, Certfile]], + [KP,CP] = [filename:join([Dir, F]) || F <- [Keyfile, Certfile]], - KCmd = join(["openssl genrsa -out", K, "2048"]), - CCmd = join(["openssl req -new -x509 -key", K, "-out", C, "-days 7", - "-subj /C=SE/ST=./L=Stockholm/CN=www.erlang.org"]), + KC = join(["openssl genrsa -out", KP, "2048"]), + CC = join(["openssl req -new -x509 -key", KP, "-out", CP, "-days 7", + "-subj /C=SE/ST=./L=Stockholm/CN=www.erlang.org"]), %% Hope for the best and only check that files are written. - os:cmd(KCmd), - os:cmd(CCmd), + [{_, _, {ok,_}},{_, _, {ok,_}}] + = [{P,O,T} || {P,C} <- [{KP,KC}, {CP,CC}], + O <- [os:cmd(C)], + T <- [file:read_file_info(P)]], - [_,_] = [T || P <- Paths, {ok, T} <- [file:read_file_info(P)]], - - {K,C}. + {KP,CP}. join(Strs) -> string:join(Strs, " "). |