diff options
-rw-r--r-- | engines/testbed/cloud.cpp | 21 | ||||
-rw-r--r-- | engines/testbed/cloud.h | 1 |
2 files changed, 17 insertions, 5 deletions
diff --git a/engines/testbed/cloud.cpp b/engines/testbed/cloud.cpp index 655e2f72bc..73b0b8b5c1 100644 --- a/engines/testbed/cloud.cpp +++ b/engines/testbed/cloud.cpp @@ -66,6 +66,17 @@ bool CloudTests::waitForCallback() { return false; } +bool CloudTests::waitForCallbackMore() { + while (!waitForCallback()) { + Common::String info = "It takes more time than expected. Do you want to skip the test or wait more?"; + if (Testsuite::handleInteractiveInput(info, "Wait", "Skip", kOptionRight)) { + Testsuite::logPrintf("Info! Skipping test : info()\n"); + return false; + } + } + return true; +} + void CloudTests::infoCallback(Cloud::Storage::StorageInfoResponse response) { ConfParams.setCloudTestCallbackCalled(true); Testsuite::logPrintf("Info! User's ID: %s\n", response.value.uid().c_str()); @@ -147,7 +158,7 @@ TestExitStatus CloudTests::testInfo() { Testsuite::logPrintf("Warning! No Request is returned!\n"); } - waitForCallback(); + if (!waitForCallbackMore()) return kTestSkipped; Testsuite::clearScreen(); if (ConfParams.isCloudTestErrorCallbackCalled()) { @@ -184,7 +195,7 @@ TestExitStatus CloudTests::testDirectoryListing() { Testsuite::logPrintf("Warning! No Request is returned!\n"); } - waitForCallback(); + if (!waitForCallbackMore()) return kTestSkipped; Testsuite::clearScreen(); if (ConfParams.isCloudTestErrorCallbackCalled()) { @@ -226,7 +237,7 @@ TestExitStatus CloudTests::testDirectoryCreating() { Testsuite::logPrintf("Warning! No Request is returned!\n"); } - waitForCallback(); + if (!waitForCallbackMore()) return kTestSkipped; Testsuite::clearScreen(); if (ConfParams.isCloudTestErrorCallbackCalled()) { @@ -245,7 +256,7 @@ TestExitStatus CloudTests::testDirectoryCreating() { Testsuite::logPrintf("Warning! No Request is returned!\n"); } - waitForCallback(); + if (!waitForCallbackMore()) return kTestSkipped; Testsuite::clearScreen(); if (ConfParams.isCloudTestErrorCallbackCalled()) { @@ -264,7 +275,7 @@ TestExitStatus CloudTests::testDirectoryCreating() { Testsuite::logPrintf("Warning! No Request is returned!\n"); } - waitForCallback(); + if (!waitForCallbackMore()) return kTestSkipped; Testsuite::clearScreen(); if (ConfParams.isCloudTestErrorCallbackCalled()) { diff --git a/engines/testbed/cloud.h b/engines/testbed/cloud.h index 827b231ea5..17bc0938c9 100644 --- a/engines/testbed/cloud.h +++ b/engines/testbed/cloud.h @@ -35,6 +35,7 @@ namespace CloudTests { // Helper functions for Cloud tests bool waitForCallback(); +bool waitForCallbackMore(); void infoCallback(Cloud::Storage::StorageInfoResponse response); void directoryListedCallback(Cloud::Storage::FileArrayResponse response); void directoryCreatedCallback(Cloud::Storage::BoolResponse response); |