Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
snnn committed Jan 24, 2024
1 parent 2bd4e4e commit fecd8b0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions onnxruntime/test/unittest_main/test_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ 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 @@ -73,7 +72,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 fecd8b0

Please sign in to comment.