Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Diff: TestManager.cpp
- Revision:
- 27:0297dbc3252b
- Parent:
- 26:9eefab9e28df
- Child:
- 30:dd2beda340c6
--- a/TestManager.cpp Thu Sep 06 14:28:01 2012 +0000 +++ b/TestManager.cpp Thu Sep 06 15:13:38 2012 +0000 @@ -46,9 +46,28 @@ } int numTests = getTestProfileLength(profile); LOG("%d tests complete: %d passes and %d failures.",numTests,numPassed,numTests-numPassed); + LOG("Listing failures:"); + listFailures(gTestProfiles[profile], gTestProfileLengths[profile]); return numPassed; } +void TestManager::listFailures(const int *list, const int listLen) { + int successfullTests = 0; + for(int i=0; i<listLen; i++) { + int testIndex = list[i]; + if(testIndex>=_tests.size()) { + LOG("Test out of bounds. Test index must be betweeen 0 and %d!",_tests.size()); + continue; + } + + VodafoneTestCase* test = _tests[list[i]]; + if(test->_lastRunOutcome==false) { + LOG("Test %d:",list[i]); + LOG(gTestDescriptions[list[i]]); + } + } +} + int TestManager::executeTestList(const int *list, const int listLen) { int successfullTests = 0; LOG("Running %d tests...",listLen);