Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Jan 18, 2024
1 parent 3ca4ef9 commit aa57627
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions onnxruntime/test/unittest_main/test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ auto const placeholder = std::unique_ptr<nvinfer1::IBuilder>(nvinfer1::createInf

int TEST_MAIN(int argc, char** argv) {
int status = 0;

std::cout<<"Init Google Test"<<std::endl;
ORT_TRY {
::testing::InitGoogleTest(&argc, argv);
std::cout<<"Init Ort ENV"<<std::endl;
ortenv_setup();

std::cout<<"Update Ort ENV"<<std::endl;
// allow verbose logging to be enabled by setting this environment variable to a numeric log level
constexpr auto kLogLevelEnvironmentVariableName = "ORT_UNIT_TEST_MAIN_LOG_LEVEL";
if (auto log_level = onnxruntime::ParseEnvironmentVariable<int>(kLogLevelEnvironmentVariableName);
Expand All @@ -72,7 +73,7 @@ int TEST_MAIN(int argc, char** argv) {
std::cout << "Setting log level to " << *log_level << "\n";
ort_env->UpdateEnvWithCustomLogLevel(static_cast<OrtLoggingLevel>(*log_level));
}

std::cout<<"Start running tests"<<std::endl;
status = RUN_ALL_TESTS();
}
ORT_CATCH(const std::exception& ex) {
Expand Down

0 comments on commit aa57627

Please sign in to comment.