diff --git a/dali/datest/datest.cmake b/dali/datest/datest.cmake index 05d41992772..60ae18153b6 100644 --- a/dali/datest/datest.cmake +++ b/dali/datest/datest.cmake @@ -38,7 +38,6 @@ include_directories ( ${HPCC_SOURCE_DIR}/fs/dafsstream ${HPCC_SOURCE_DIR}/rtl/include ${HPCC_SOURCE_DIR}/rtl/eclrtl - ${HPCC_SOURCE_DIR}/dali/dfuXRefLib ) HPCC_ADD_EXECUTABLE ( datest ${SRCS} ) @@ -51,8 +50,7 @@ target_link_libraries ( datest dafsstream eclrtl wsdfuaccess - dalibase - dfuXRefLib + dalibase ${CppUnit_LIBRARIES} ) diff --git a/dali/datest/datest.cpp b/dali/datest/datest.cpp index 0547a739a4d..62a0468da85 100644 --- a/dali/datest/datest.cpp +++ b/dali/datest/datest.cpp @@ -37,8 +37,6 @@ #include "rtlformat.hpp" -#include "dfuxreflib.hpp" - #include "jptree.hpp" #include "wsdfuaccess.hpp" @@ -80,7 +78,6 @@ static void addTestFile(const char *name,unsigned n) StringBuffer partmask; getPartMask(partmask,name,n); StringBuffer path; - IStoragePlane *plane = getDataStoragePlane("mystorageplane", true); for (unsigned m=0; merrorMessage(msg); - e->Release(); - assertex(strcmp(msg.str(), "Could not find matching prefix in plane definition for file /test/myname._1_of_3")==0); - } - - // A file with a storage plane that has numDevices>1 but no stripe number in the path throws an exception - try { - testParseFileName("/var/lib/HPCCSystems/hpcc-data-two/test/myname.42_of_100", mname.clear(), num, max, replicate); - assertex(false); - } catch (IException *e) { - StringBuffer msg; - e->errorMessage(msg); - e->Release(); - assertex(strcmp(msg.str(), "In storage plane definition numDevices>1, but no stripe sub-directory found in file /var/lib/HPCCSystems/hpcc-data-two/test/myname.42_of_100")==0); - } - - // A file where the dir-per-part number does not match the part number - try { - testParseFileName("/var/lib/HPCCSystems/hpcc-data-two/d1/test/42/myname._43_of_100", mname.clear(), num, max, replicate); - assertex(false); - } catch (IException *e) { - StringBuffer msg; - e->errorMessage(msg); - e->Release(); - assertex(strcmp(msg.str(), "Dir-per-part # does not match part # of file /var/lib/HPCCSystems/hpcc-data-two/d1/test/42/myname._43_of_100")==0); - } - - printf("All parseFileName tests passed\n"); -} - void usage(const char *error=NULL) { if (error) printf("%s\n", error); printf("usage: DATEST * [/test [] [/NITER ]\n"); - printf("where name = RANDTEST | DFS | QTEST | QTEST2 | SESSION | LOCKS | SDS1 | SDS2 | XPATHS| STRESS | STRESS2 | SHUTDOWN | EXTERNAL | SUBLOCKS | SUBSCRIPTION | CONNECTIONSUBS | MULTIFILE | NODESUBS | DFUSTREAMREAD | DFUSTREAMWRITE | DFUSTREAMCOPY | PARSEFILENAME\n"); + printf("where name = RANDTEST | DFS | QTEST | QTEST2 | SESSION | LOCKS | SDS1 | SDS2 | XPATHS| STRESS | STRESS2 | SHUTDOWN | EXTERNAL | SUBLOCKS | SUBSCRIPTION | CONNECTIONSUBS | MULTIFILE | NODESUBS | DFUSTREAMREAD | DFUSTREAMWRITE | DFUSTREAMCOPY\n"); printf("eg: datest . /test QTEST put -- one coven server running locally, running qtest with param \"put\"\n"); printf(" datest eq0001016 eq0001017 -- two coven servers, use default test %s\n", DEFAULT_TEST); } @@ -3410,10 +3336,6 @@ int main(int argc, char* argv[]) EnableSEHtoExceptionMapping(); try { - //NB: required initialization for anything that may call getGlobalConfig*() or getComponentConfig*() - Owned globals = loadConfiguration(defaultYaml, (const char **)argv, "datest", nullptr, nullptr, nullptr, nullptr, false); - initializeStorageGroups(true); - StringBuffer cmd; splitFilename(argv[0], NULL, NULL, &cmd, NULL); StringBuffer lf; @@ -3553,7 +3475,6 @@ int main(int argc, char* argv[]) case 10: TestSubLocks(); break; case 11: TestSDS3(group); break; case 12: TestNodeSubs(); break; - case 13: TestParseFileName(); break; } } else if (TEST("DFS")) @@ -3608,8 +3529,6 @@ int main(int argc, char* argv[]) testDfuStreamWrite(testParams.ordinality() ? testParams.item(0) : nullptr); else if (TEST("DFUSTREAMCOPY")) testDfuStreamCopy(testParams.ordinality() ? testParams.item(0) : nullptr); - else if (TEST("PARSEFILENAME")) - TestParseFileName(); // else if (TEST("DALILOG")) // testDaliLog(testParams.ordinality()&&0!=atoi(testParams.item(0))); else diff --git a/dali/dfuXRefLib/dfuxreflib.hpp b/dali/dfuXRefLib/dfuxreflib.hpp index 8bb88634a2f..691aecca6c4 100644 --- a/dali/dfuXRefLib/dfuxreflib.hpp +++ b/dali/dfuXRefLib/dfuxreflib.hpp @@ -42,6 +42,5 @@ extern DFUXREFLIB_API IPropertyTree * runXRefCluster(const char *cluster,IXRefN // this will use sasha if enabled extern DFUXREFLIB_API void testGetDir(); -extern DFUXREFLIB_API bool testParseFileName(const char *name,StringBuffer &mname,unsigned &num,unsigned &max,bool &replicate); #endif