/*! \brief
* Custom program context for test binaries.
*
- * This context overrides the defaultLibraryDataPath() implementation to always
+ * This context overrides the installationPrefix() implementation to always
* load data files from the source directory, as the test binaries are never
* installed. It also support overriding the directory through a command-line
* option to the test binary.
* \param[in] context Current \Gromacs program context.
*/
explicit TestProgramContext(const ProgramContextInterface &context)
- : context_(context),
- dataPath_(Path::join(CMAKE_SOURCE_DIR, "share/top"))
+ : context_(context), dataPath_(CMAKE_SOURCE_DIR)
{
}
*/
void overrideSourceRoot(const std::string &sourceRoot)
{
- dataPath_ = Path::join(sourceRoot, "share/top");
+ dataPath_ = sourceRoot;
}
virtual const char *programName() const
{
return context_.fullBinaryPath();
}
- virtual const char *defaultLibraryDataPath() const
+ virtual InstallationPrefixInfo installationPrefix() const
{
- return dataPath_.c_str();
+ return InstallationPrefixInfo(dataPath_.c_str(), true);
}
virtual const char *commandLine() const
{