diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-10-08 15:29:31 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-10-09 16:06:19 +0200 |
commit | 9fac603f01e5fad2d931e40027a8ff124ccbf6b1 (patch) | |
tree | 4e15db92814169e2b949010234442b008f57a322 /erts/emulator/test/smoke_test_SUITE.erl | |
parent | 952db27ba0a5b87a2a47f3a7034a9bf92e3651e5 (diff) | |
download | otp-9fac603f01e5fad2d931e40027a8ff124ccbf6b1.tar.gz otp-9fac603f01e5fad2d931e40027a8ff124ccbf6b1.tar.bz2 otp-9fac603f01e5fad2d931e40027a8ff124ccbf6b1.zip |
test: Fix smoke_test_SUITE
* Skip boot_combo tests where cannot start slave nodes
(The binary will not exist)
Diffstat (limited to 'erts/emulator/test/smoke_test_SUITE.erl')
-rw-r--r-- | erts/emulator/test/smoke_test_SUITE.erl | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/erts/emulator/test/smoke_test_SUITE.erl b/erts/emulator/test/smoke_test_SUITE.erl index 98f1cf1ad5..71186d4942 100644 --- a/erts/emulator/test/smoke_test_SUITE.erl +++ b/erts/emulator/test/smoke_test_SUITE.erl @@ -51,7 +51,17 @@ end_per_group(_GroupName, Config) -> Config. +init_per_testcase(boot_combo = Case, Config) when is_list(Config) -> + case erlang:system_info(build_type) of + opt -> + init_per_tc(Case, Config); + _ -> + {skip,"Cannot test boot_combo in special builds since beam.* may not exist"} + end; init_per_testcase(Case, Config) when is_list(Config) -> + init_per_tc(Case, Config). + +init_per_tc(Case, Config) -> Dog = ?t:timetrap(?DEFAULT_TIMEOUT), [{testcase, Case},{watchdog, Dog}|Config]. @@ -121,18 +131,19 @@ start_node(Config) -> start_node(Config, ""). start_node(Config, Args) when is_list(Config) -> - ?line Pa = filename:dirname(code:which(?MODULE)), - ?line {A, B, C} = now(), - ?line Name = list_to_atom(atom_to_list(?MODULE) - ++ "-" - ++ atom_to_list(?config(testcase, Config)) - ++ "-" - ++ integer_to_list(A) - ++ "-" - ++ integer_to_list(B) - ++ "-" - ++ integer_to_list(C)), - ?line ?t:start_node(Name, slave, [{args, "-pa "++Pa++" "++Args}]). + Pa = filename:dirname(code:which(?MODULE)), + {A, B, C} = now(), + Name = list_to_atom(atom_to_list(?MODULE) + ++ "-" + ++ atom_to_list(?config(testcase, Config)) + ++ "-" + ++ integer_to_list(A) + ++ "-" + ++ integer_to_list(B) + ++ "-" + ++ integer_to_list(C)), + Opts = [{args, "-pa "++Pa++" "++Args}], + ?t:start_node(Name, slave, Opts). stop_node(Node) -> ?t:stop_node(Node). |