38 |
|
|
39 |
extern int register_cunit_tests(); |
extern int register_cunit_tests(); |
40 |
|
|
41 |
extern struct FilePath* ASC_TEST_DIR; |
extern char ASC_TEST_PATH[PATH_MAX]; |
42 |
|
|
43 |
/* |
/* |
44 |
The following allows the CUnit tests to be run using a standalone executable |
The following allows the CUnit tests to be run using a standalone executable |
135 |
char suitename[1000]; |
char suitename[1000]; |
136 |
char list = 0; |
char list = 0; |
137 |
|
|
138 |
struct FilePath* test_executable = ospath_new(argv[0]); |
struct FilePath *test_executable = ospath_new(argv[0]); |
139 |
ASC_TEST_DIR = ospath_getdir(test_executable); /** Global Variable containing Path information about the test directory */ |
struct FilePath *test_dir = ospath_getdir(test_executable); /** Global Variable containing Path information about the test directory */ |
140 |
|
ospath_strncpy(test_dir,ASC_TEST_PATH,PATH_MAX); |
141 |
|
ospath_free(test_dir); |
142 |
|
ospath_free(test_executable); |
143 |
|
|
144 |
static struct option long_options[] = { |
static struct option long_options[] = { |
145 |
{"on-error", required_argument, 0, 'e'}, |
{"on-error", required_argument, 0, 'e'}, |
251 |
cleanup: |
cleanup: |
252 |
if(mode == CU_BRM_VERBOSE)ascshutdown("Testing completed.");/* shut down memory manager */ |
if(mode == CU_BRM_VERBOSE)ascshutdown("Testing completed.");/* shut down memory manager */ |
253 |
CU_cleanup_registry(); |
CU_cleanup_registry(); |
|
ospath_free(test_executable); |
|
|
ospath_free(ASC_TEST_DIR); |
|
254 |
return result; |
return result; |
255 |
} |
} |