Skip to content

Commit

Permalink
maintain the integration of gtest arguments (#1491)
Browse files Browse the repository at this point in the history
  • Loading branch information
zrphercule committed Oct 10, 2018
1 parent 0c8dead commit 354fa9d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions onnx/backend/test/cpp/test_main.cc
Expand Up @@ -2,11 +2,12 @@
#include "gtest_utils.h"

GTEST_API_ int main(int argc, char** argv) {
if (argc != 2) {
if (argc < 2) {
std::cerr << "target directory must be given!" << std::endl;
return EXIT_FAILURE;
}
std::string target_dir = argv[1];
argc--;
std::string target_dir = argv[argc];
auto testcases = ONNX_NAMESPACE::testing::LoadAllTestCases(target_dir);
GetTestCases() = testcases;
::testing::InitGoogleTest(&argc, argv);
Expand Down

0 comments on commit 354fa9d

Please sign in to comment.