From 7735f5510cdc2d396092d04ed98a2dbaec347608 Mon Sep 17 00:00:00 2001 From: don bright Date: Sat, 15 Oct 2011 23:44:21 -0500 Subject: opencsgtest and throwntogethertest windows fix diff --git a/tests/OffscreenContextWGL.cc b/tests/OffscreenContextWGL.cc index 17c49c6..b4170d1 100644 --- a/tests/OffscreenContextWGL.cc +++ b/tests/OffscreenContextWGL.cc @@ -68,8 +68,12 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) bool create_wgl_dummy_context(OffscreenContext &ctx) { - // this call alters ctx->window and ctx->openGLContext + // this function alters ctx->window and ctx->openGLContext // and ctx->dev_context if successfull + + // stop Windows from producing dialog boxes about "this application has failed" + SetErrorMode(SEM_NOGPFAULTERRORBOX|SEM_NOOPENFILEERRORBOX|SEM_FAILCRITICALERRORS); + // create window HINSTANCE inst = GetModuleHandle(0); diff --git a/tests/opencsgtest.cc b/tests/opencsgtest.cc index 9ddf662..06cfe86 100644 --- a/tests/opencsgtest.cc +++ b/tests/opencsgtest.cc @@ -1,5 +1,5 @@ #include "csgtestcore.h" int main(int argc, char* argv[]) { - return csgtestcore(argc+1, argv, TEST_OPENCSG); + return csgtestcore(argc, argv, TEST_OPENCSG); } diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py index f4b9138..e6a84cf 100755 --- a/tests/test_cmdline_tool.py +++ b/tests/test_cmdline_tool.py @@ -57,7 +57,6 @@ def execute_and_redirect(cmd, params, outfile): return retval def get_normalized_text(filename): - print >> sys.stderr, "debug normalize" , filename text = open(filename).read() return text.strip("\r\n").replace("\r\n", "\n") + "\n" @@ -146,7 +145,6 @@ def run_test(testname, cmd, args): outfile = open(outputname, "wb") try: - print >> sys.stderr, "debug ", [cmd], args, [outputname] proc = subprocess.Popen([cmd] + args + [outputname], stdout=subprocess.PIPE, stderr=subprocess.PIPE) errtext = proc.communicate()[1] if errtext != None and len(errtext) > 0: diff --git a/tests/throwntogethertest.cc b/tests/throwntogethertest.cc index ba0a682..5a4f14f 100644 --- a/tests/throwntogethertest.cc +++ b/tests/throwntogethertest.cc @@ -1,5 +1,5 @@ #include "csgtestcore.h" int main(int argc, char* argv[]) { - return csgtestcore(argc+1, argv, TEST_THROWNTOGETHER); + return csgtestcore(argc, argv, TEST_THROWNTOGETHER); } -- cgit v0.10.1