diff --git a/code/harness/Tester.cpp b/code/harness/Tester.cpp index 5313df08..a31d6849 100644 --- a/code/harness/Tester.cpp +++ b/code/harness/Tester.cpp @@ -450,6 +450,10 @@ int Tester::test_setup() { return test_loader.get_instance()->setup(); } +int Tester::test_pass(string mountDir, string filesysSize){ + return test_loader.get_instance()->pass(mountDir, filesysSize); +} + int Tester::test_run() { return test_loader.get_instance()->run(); } diff --git a/code/harness/Tester.h b/code/harness/Tester.h index dc323664..c2bbed11 100644 --- a/code/harness/Tester.h +++ b/code/harness/Tester.h @@ -78,6 +78,7 @@ class Tester { int test_load_class(const char* path); void test_unload_class(); int test_setup(); + int test_pass(std::string mountDir, std::string filesysSize); int test_run(); int test_check_permutations(const int num_rounds); int test_check_random_permutations(const int num_rounds); diff --git a/code/harness/c_harness.cpp b/code/harness/c_harness.cpp index da938628..cb59a649 100644 --- a/code/harness/c_harness.cpp +++ b/code/harness/c_harness.cpp @@ -138,6 +138,7 @@ int main(int argc, char** argv) { ****************************************************************************/ const unsigned int test_case_idx = optind; const string path = argv[test_case_idx]; + cout << test_dev << endl; if(!(setenv("MOUNT_FS", test_dev.c_str(), 1))){ cerr << "Error setting environment variable MOUNT_FS" << endl; } @@ -228,7 +229,7 @@ int main(int argc, char** argv) { } test_harness.set_fs_type(fs_type); test_harness.set_device(test_dev); - + test_harness.test_pass(test_dev, filesize); // Load the class being tested. cout << "Loading test case" << endl; if (test_harness.test_load_class(argv[test_case_idx]) != SUCCESS) { diff --git a/code/tests/BaseTestCase.h b/code/tests/BaseTestCase.h index cfc25aa2..474049ef 100644 --- a/code/tests/BaseTestCase.h +++ b/code/tests/BaseTestCase.h @@ -8,13 +8,12 @@ namespace tests { class BaseTestCase { public: - std::string mountDir; - std::string fileSysSize; virtual ~BaseTestCase() {}; virtual int setup() = 0; virtual int run() = 0; virtual int check_test(unsigned int last_checkpoint, DataTestResult *test_result) = 0; + virtual int pass(std::string mountDir, std::string filesysSize) {} }; typedef BaseTestCase *test_create_t(); diff --git a/code/tests/rename_root_to_sub.cpp b/code/tests/rename_root_to_sub.cpp index f38e6d77..4ebd8902 100644 --- a/code/tests/rename_root_to_sub.cpp +++ b/code/tests/rename_root_to_sub.cpp @@ -209,6 +209,9 @@ class rename_root_to_sub : public BaseTestCase { return 0; } + virtual int pass(std::string mountDir, std::string filesysSize){ + std::cout << mountDir << " " << filesysSize << std::endl; + } private: char text[strlen(TEST_TEXT)];