Branch data Line data Source code
1 : : // ***************************************************************************** 2 : : /*! 3 : : \file src/Main/UnitTestDriver.cpp 4 : : \copyright 2012-2015 J. Bakosi, 5 : : 2016-2018 Los Alamos National Security, LLC., 6 : : 2019-2021 Triad National Security, LLC. 7 : : All rights reserved. See the LICENSE file for details. 8 : : \brief Unit test driver 9 : : \details Unit test driver. 10 : : */ 11 : : // ***************************************************************************** 12 : : 13 : : #include "UnitTestDriver.hpp" 14 : : #include "UnitTest/CmdLine/CmdLine.hpp" 15 : : #include "QuinoaConfig.hpp" 16 : : #include "NoWarning/tutsuite.decl.h" 17 : : #include "Writer.hpp" 18 : : 19 : : using unittest::UnitTestDriver; 20 : : 21 : : namespace unittest { 22 : : 23 : : extern CProxy_TUTSuite g_suiteProxy; 24 : : 25 : : } // unittest:: 26 : : 27 : 1 : UnitTestDriver::UnitTestDriver( const ctr::CmdLine& cmdline, int ) 28 : : // ***************************************************************************** 29 : : // Constructor 30 : : //! \param[in] cmdline Command line object storing data parsed from the command 31 : : //! line arguments 32 : : // ***************************************************************************** 33 : : { 34 : : // Instantiate (on PE 0 ) and run unit test suite. We only support Template 35 : : // Unit Test suites at this point, so no factory instantiation, simply fire up 36 : : // a Charm++ chare TUTSuite, which fires up and evaluates all unit tests 37 : : // included in Main/UnitTest.C. Store proxy handle in global-scope to make it 38 : : // available to individual unit tests that fire up Charm++ chares so they can 39 : : // call back to the test suite. Since this is called inside the main chare 40 : : // constructor, the Charm++ runtime system distributes the handle along with 41 : : // all other global-scope data. 42 [ + - ]: 1 : g_suiteProxy = CProxy_TUTSuite::ckNew( cmdline, 0 ); 43 : 1 : }