From fd9aadef51afede5b4b400eae3eb8fa862272d81 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 25 Apr 2011 17:51:12 +0900 Subject: [PATCH] test: Add _win32_seterrormode.fail.cpp to silence Exception diaalogs on Windows desktop. --- test/_win32_seterrormode.fail.cpp | 15 +++++++++++++++ test/lit.cfg | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 test/_win32_seterrormode.fail.cpp diff --git a/test/_win32_seterrormode.fail.cpp b/test/_win32_seterrormode.fail.cpp new file mode 100644 index 00000000..b2aebc11 --- /dev/null +++ b/test/_win32_seterrormode.fail.cpp @@ -0,0 +1,15 @@ +#include + +namespace { + + class Win32ctor { + public: + Win32ctor() { + SetErrorMode(SEM_FAILCRITICALERRORS | + SEM_NOGPFAULTERRORBOX | + SEM_NOOPENFILEERRORBOX); + } + }; + + static Win32ctor ctor; +} diff --git a/test/lit.cfg b/test/lit.cfg index 9962159e..38c5a833 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -68,7 +68,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): exec_file.close() try: - compile_cmd = [self.cxx_under_test, '-o', exec_path, + compile_cmd = [self.cxx_under_test, 'e:/llvm/libcxx/test/_win32_seterrormode.fail.cpp', '-o', exec_path, source_path] + self.cpp_flags + self.ld_flags cmd = compile_cmd out, err, exitCode = self.execute_command(cmd)