diff options
author | Sverker Eriksson <[email protected]> | 2016-11-02 14:39:15 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-11-02 14:39:15 +0100 |
commit | 38e1f98a0a4729357c3669a5c5e2f93ad5ab1d90 (patch) | |
tree | 4acc9c4347b18577cdfbb4721d10a636846a79b9 /erts/emulator/test/nif_SUITE.erl | |
parent | 2ccd860e57929c12752d55226d4c4084bccc5b2d (diff) | |
parent | 24485c421f15b00d0b5c97633d701373b53897a5 (diff) | |
download | otp-38e1f98a0a4729357c3669a5c5e2f93ad5ab1d90.tar.gz otp-38e1f98a0a4729357c3669a5c5e2f93ad5ab1d90.tar.bz2 otp-38e1f98a0a4729357c3669a5c5e2f93ad5ab1d90.zip |
Merge branch 'sverker/hipe-load_nif-error/OTP-14002'
Diffstat (limited to 'erts/emulator/test/nif_SUITE.erl')
-rw-r--r-- | erts/emulator/test/nif_SUITE.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/erts/emulator/test/nif_SUITE.erl b/erts/emulator/test/nif_SUITE.erl index 306f2091a1..3a76ee6aee 100644 --- a/erts/emulator/test/nif_SUITE.erl +++ b/erts/emulator/test/nif_SUITE.erl @@ -30,6 +30,7 @@ init_per_testcase/2, end_per_testcase/2, basic/1, reload_error/1, upgrade/1, heap_frag/1, t_on_load/1, + hipe/1, types/1, many_args/1, binaries/1, get_string/1, get_atom/1, maps/1, api_macros/1, @@ -70,6 +71,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [basic, reload_error, upgrade, heap_frag, types, many_args, t_on_load, + hipe, binaries, get_string, get_atom, maps, api_macros, from_array, iolist_as_binary, resource, resource_binary, resource_takeover, threading, send, send2, send3, @@ -88,6 +90,11 @@ all() -> init_per_testcase(t_on_load, Config) -> ets:new(nif_SUITE, [named_table]), Config; +init_per_testcase(hipe, Config) -> + case erlang:system_info(hipe_architecture) of + undefined -> {skip, "HiPE is disabled"}; + _ -> Config + end; init_per_testcase(_Case, Config) -> Config. @@ -411,6 +418,17 @@ t_on_load(Config) when is_list(Config) -> verify_tmpmem(TmpMem), ok. +hipe(Config) when is_list(Config) -> + Data = proplists:get_value(data_dir, Config), + Priv = proplists:get_value(priv_dir, Config), + Src = filename:join(Data, "hipe_compiled"), + {ok,hipe_compiled} = c:c(Src, [{outdir,Priv},native]), + true = code:is_module_native(hipe_compiled), + {error, {notsup,_}} = hipe_compiled:try_load_nif(), + true = code:delete(hipe_compiled), + false = code:purge(hipe_compiled), + ok. + %% Test NIF building heap fragments heap_frag(Config) when is_list(Config) -> |