aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/epp_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-10-17 13:53:25 +0200
committerHans Bolinder <[email protected]>2011-10-21 08:57:38 +0200
commit98df4ff16c9018bd61d04f35b0bdd92c9fb16942 (patch)
tree7c9d23fc0906669fff23c18c7803803e2b37c004 /lib/stdlib/test/epp_SUITE.erl
parent1fd0ef56ce4432ea6e6ddbcd0af81c71b7921b38 (diff)
downloadotp-98df4ff16c9018bd61d04f35b0bdd92c9fb16942.tar.gz
otp-98df4ff16c9018bd61d04f35b0bdd92c9fb16942.tar.bz2
otp-98df4ff16c9018bd61d04f35b0bdd92c9fb16942.zip
Fix a few tests that used to fail on the HiPE platform
Diffstat (limited to 'lib/stdlib/test/epp_SUITE.erl')
-rw-r--r--lib/stdlib/test/epp_SUITE.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index e58022f4da..f79414db49 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -250,16 +250,23 @@ otp_4871(Config) when is_list(Config) ->
%% so there are some sanity checks before killing.
?line {ok,Epp} = epp:open(File, []),
timer:sleep(1),
- ?line {current_function,{epp,_,_}} = process_info(Epp, current_function),
+ ?line true = current_module(Epp, epp),
?line {monitored_by,[Io]} = process_info(Epp, monitored_by),
- ?line {current_function,{file_io_server,_,_}} =
- process_info(Io, current_function),
+ ?line true = current_module(Io, file_io_server),
?line exit(Io, emulate_crash),
timer:sleep(1),
?line {error,{_Line,epp,cannot_parse}} = otp_4871_parse_file(Epp),
?line epp:close(Epp),
ok.
+current_module(Pid, Mod) ->
+ case process_info(Pid, current_function) of
+ {current_function, undefined} ->
+ true = test_server:is_native(Mod);
+ {current_function, {Mod, _, _}} ->
+ true
+ end.
+
otp_4871_parse_file(Epp) ->
case epp:parse_erl_form(Epp) of
{ok,_} -> otp_4871_parse_file(Epp);