Sort includes outside src/gromacs
[alexxy/gromacs.git] / src / programs / mdrun / tests / moduletest.h
index 69fce84eba414fcce15bc6bf08748c73fc1debff..3e9a7d0b2f142fa376871f2d70b67b6dbbbadf2e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -32,7 +32,8 @@
  * To help us fund GROMACS development, we humbly ask that you cite
  * the research papers on the package. Check out http://www.gromacs.org.
  */
-/*! \defgroup module_mdrun_integration_tests Integration test utilities
+/*! \libinternal
+ * \defgroup module_mdrun_integration_tests Integration test utilities
  * \ingroup group_mdrun
  *
  * \brief Functionality for testing mdrun as a whole
 #ifndef GMX_MDRUN_TESTS_MODULETEST_H
 #define GMX_MDRUN_TESTS_MODULETEST_H
 
-#include "testutils/integrationtests.h"
-
 #include <gtest/gtest.h>
 
+#include "testutils/cmdlinetest.h"
+#include "testutils/integrationtests.h"
+
 namespace gmx
 {
 
@@ -88,13 +90,22 @@ class MdrunTestFixture : public IntegrationTestFixture
 
         //! Use an empty .mdp file as input to grompp
         void useEmptyMdpFile();
-        //! Use an empty .mdp file as input to grompp
+        //! Use a given string as input to grompp
         void useStringAsMdpFile(const char *mdpString);
+        //! Use a given string as input to grompp
+        void useStringAsMdpFile(const std::string &mdpString);
+        //! Use a string as -n input to grompp
+        void useStringAsNdxFile(const char *ndxString);
         //! Use a standard .top and .gro file as input to grompp
-        void useTopAndGroFromDatabase(const char *name);
-        //! Calls grompp to prepare for the mdrun test
+        void useTopGroAndNdxFromDatabase(const char *name);
+        //! Calls grompp (on rank 0) to prepare for the mdrun test
         int callGrompp();
-        //! Calls mdrun for testing
+        //! Calls grompp (on this rank) to prepare for the mdrun test
+        int callGromppOnThisRank();
+        //! Calls mdrun for testing with a customized command line
+        int callMdrun(const CommandLine &callerRef);
+        /*! \brief Convenience wrapper for calling mdrun for testing
+         * with default command line */
         int callMdrun();
 
         //@{
@@ -110,17 +121,29 @@ class MdrunTestFixture : public IntegrationTestFixture
          */
         std::string topFileName;
         std::string groFileName;
-        std::string trrFileName;
-        std::string xtcFileName;
-        std::string rerunFileName;
+        std::string fullPrecisionTrajectoryFileName;
+        std::string reducedPrecisionTrajectoryFileName;
+        std::string groOutputFileName;
+        std::string ndxFileName;
         std::string mdpInputFileName;
         std::string mdpOutputFileName;
         std::string tprFileName;
         std::string logFileName;
         std::string edrFileName;
+        std::string cptFileName;
+        std::string swapFileName;
+        int         nsteps;
         //@}
 };
 
+/*! \libinternal \brief
+ * Parameterized test fixture for mdrun integration tests
+ */
+class ParameterizedMdrunTestFixture : public gmx::test::MdrunTestFixture,
+                                      public ::testing::WithParamInterface<const char *>
+{
+};
+
 } // namespace test
 } // namespace gmx