diff options
author | Ingela Anderton Andin <[email protected]> | 2017-10-26 10:20:38 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-10-27 12:24:13 +0200 |
commit | 18a19cbc1b69b60966b1a07eb31f42bde323b880 (patch) | |
tree | 83322e6ad6dc515010f5d02590902c6a06f84ecf /lib/snmp/test/snmp_manager_test.erl | |
parent | 20af6471398302330073f9ee8325bc018e5959bf (diff) | |
download | otp-18a19cbc1b69b60966b1a07eb31f42bde323b880.tar.gz otp-18a19cbc1b69b60966b1a07eb31f42bde323b880.tar.bz2 otp-18a19cbc1b69b60966b1a07eb31f42bde323b880.zip |
snmp: Add crypto precondition test
Diffstat (limited to 'lib/snmp/test/snmp_manager_test.erl')
-rw-r--r-- | lib/snmp/test/snmp_manager_test.erl | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/lib/snmp/test/snmp_manager_test.erl b/lib/snmp/test/snmp_manager_test.erl index 4bfeb0f8d1..6ced55f0cc 100644 --- a/lib/snmp/test/snmp_manager_test.erl +++ b/lib/snmp/test/snmp_manager_test.erl @@ -156,16 +156,25 @@ init_per_suite(Config0) when is_list(Config0) -> ?DBG("init_per_suite -> entry with" "~n Config0: ~p", [Config0]), - Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0), - Config2 = snmp_test_lib:fix_data_dir(Config1), - - %% Mib-dirs - %% data_dir is trashed by the test-server / common-test - %% so there is no point in fixing it... - MibDir = snmp_test_lib:lookup(data_dir, Config2), - StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]), - - [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2]. + %% Preferably this test SUITE should be divided into groups + %% so that if crypto does not work only v3 tests that + %% need crypto will be skipped, but as this is only a + %% problem with one legacy test machine, we will procrastinate + %% until we have a more important reason to fix this. + case snmp_test_lib:crypto_start() of + ok -> + Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0), + Config2 = snmp_test_lib:fix_data_dir(Config1), + %% Mib-dirs + %% data_dir is trashed by the test-server / common-test + %% so there is no point in fixing it... + MibDir = snmp_test_lib:lookup(data_dir, Config2), + StdMibDir = filename:join([code:priv_dir(snmp), "mibs"]), + + [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2]; + _ -> + {skip, "Crypto did not start"} + end. end_per_suite(Config) when is_list(Config) -> |