-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include "BatchTest.hxx"
#include "Launcher.hxx"
+#include "Basics_Utils.hxx"
+#include "Basics_DirUtils.hxx"
#ifdef WITH_LIBBATCH
#include <libbatch/MpiImpl.hxx>
strftime(date, BUFSIZE, "%Y_%m_%d__%H_%M_%S", localtime(&curtime));
// Creating test temporary file
- _test_filename = "/tmp/";
- _test_filename += std::string(date) + "_test_cluster_file_";
- _test_filename += _batch_descr.hostname.in();
_base_filename = std::string(date) + "_test_cluster_file_" + _batch_descr.hostname.in();
+ _test_filename = Kernel_Utils::GetTmpDir() + _base_filename;
#endif
}
return result;
}
- // Writing into the tempory file
+ // Writing into the temporary file
command = "echo Hello > " + _test_filename;
status = system(command.c_str());
if(status) {
std::ostringstream oss;
oss << status;
- result += "Error in creating tempory file ! status = ";
+ result += "Error in creating temporary file ! status = ";
result += oss.str();
return result;
}
file_normal.close();
if (normal_input != "Bonjour")
{
- result += "error from simple ouput file ! waiting for Bonjour and get : " + normal_input;
+ result += "error from simple output file ! waiting for Bonjour and get : " + normal_input;
return result;
}
std::string error_input;
file_normal.close();
if (!test_ok)
{
- result += "error from mpi ouput file ! waiting for HELLO MPI please watch /tmp/" + _date + "_mpi_output.log file";
+ result += "error from mpi output file ! waiting for HELLO MPI please watch /tmp/" + _date + "_mpi_output.log file";
return result;
}
result = "OK";