Skip to content

Commit 1421183

Browse files
committed
Debug commit
1 parent 0cdcff3 commit 1421183

File tree

2 files changed

+59
-3
lines changed

2 files changed

+59
-3
lines changed

MC/config/examples/ini/tests/GeneratorEPOS4.C

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,61 @@
11
int External()
22
{
3+
// Print folder content through ls command
4+
std::cout << "### Folder content ###" << std::endl;
5+
std::system("ls -l");
6+
// Print the content of the o2sim_serverlog file
7+
std::ifstream serverLog("o2sim_serverlog");
8+
std::cout << "### o2sim_serverlog ###" << std::endl;
9+
if (!serverLog.is_open())
10+
{
11+
std::cerr << "Cannot open o2sim_serverlog file\n";
12+
return 1;
13+
}
14+
std::string line;
15+
while (std::getline(serverLog, line))
16+
{
17+
std::cout << line << "\n";
18+
}
19+
serverLog.close();
20+
// Print the content of the o2sim_mergerlog file
21+
std::ifstream mergerLog("o2sim_mergerlog");
22+
std::cout << "### o2sim_mergerlog ###" << std::endl;
23+
if (!mergerLog.is_open())
24+
{
25+
std::cerr << "Cannot open o2sim_mergerlog file\n";
26+
return 1;
27+
}
28+
while (std::getline(mergerLog, line))
29+
{
30+
std::cout << line << "\n";
31+
}
32+
mergerLog.close();
33+
// Print the content of the o2sim_workerlog0 file
34+
std::ifstream workerLog("o2sim_workerlog0");
35+
std::cout << "### o2sim_workerlog0 ###" << std::endl;
36+
if (!workerLog.is_open())
37+
{
38+
std::cerr << "Cannot open o2sim_workerlog0 file\n";
39+
return 1;
40+
}
41+
while (std::getline(workerLog, line))
42+
{
43+
std::cout << line << "\n";
44+
}
45+
workerLog.close();
46+
// Print the content of the z-cfg.mtr file
47+
std::ifstream mtrLog("z-cfg.mtr");
48+
std::cout << "### z-cfg.mtr ###" << std::endl;
49+
if (!mtrLog.is_open())
50+
{
51+
std::cerr << "Cannot open z-cfg.mtr file\n";
52+
return 1;
53+
}
54+
while (std::getline(mtrLog, line))
55+
{
56+
std::cout << line << "\n";
57+
}
58+
mtrLog.close();
359
std::string path{"o2sim_Kine.root"};
460
// Check that file exists, can be opened and has the correct tree
561
TFile file(path.c_str(), "READ");
@@ -61,4 +117,4 @@ int External()
61117
}
62118
}
63119
return 0;
64-
}
120+
}

test/run_generator_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ exec_test()
9494
echo "### Testing ${ini_path} with generator ${generator} ###" > ${LOG_FILE_GENERIC_KINE}
9595
echo "### Testing ${ini_path} with generator ${generator} ###" > ${LOG_FILE_SIM}
9696
# run the simulation, fail if not successful
97-
o2-sim -g ${generator_lower} ${trigger} --noGeant -n 100 -j 4 --configFile ${ini_path} --configKeyValues "GeneratorPythia8.includePartonEvent=true" >> ${LOG_FILE_SIM} 2>&1
97+
o2-sim -g ${generator_lower} ${trigger} --noGeant -n 100 -j 4 --configFile ${ini_path} --configKeyValues "GeneratorPythia8.includePartonEvent=true"
9898
RET=${?}
9999
[[ "${RET}" != "0" ]] && { remove_artifacts ; return ${RET} ; }
100100

@@ -104,7 +104,7 @@ exec_test()
104104

105105
# now run the test script that we know at this point exists
106106
cp ${test_script} ${generator}.C
107-
root -l -b -q ${generator}.C >> ${LOG_FILE_KINE} 2>&1
107+
root -l -b -q ${generator}.C
108108
local ret_test=${?}
109109
[[ "${RET}" != "0" ]] || RET=${ret_test}
110110
rm ${generator}.C

0 commit comments

Comments
 (0)