Thanks Ravi for your reply on my confusion and Sorry for a week delay . I got now that within a test case [say pvplayer_async_test_newdelete] , source is cheking some conditions through PVPATB_TEST_IS_TRUE(condition) , that is actually resulting a success [if condition is TRUE ] or a failure [if condition is false ]
#define PVPATB_TEST_IS_TRUE(condition) (iTestCase->test_is_true_stub( (condition), (#condition), __FILE__, __LINE__ )) This macro maps those to external/opencore/oscl/unit_test/src/test_case.cpp file which check the conditions , then number of success/failure are accumulated and printed out . Thanks Again . Uander On Tue, Mar 23, 2010 at 11:40 PM, RaviY <[email protected]> wrote: > For each test case, ::StartTest( ) is called. In here, the active > object (AO) is added to the scheduler. > <code> > void pvplayer_async_test_newdelete::StartTest() > { > AddToScheduler(); > RunIfNotReady(); > } > </code> > > After RunIfNotReady( ) is called, the scheduler will call the ::Run( ) > of the AO which will keep do the rest of the work. > > You can put breakpoints to see the exact code flow. > > -Ravi > > On Mar 23, 4:42 am, Uander <[email protected]> wrote: > > On Mon, Mar 22, 2010 at 4:49 PM, Deva R <[email protected]> wrote: > > > > I want to ask why it shows 1 success and 1 failure . there should be > only > > > 1 > > > > pass or 1 fail only . Do each test case have multiple sub-tests > within > > > them > > > > ? > which class in source code finally decide whether it is pass or > fail > > > ? . > > > > > Looks like some bookkeeping gone wrong.. > > > couldnt track how/why.. (file and source below) > > > > > link: > > >http://android.git.kernel.org/?p=platform/external/opencore.git;a=blo. > .. > > > > > FILE: MYDROID > > > \external\opencore\engines\player\test\src\test_pv_player_engine.cpp > > > > > source: > > > void pvplayer_engine_test::TestCompleted(test_case &tc) > > > { > > > // Print out the result for this test case > > > const test_result the_result = tc.last_result(); > > > fprintf(file, "Results for Test Case %d:\n", iCurrentTestNumber); > > > fprintf(file, " Successes %d, Failures %d\n" > > > , the_result.success_count() - iTotalSuccess, > > > the_result.failures().size() - iTotalFail); > > > > > fprintf(file, "the_result.success_count(%d) - iTotalSuccess > (%d), > > > the_result.failures().size(%d) iTotalFail(%d)" > > > , the_result.success_count(), iTotalSuccess, > > > the_result.failures().size() ,iTotalFail); > > > fflush(file); > > > > > This section of code is just printing the final test result after > > > > execution of test case . > > > > In > > > (MYDROID)/external/opencore/engines/player/test/src/test_pv_player_engine.cpp.These > > part of code > > if (iCurrentTest) > > { > > OsclExecScheduler *sched = OsclExecScheduler::Current(); > > if (sched) > > { > > // Print out the test name > > fprintf(file, "WWW = %s\n", > > iCurrentTest->iTestCaseName.get_cstr()); > > // Start the test > > iCurrentTest->StartTest(); > > // Start the scheduler so the test case would run > > #if USE_NATIVE_SCHEDULER > > // Have PV scheduler use the scheduler native to the > system > > sched->StartNativeScheduler(); > > #else > > // Have PV scheduler use its own implementation of the > > scheduler > > sched->StartScheduler(); > > #endif > > } > > > > The iCurrentTest->StartTest() is actually runing the test case and that > > calls somehow to > > [(MYDROID)/external/opencore/oscl/unit_test/src/test_case.cpp] > > test_case::run_subtests(void) , test_case::run_test(void) functions . > > > > Can someone please tell me how a test case (for eg. class > > pvplayer_async_test_newdelete : public pvplayer_async_test_base > > ) is calling these test case functions . > > > > how 1 success and 1 failure being counted per test case ? > > > > Thanks : > > Uander > > > > > > > > > On Mon, Mar 22, 2010 at 11:32 AM, Uander <[email protected]> wrote: > > > > Hi All , > > > > > > Here is what I got while running a test case of open core . > > > > > > *************** > > > > # pvplayer_engine_test -test 1 1 > > > > SDK Labeled: PVDEV_CORE_RELEASE_6.506.4.1 built on 20090312 > > > > > > Test Program for pvPlayer engine class. > > > > Input file name 'test.mp4' > > > > Test case range 1 to 1 > > > > Compressed output Video(No) Audio(No) > > > > Log level 8; Log node 0 Log Text 0 Log Mem 0 > > > > > > Starting Test 1: Open-Play-Stop-Reset > > > > Results for Test Case 1: > > > > Successes 1, Failures 1 > > > > Total Execution time for file test.mp4 is : 2.712000 seconds# > > > > *************** > > > > > > I want to ask why it shows 1 success and 1 failure . there should be > only > > > 1 > > > > pass or 1 fail only . Do each test case have multiple sub-tests > within > > > them > > > > ? > > > > which class in source code finally decide whether it is pass or fail > ? . > > > > > > Thanks : > > > > Uander > > > > > > -- > > > > unsubscribe: > > > > [email protected]<android-porting%[email protected]> > <android-porting%[email protected]<android-porting%[email protected]> > > > > > > website:http://groups.google.com/group/android-porting > > > > > > To unsubscribe from this group, send email to > > > > android-porting+unsubscribegooglegroups.com or reply to this email > with > > > the > > > > words "REMOVE ME" as the subject. > > -- > unsubscribe: > [email protected]<android-porting%[email protected]> > website: http://groups.google.com/group/android-porting > > To unsubscribe from this group, send email to android-porting+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting To unsubscribe from this group, send email to android-porting+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
