Skip to content
Snippets Groups Projects
Commit 2418ea6d authored by Nils Erik Krumnack's avatar Nils Erik Krumnack
Browse files

change EventLoopGrid test to download datasets on submission nodes

Since not all grid sites allow direct file access from the outside
this makes the tests more robust.
parent 50ff2846
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,7 @@ namespace EL
for (std::size_t iter = 0, end = samples.size(); iter != end; ++ iter)
{
ANA_MSG_INFO ("looking at sample " << samples[iter]->name());
TH1 *ref_hist = dynamic_cast<TH1*>(samples[iter]->meta()->get ("hist"));
if (ref_hist != 0)
{
......@@ -177,6 +178,7 @@ namespace EL
{
TH1 *file_executes = dynamic_cast<TH1*>(sample->readHist ("file_executes"));
RCU_ASSERT_SOFT (file_executes != 0);
ANA_MSG_INFO ("file executes: " << file_executes->GetEntries() << " " << samples[iter]->makeFileList().size());
RCU_ASSERT_SOFT (file_executes->GetEntries() == samples[iter]->makeFileList().size());
}
......
......@@ -11,6 +11,8 @@
#include <EventLoopGrid/PrunDriver.h>
#include <EventLoopTest/UnitTest.h>
#include <RootCoreUtils/ShellExec.h>
#include <SampleHandler/GridTools.h>
#include <sstream>
#include <time.h>
......@@ -22,6 +24,20 @@ using namespace EL;
int main ()
{
// can't use my current directory, it may easily overflow
std::ostringstream stageDir;
{
const char *TMPDIR = getenv ("TMPDIR");
if (TMPDIR)
stageDir << TMPDIR << "/";
else
stageDir << "/tmp/";
}
stageDir << "GridToolsTest." << getpid();
RCU::Shell::exec ("rm -rf " + RCU::Shell::quote (stageDir.str()));
RCU::Shell::exec ("mkdir -p " + RCU::Shell::quote (stageDir.str()));
setenv (SH::downloadStageEnvVar().c_str(), stageDir.str().c_str(), 0);
PrunDriver driver;
std::ostringstream output;
output << "user.krumnack.EventLoopTest.output." << time(nullptr) << ".%in:name[6]%";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment