Date: Thu, 5 Mar 2009 18:30:50 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r189417 - head/lib/libarchive/test Message-ID: <200903051830.n25IUoHN096055@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903051830.n25IUoHN096055>