standalone_main.cpp
Go to the documentation of this file.
1 
2 #define CATCH_CONFIG_RUNNER
3 #include <catch_ros/catch.hpp>
4 
5 #include "ros_junit_reporter.h"
6 
7 #include <boost/filesystem.hpp>
8 
9 namespace fs = boost::filesystem;
10 
11 int main( int argc, char* const argv[] )
12 {
13  Catch::Session session;
14 
15  int returnCode = session.applyCommandLine( argc, argv );
16  if( returnCode != 0 ) // Indicates a command line error
17  return returnCode;
18 
19  // The catkin scripts calling tests do not create the output directory for
20  // us :-(
21  if(!session.configData().outputFilename.empty())
22  {
23  fs::path outputPath = session.configData().outputFilename;
24 
25  fs::path outputDir = outputPath.parent_path();
26  if(!fs::exists(outputDir))
27  {
28  fs::create_directories(outputDir);
29  }
30  }
31 
32  return session.run();
33 }
int main(int argc, char *const argv[])


catch_ros
Author(s): Max Schwarz
autogenerated on Thu Jan 14 2021 03:32:26