|
@ -14,7 +14,7 @@ void printHomeDir(TestUnit& myself) |
|
|
{ |
|
|
{ |
|
|
// TESTLOG(string(myself.getFQName() + " - PID: " + to_string(getpid())));
|
|
|
// TESTLOG(string(myself.getFQName() + " - PID: " + to_string(getpid())));
|
|
|
// cout << "[" << to_string(getpid()) << "/" << myself.getFQName() << "] - " << endl;
|
|
|
// cout << "[" << to_string(getpid()) << "/" << myself.getFQName() << "] - " << endl;
|
|
|
setenv("HOME", myself.processDir().c_str(), 1); |
|
|
setenv("HOME", myself.getProcessDir().c_str(), 1); |
|
|
myself.log("HOME=" + string(getenv("HOME"))); |
|
|
myself.log("HOME=" + string(getenv("HOME"))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -29,11 +29,11 @@ int main(int argc, char* argv[]) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 1", |
|
|
"node 1", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 1"); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 1"); |
|
|
return 0; |
|
|
return 0; |
|
|
}) |
|
|
}) |
|
|
.addNew<TestUnit>("node 1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
.addNew<TestUnit>("node 1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 1.1"); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 1.1"); |
|
|
return 0; |
|
|
return 0; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -42,19 +42,19 @@ int main(int argc, char* argv[]) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 2", |
|
|
"node 2", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 2"); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 2"); |
|
|
return 0; |
|
|
return 0; |
|
|
}) |
|
|
}) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 2.1", |
|
|
"node 2.1", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_2_1/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_2_1/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}, |
|
|
}, |
|
|
nullptr, |
|
|
nullptr, |
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL) |
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL) |
|
|
.addNew<TestUnit>("node 2.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
.addNew<TestUnit>("node 2.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_2_1/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_2_1/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -64,7 +64,7 @@ int main(int argc, char* argv[]) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 3", |
|
|
"node 3", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}, |
|
|
}, |
|
|
nullptr, |
|
|
nullptr, |
|
@ -72,25 +72,25 @@ int main(int argc, char* argv[]) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 3.1", |
|
|
"node 3.1", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}) |
|
|
}) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 3.1.1", |
|
|
"node 3.1.1", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}) |
|
|
}) |
|
|
.addNew<TestUnit>( |
|
|
.addNew<TestUnit>( |
|
|
"node 3.1.1", |
|
|
"node 3.1.1", |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3_1_1/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3_1_1/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}, |
|
|
}, |
|
|
nullptr, |
|
|
nullptr, |
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL) |
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL) |
|
|
.addNew<TestUnit>("node 3.1.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
.addNew<TestUnit>("node 3.1.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3_1_1/", ""); |
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3_1_1/", ""); |
|
|
return 0; |
|
|
return 0; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|