diff options
author | Sverker Eriksson <[email protected]> | 2012-01-11 19:01:40 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-01-11 19:01:40 +0100 |
commit | abdafb962fb1387d1c3cac95be1c524026e6067a (patch) | |
tree | 3a199f6489792a6353fa1ca541a039012485b897 | |
parent | bb312f5fb5748fef90f57ccb387f1c32a729f086 (diff) | |
parent | 841f0c5453e7d76c9d55b4f477e9f1e2b32ae569 (diff) | |
download | otp-abdafb962fb1387d1c3cac95be1c524026e6067a.tar.gz otp-abdafb962fb1387d1c3cac95be1c524026e6067a.tar.bz2 otp-abdafb962fb1387d1c3cac95be1c524026e6067a.zip |
Merge branch 'sverk/nif_SUITE-skip-threading' into maint
* sverk/nif_SUITE-skip-threading:
erts: Add missing cleanup to nif_SUITE:threading
erts: Skip nif_SUITE:threading if not supported
-rw-r--r-- | erts/emulator/test/nif_SUITE.erl | 8 | ||||
-rw-r--r-- | erts/emulator/test/nif_SUITE_data/tester.c | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/erts/emulator/test/nif_SUITE.erl b/erts/emulator/test/nif_SUITE.erl index 370363bf9e..6bd7361612 100644 --- a/erts/emulator/test/nif_SUITE.erl +++ b/erts/emulator/test/nif_SUITE.erl @@ -859,7 +859,13 @@ resource_holder(Pid,Reply,List) -> threading(doc) -> ["Test the threading API functions (reuse tests from driver API)"]; -threading(Config) when is_list(Config) -> +threading(Config) when is_list(Config) -> + case erlang:system_info(threads) of + true -> threading_do(Config); + false -> {skipped,"No thread support"} + end. + +threading_do(Config) -> ?line Data = ?config(data_dir, Config), ?line File = filename:join(Data, "tester"), ?line {ok,tester,ModBin} = compile:file(File, [binary,return_errors]), diff --git a/erts/emulator/test/nif_SUITE_data/tester.c b/erts/emulator/test/nif_SUITE_data/tester.c index 08466d0f18..257b116322 100644 --- a/erts/emulator/test/nif_SUITE_data/tester.c +++ b/erts/emulator/test/nif_SUITE_data/tester.c @@ -61,6 +61,7 @@ static int reload(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) static ERL_NIF_TERM run(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) { testcase_run(NULL); + testcase_cleanup(NULL); return enif_make_atom(env, "ok"); } |