|
@@ -77,9 +77,7 @@ int main(int argc, char *argv[]) {
|
|
|
iter = faux_list_head(opts->so_list);
|
|
|
while ((so = faux_list_each(&iter))) {
|
|
|
void *so_handle = NULL;
|
|
|
- const char **test_list = NULL;
|
|
|
- const char *test_name = NULL;
|
|
|
- const char *test_desc = NULL;
|
|
|
+ const char *(*test_list)[2] = NULL;
|
|
|
unsigned int module_tests = 0;
|
|
|
unsigned int module_errors = 0;
|
|
|
|
|
@@ -98,17 +96,22 @@ int main(int argc, char *argv[]) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- test_list = (const char **)dlsym(so_handle, TESTC_LIST_SYM);
|
|
|
- while (*test_list) {
|
|
|
+ test_list = dlsym(so_handle, TESTC_LIST_SYM);
|
|
|
+ if (!test_list) {
|
|
|
+ fprintf(stderr, "Error: Can't get test list for module \"%s\"... Skipped\n", so);
|
|
|
+ total_errors++;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ while ((*test_list)[0]) {
|
|
|
+ const char *test_name = NULL;
|
|
|
+ const char *test_desc = NULL;
|
|
|
int (*test_sym)(void);
|
|
|
int retval = 0;
|
|
|
char *result = NULL;
|
|
|
|
|
|
- test_name = *test_list;
|
|
|
- test_list++;
|
|
|
- if (!*test_list) // Broken test list structure
|
|
|
- break;
|
|
|
- test_desc = *test_list;
|
|
|
+ test_name = (*test_list)[0];
|
|
|
+ test_desc = (*test_list)[1];
|
|
|
test_list++;
|
|
|
module_tests++;
|
|
|
|