|
|
|
@ -21,77 +21,78 @@ void printHomeDir(TestUnit& myself)
|
|
|
|
|
int main(int argc, char* argv[])
|
|
|
|
|
{
|
|
|
|
|
PityUnit<>::debug_log_enabled = false;
|
|
|
|
|
// Suite
|
|
|
|
|
TestUnit suite = TestUnit{ "test_processdirs" };
|
|
|
|
|
|
|
|
|
|
// 1
|
|
|
|
|
suite
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 1",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 1");
|
|
|
|
|
return 0;
|
|
|
|
|
}))
|
|
|
|
|
.addCopy(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");
|
|
|
|
|
return 0;
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 2
|
|
|
|
|
suite
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 2",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 2");
|
|
|
|
|
return 0;
|
|
|
|
|
}))
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
})
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 2.1",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_2_1/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
nullptr,
|
|
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL))
|
|
|
|
|
.addCopy(TestUnit("node 2.1.1", [](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL)
|
|
|
|
|
.addNew<TestUnit>("node 2.1.1", [](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_2_1/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 3
|
|
|
|
|
suite
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 3",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
nullptr,
|
|
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL))
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL)
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 3.1",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
}))
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
})
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 3.1.1",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
}))
|
|
|
|
|
.addCopy(TestUnit(
|
|
|
|
|
})
|
|
|
|
|
.addNew<TestUnit>(
|
|
|
|
|
"node 3.1.1",
|
|
|
|
|
[](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3_1_1/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
nullptr,
|
|
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL))
|
|
|
|
|
.addCopy(TestUnit("node 3.1.1.1", [](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL)
|
|
|
|
|
.addNew<TestUnit>("node 3.1.1.1", [](TestUnit& pity, TestContext* ctx) {
|
|
|
|
|
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3_1_1/", "");
|
|
|
|
|
return 0;
|
|
|
|
|
}));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
suite.run();
|
|
|
|
|
}
|