extends cxs_tlm test to support tracing
Some checks failed
SCC Test/pipeline/head There was a failure building this commit
Some checks failed
SCC Test/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <csetjmp>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
#include <scc/configurer.h>
|
||||
#include <scc/report.h>
|
||||
#include <scc/trace.h>
|
||||
#include <scc/tracer.h>
|
||||
@@ -27,10 +28,12 @@ int sc_main(int argc, char* argv[]) {
|
||||
auto level = getenv("SCC_TEST_VERBOSE");
|
||||
auto log_lvl = level ? static_cast<scc::log>(std::min(strtoul(level, nullptr, 10) + 4, 7UL)) : log::FATAL;
|
||||
scc::init_logging(LogConfig().logLevel(log_lvl).logAsync(false).msgTypeFieldWidth(35));
|
||||
scc::configurer cfg("");
|
||||
// create tracer if environment variable SCC_TEST_TRACE is defined
|
||||
std::unique_ptr<scc::tracer> tracer;
|
||||
if(auto* test_trace = getenv("SCC_TEST_TRACE")) {
|
||||
tracer = std::make_unique<scc::tracer>(my_name, scc::tracer::ENABLE, scc::tracer::ENABLE);
|
||||
cfg.set_value("scc_tracer.default_trace_enable", true);
|
||||
}
|
||||
int result = -1;
|
||||
if(setjmp(abrt) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user