svn commit: r189417 - head/lib/libarchive/test
Tim Kientzle
kientzle at FreeBSD.org
Thu Mar 5 10:30:51 PST 2009
Author: kientzle
Date: Thu Mar 5 18:30:50 2009
New Revision: 189417
URL: http://svn.freebsd.org/changeset/base/189417
Log:
Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, break
into the debugger on test setup failures (otherwise, the console window
just goes away and you can't see what went wrong). On all platforms,
clean up a stray buffer before exiting.
Modified:
head/lib/libarchive/test/main.c
Modified: head/lib/libarchive/test/main.c
==============================================================================
--- head/lib/libarchive/test/main.c Thu Mar 5 18:27:16 2009 (r189416)
+++ head/lib/libarchive/test/main.c Thu Mar 5 18:30:50 2009 (r189417)
@@ -35,6 +35,8 @@
#include <time.h>
#ifdef _WIN32
#include <crtdbg.h>
+#include <windows.h>
+#include <winbase.h>
#endif
/*
@@ -910,10 +912,13 @@ get_refdir(void)
strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1);
}
+#if defined(_WIN32) && defined(_DEBUG)
/* You should have to add "$(TargetDir)" to
* Properties > Configuration Properties > Debugging > Working Directory,
* if you are running libarchive_test.exe on Visual Studio.
*/
+ DebugBreak();
+#endif
printf("Unable to locate known reference file %s\n", KNOWNREF);
printf(" Checked following directories:\n%s\n", tried);
exit(1);
@@ -1092,6 +1097,7 @@ int main(int argc, char **argv)
i = atoi(*argv);
if (**argv < '0' || **argv > '9' || i < 0 || i >= limit) {
printf("*** INVALID Test %s\n", *argv);
+ free(refdir_alloc);
usage(progname);
} else {
if (test_run(i, tmpdir))
More information about the svn-src-head
mailing list