diff options
author | Peter Andersson <[email protected]> | 2011-09-22 16:40:52 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-09-23 12:24:55 +0200 |
commit | 178940b2184bb3cdaa79d9d51b09c54fbfe68300 (patch) | |
tree | 3062ab5be89fb081d48d70acf6d7847b7961fb64 /lib/common_test/src | |
parent | 57a84ad4a044a74b19d8b956121feb943bbd5b3a (diff) | |
download | otp-178940b2184bb3cdaa79d9d51b09c54fbfe68300.tar.gz otp-178940b2184bb3cdaa79d9d51b09c54fbfe68300.tar.bz2 otp-178940b2184bb3cdaa79d9d51b09c54fbfe68300.zip |
Fix crash when CTHook init fails
Diffstat (limited to 'lib/common_test/src')
-rw-r--r-- | lib/common_test/src/ct_util.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl index f393ea103d..3b6ad6f98d 100644 --- a/lib/common_test/src/ct_util.erl +++ b/lib/common_test/src/ct_util.erl @@ -182,7 +182,11 @@ do_start(Parent,Mode,LogDir) -> %% Initialize ct_hooks try ct_hooks:init(Opts) of ok -> - Parent ! {self(),started} + Parent ! {self(),started}; + {fail,CTHReason} -> + ct_logs:tc_print('Suite Callback',CTHReason,[]), + self() ! {{stop,{self(),{user_error,CTHReason}}}, + {Parent,make_ref()}} catch _:CTHReason -> ct_logs:tc_print('Suite Callback',CTHReason,[]), |