diff options
author | Sverker Eriksson <[email protected]> | 2016-09-12 15:05:47 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-09-15 12:06:22 +0200 |
commit | 7262d8630998517e97ec62a7e0d9cbdd23fdd9c8 (patch) | |
tree | b39b3d34bf4568e42f6aae3ea0ac5b5c25de6a69 /erts/emulator/test/trace_nif_SUITE.erl | |
parent | 687eae1e86817403249f03f534a256a28c5d5251 (diff) | |
download | otp-7262d8630998517e97ec62a7e0d9cbdd23fdd9c8.tar.gz otp-7262d8630998517e97ec62a7e0d9cbdd23fdd9c8.tar.bz2 otp-7262d8630998517e97ec62a7e0d9cbdd23fdd9c8.zip |
erts: Fix trace_nif_SUITE to load nif lib only once
Diffstat (limited to 'erts/emulator/test/trace_nif_SUITE.erl')
-rw-r--r-- | erts/emulator/test/trace_nif_SUITE.erl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/erts/emulator/test/trace_nif_SUITE.erl b/erts/emulator/test/trace_nif_SUITE.erl index 8d5bff2a48..7ac6fce234 100644 --- a/erts/emulator/test/trace_nif_SUITE.erl +++ b/erts/emulator/test/trace_nif_SUITE.erl @@ -265,10 +265,16 @@ nif_process() -> nif_process(). load_nif(Config) -> - Path = proplists:get_value(data_dir, Config), - - ok = erlang:load_nif(filename:join(Path,"trace_nif"), 0). + case is_nif_loaded() of + true -> + ok; + false -> + Path = proplists:get_value(data_dir, Config), + ok = erlang:load_nif(filename:join(Path,"trace_nif"), 0) + end. +is_nif_loaded() -> + false. nif() -> {"Stub0",[]}. %exit("nif/0 stub called"). |