aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/nif_SUITE_data
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-09-07 17:11:03 +0200
committerBjörn Gustavsson <[email protected]>2016-09-14 12:54:54 +0200
commit359e05121dab023585715b0e42506afd94f2e1f1 (patch)
treefd788bbd0ff386f30dd31ca7ce715e03e2edcc8c /erts/emulator/test/nif_SUITE_data
parent314cbf6d2d4fb356dad6f985f76b220052a97f28 (diff)
downloadotp-359e05121dab023585715b0e42506afd94f2e1f1.tar.gz
otp-359e05121dab023585715b0e42506afd94f2e1f1.tar.bz2
otp-359e05121dab023585715b0e42506afd94f2e1f1.zip
erts: Add nif_SUITE:t_on_load
Diffstat (limited to 'erts/emulator/test/nif_SUITE_data')
-rw-r--r--erts/emulator/test/nif_SUITE_data/nif_mod.erl10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/test/nif_SUITE_data/nif_mod.erl b/erts/emulator/test/nif_SUITE_data/nif_mod.erl
index eec1bb8858..1fcc33faa4 100644
--- a/erts/emulator/test/nif_SUITE_data/nif_mod.erl
+++ b/erts/emulator/test/nif_SUITE_data/nif_mod.erl
@@ -29,6 +29,16 @@
-define(nif_stub,nif_stub_error(?LINE)).
+-ifdef(USE_ON_LOAD).
+-on_load(on_load/0).
+
+on_load() ->
+ [{data_dir, Path}] = ets:lookup(nif_SUITE, data_dir),
+ [{lib_version, Ver}] = ets:lookup(nif_SUITE, lib_version),
+ erlang:load_nif(filename:join(Path,libname(Ver)), []).
+
+-endif.
+
load_nif_lib(Config, Ver) ->
load_nif_lib(Config, Ver, []).