diff options
author | Sverker Eriksson <[email protected]> | 2014-12-09 11:53:16 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-11-26 19:48:09 +0100 |
commit | 41e0c6e584d392ed0d5fbbc51a84418c4f7abcf5 (patch) | |
tree | e4bd842e5cc4a070b58fa88875be6a87dcdd4ee7 /erts/emulator/test/alloc_SUITE_data/testcase_driver.h | |
parent | ef45d2c9f874354b17c2aca96de7b3306a9eb943 (diff) | |
download | otp-41e0c6e584d392ed0d5fbbc51a84418c4f7abcf5.tar.gz otp-41e0c6e584d392ed0d5fbbc51a84418c4f7abcf5.tar.bz2 otp-41e0c6e584d392ed0d5fbbc51a84418c4f7abcf5.zip |
erts: Refactor alloc_SUITE to use NIFs instead of drivers
Diffstat (limited to 'erts/emulator/test/alloc_SUITE_data/testcase_driver.h')
-rw-r--r-- | erts/emulator/test/alloc_SUITE_data/testcase_driver.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/erts/emulator/test/alloc_SUITE_data/testcase_driver.h b/erts/emulator/test/alloc_SUITE_data/testcase_driver.h index 5d439735b7..698ae66fac 100644 --- a/erts/emulator/test/alloc_SUITE_data/testcase_driver.h +++ b/erts/emulator/test/alloc_SUITE_data/testcase_driver.h @@ -20,13 +20,12 @@ #ifndef TESTCASE_DRIVER_H__ #define TESTCASE_DRIVER_H__ -#include "erl_driver.h" +#include "erl_nif.h" #include <stdlib.h> typedef struct { char *testcase_name; - char *command; - int command_len; + int thr_nr; void *extra; } TestCaseState_t; @@ -34,6 +33,7 @@ typedef struct { ((void) ((B) ? 1 : testcase_assertion_failed((TCS), __FILE__, __LINE__, #B))) +int testcase_nif_init(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info); void testcase_printf(TestCaseState_t *tcs, char *frmt, ...); void testcase_succeeded(TestCaseState_t *tcs, char *frmt, ...); void testcase_skipped(TestCaseState_t *tcs, char *frmt, ...); @@ -46,8 +46,11 @@ void *testcase_realloc(void *ptr, size_t size); void testcase_free(void *ptr); +/* Implemented by testcase: */ char *testcase_name(void); void testcase_run(TestCaseState_t *tcs); void testcase_cleanup(TestCaseState_t *tcs); -#endif +extern ErlNifFunc testcase_nif_funcs[3]; + +#endif /* TESTCASE_DRIVER_H__ */ |