// CondorCodTable_t.cxx #include #include #include #include #include #include "dataset_util/getcwd.h" #include "dataset_util/FileStatus.h" #include "dataset_util/FileName.h" #include "dial_condor/CondorCodTable.h" #include "dataset_util/Environment.h" #include "dial_condor/CondorJob.h" // Please don't use "using namespace" -- dla using namespace std; using namespace dial; typedef std::string Name; string DSEP = "/"; void msg(const char* msg) { cout << "----- "; cout << msg; cout << " -----" << endl; } void msg(string msg) { cout << "----- "; cout << msg; cout << " -----" << endl; } int CondorCodTable_t() { msg("Check for the existence of condor"); string condir = CondorJob::find_condor(); if ( condir.size() == 0 ) { cout << "Unable to find condor--no testing done" << endl; return 0; } msg("In Main()"); CondorCodTable tb("Machines.dat"); string freemachine; string s = tb.getfreeclaim(&freemachine); cout << "Free Claim = " << s << endl; cout << "On Machine = " << freemachine << endl; cout << tb; msg("All tests passed."); return 0; } #ifdef CTEST_MAIN int main() { return CondorCodTable_t(); } #endif