Vodafone Test Suite
Dependencies: mbed-rtos mbed HTTPClient VodafoneUSBModem
Revision 42:e423e7204e5c, committed 2012-09-14
- Comitter:
- donatien
- Date:
- Fri Sep 14 15:13:40 2012 +0000
- Parent:
- 41:9d802bf152fa
- Child:
- 43:6db6a72d722b
- Commit message:
- Fixed TestManager.cpp bug
Changed in this revision
--- a/TestManager.cpp Fri Sep 14 12:58:57 2012 +0000 +++ b/TestManager.cpp Fri Sep 14 15:13:40 2012 +0000 @@ -146,12 +146,21 @@ VodafoneTestCase* test = constructTest(testID);//getTest(testID); if(test==NULL) { LOG("Error. Test %d is not in test list! This will be counted as a failure.",testID); - delete test; + //delete test; return false; } LOG("Running test %d...",testID); - if(test->execute()) { + //if(test->execute()) { //FIX Donatien + /* + Error was there: + If execute() is called directly, setupTest() and endTest() are NOT called! + In Tests 21 & 22 these routines were used to allocate/deallocate the buffer where + the USSD result was supposed to be stored + This pointer being random, random stuff happened when the USSDInterface tried to copy the response to this address + */ + if(test->run()) + { LOG("...OK"); delete test; return true;
--- a/Tests/Test21.h Fri Sep 14 12:58:57 2012 +0000 +++ b/Tests/Test21.h Fri Sep 14 15:13:40 2012 +0000 @@ -17,6 +17,7 @@ virtual bool execute() { LOG(_description); + LOG("_ussdResponse=%p",_ussdResponse); if(_modem->sendUSSD("*#100#",_ussdResponse,16)!=0) { LOG("Error sending USSD");
--- a/Tests/Test22.h Fri Sep 14 12:58:57 2012 +0000 +++ b/Tests/Test22.h Fri Sep 14 15:13:40 2012 +0000 @@ -11,10 +11,12 @@ virtual void setupTest() { _ussdResponse = (char*)malloc(16*sizeof(char)); + LOG("_ussdResponse alloc'd to %p",_ussdResponse); } virtual bool execute() { LOG(_description); + LOG("_ussdResponse=%p",_ussdResponse); if(_modem->sendUSSD(".2890",_ussdResponse,16)!=0) { LOG("Error sending USSD");
--- a/VodafoneUSBModem_bleedingedge.lib Fri Sep 14 12:58:57 2012 +0000 +++ b/VodafoneUSBModem_bleedingedge.lib Fri Sep 14 15:13:40 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/donatien/code/VodafoneUSBModem_bleedingedge/#b53c619b036d +http://mbed.org/users/donatien/code/VodafoneUSBModem_bleedingedge/#be311326ee06
--- a/main.cpp Fri Sep 14 12:58:57 2012 +0000 +++ b/main.cpp Fri Sep 14 15:13:40 2012 +0000 @@ -69,6 +69,6 @@ led1 = !led1; Thread::wait(500); led1 = !led1; - Thread::wait(30000); + Thread::wait(1000); } } \ No newline at end of file