diff options
author | Julian Büning <julian.buening@rwth-aachen.de> | 2022-01-04 20:39:47 +0100 |
---|---|---|
committer | MartinNowack <2443641+MartinNowack@users.noreply.github.com> | 2022-01-05 20:22:12 +0000 |
commit | 62e27ff8cad97c12f3051a5fdcf8cd4aade96894 (patch) | |
tree | e718b5182beaf2887d06fba00f2f8be9bd265ec4 /unittests/TestMain.cpp | |
parent | acb90dc2d8cdf104740099a2d8773f5022194622 (diff) | |
download | klee-62e27ff8cad97c12f3051a5fdcf8cd4aade96894.tar.gz |
unittests/TestMain: show stack trace on error
Diffstat (limited to 'unittests/TestMain.cpp')
-rw-r--r-- | unittests/TestMain.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/unittests/TestMain.cpp b/unittests/TestMain.cpp index 4f43342f..42dd721a 100644 --- a/unittests/TestMain.cpp +++ b/unittests/TestMain.cpp @@ -7,10 +7,21 @@ // //===----------------------------------------------------------------------===// -#include "gtest/gtest.h" +#include "klee/Config/Version.h" + +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Signals.h" +#include "gtest/gtest.h" int main(int argc, char **argv) { + +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 9) + llvm::sys::PrintStackTraceOnErrorSignal(argv[0], true); +#else + llvm::sys::PrintStackTraceOnErrorSignal(true); +#endif + testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } |