|
From: <tho...@us...> - 2013-12-03 07:32:57
|
Revision: 536
http://sourceforge.net/p/cgreen/code/536
Author: thomasnilsson
Date: 2013-12-03 07:32:49 +0000 (Tue, 03 Dec 2013)
Log Message:
-----------
Only do dlclose if it was open, otherwise crash
Modified Paths:
--------------
trunk/cgreen/tools/runner.c
Modified: trunk/cgreen/tools/runner.c
===================================================================
--- trunk/cgreen/tools/runner.c 2013-11-27 15:42:12 UTC (rev 535)
+++ trunk/cgreen/tools/runner.c 2013-12-03 07:32:49 UTC (rev 536)
@@ -370,16 +370,16 @@
printf("Discovered %d test(s)\n", count(discovered_tests));
if (!dont_run) {
- if (verbose)
- printf("Opening [%s]", test_library_name);
- test_library_handle = dlopen(test_library_name, RTLD_NOW);
- if (test_library_handle == NULL) {
- fprintf (stderr, "\nERROR: dlopen failure (error: %s)\n", dlerror());
- status = 2;
- } else {
- status = run_tests(reporter, suite_name, test_name, test_library_handle, discovered_tests, verbose);
- }
- dlclose(test_library_handle);
+ if (verbose)
+ printf("Opening [%s]", test_library_name);
+ test_library_handle = dlopen(test_library_name, RTLD_NOW);
+ if (test_library_handle == NULL) {
+ fprintf (stderr, "\nERROR: dlopen failure (error: %s)\n", dlerror());
+ status = 2;
+ } else {
+ status = run_tests(reporter, suite_name, test_name, test_library_handle, discovered_tests, verbose);
+ dlclose(test_library_handle);
+ }
}
reflective_runner_cleanup(discovered_tests);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|