adds AXI4 pin level test and moves all tests to automatic discovery

This commit is contained in:
2022-10-03 11:08:39 +02:00
parent b68b8c3045
commit e0c3e3d898
6 changed files with 62 additions and 31 deletions

View File

@ -18,14 +18,17 @@ using namespace sc_core;
int sc_main(int argc, char* argv[]) {
auto my_name = util::split(argv[0], '/').back();
scc::init_logging(LogConfig().logLevel(getenv("SCC_TEST_VERBOSE")?log::DEBUG:log::INFO).logAsync(false));
// create tracer
scc::tracer trace(my_name, scc::tracer::file_type::TEXT, true);
scc::init_logging(LogConfig().logLevel(getenv("SCC_TEST_VERBOSE")?log::DEBUG:log::FATAL).logAsync(false));
// create tracer if environment variable SCC_TEST_TRACE is defined
std::unique_ptr<scc::tracer> tracer;
if(getenv("SCC_TEST_TRACE"))
tracer=std::make_unique<scc::tracer>(my_name, scc::tracer::file_type::TEXT, true);
// instantiate design(s)
factory::get_instance().create();
// run tests
int result = Catch::Session().run( argc, argv );
// destroy design(s)
sc_stop();
factory::get_instance().destroy();
return result;
}