Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/testapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ void dowork(struct timeval
if (!result) printf("return: %d\n\n", result);
}

/* Somehow the testlib constructor doesn't work in the C++ app
so we just call the print function directly.
*/
extern "C"
{
void print_all_adiak_vars();
}

int main(
#if defined(USE_MPI)
int argc, char *argv[]
Expand All @@ -137,6 +145,7 @@ int main(
#endif

dowork(start);
print_all_adiak_vars();

adiak::fini();
adiak::clean();
Expand Down
4 changes: 4 additions & 0 deletions tests/testlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ static void print_on_flush(const char *name, int UNUSED(category), const char *U
adiak_list_namevals_with_info(1, adiak_category_all, print_nameval, NULL);
}

void print_all_adiak_vars()
{
adiak_list_namevals_with_info(1, adiak_category_all, print_nameval, NULL);
}

static void onload() __attribute__((constructor));
static void onload()
Expand Down