11#include "llvm/Support/Signals.h"
12#include "gtest/gtest.h"
23TEST(ThreadCrashReporterTest,
All) {
27 auto SignalCurrentThread = []() { infoSignalHandler(); };
29 llvm::sys::SetInfoSignalFunction(&infoSignalHandler);
30 auto SignalCurrentThread = []() { raise(SIGUSR1); };
34 auto SignalAnotherThread = [&]() {
35 Runner.runAsync(
"signal another thread", SignalCurrentThread);
45 SignalCurrentThread();
50 SignalAnotherThread();
56 SignalCurrentThread();
59 std::string Order =
"";
64 SignalCurrentThread();
67 EXPECT_EQ(Order,
"ba");
71 SignalCurrentThread();
72 EXPECT_EQ(Order,
"baa");
Runs tasks on separate (detached) threads and wait for all tasks to finish.
Allows setting per-thread abort/kill signal callbacks, to print additional information about the cras...
static void runCrashHandlers()
Calls all currently-active ThreadCrashReporters for the current thread.
FIXME: Skip testing on windows temporarily due to the different escaping code mode.
TEST(BackgroundQueueTest, Priority)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//