cmmanager/cppacketdataapplugin/tsrc/ut/tools/cppacketdataapplugin_ctc.bat
changeset 20 9c97ad6591ae
equal deleted inserted replaced
18:fcbbe021d614 20:9c97ad6591ae
       
     1 ::
       
     2 :: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 :: All rights reserved.
       
     4 :: This component and the accompanying materials are made available
       
     5 :: under the terms of "Eclipse Public License v1.0"
       
     6 :: which accompanies this distribution, and is available
       
     7 :: at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 ::
       
     9 :: Initial Contributors:
       
    10 :: Nokia Corporation - initial contribution.
       
    11 ::
       
    12 :: Contributors:
       
    13 ::
       
    14 :: Description:
       
    15 :: Script running Control Panel packet data AP plugin test cases with CTC
       
    16 :: analysis.
       
    17 
       
    18 @echo off
       
    19 
       
    20 :: -----------------------------------------------------------------------------
       
    21 :: Instructions
       
    22 :: -----------------------------------------------------------------------------
       
    23 :: 
       
    24 :: Remember to use the test CommsDat that can be set and restored with the
       
    25 :: helper scripts:
       
    26 :: - commsdat_set.bat
       
    27 :: - commsdat_restore.bat
       
    28 
       
    29 ::-----------------------------------------------------------------------------
       
    30 :: Set the local variables
       
    31 ::-----------------------------------------------------------------------------
       
    32 
       
    33 :: Control Panel packet data AP plugin base directory
       
    34 set cppacketdataapplugin_dir=..\..\..
       
    35 pushd %cppacketdataapplugin_dir%
       
    36 
       
    37 :: CTC instrumentation excludes
       
    38 set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp
       
    39 
       
    40 
       
    41 ::-----------------------------------------------------------------------------
       
    42 :: Remove old coverage data
       
    43 ::-----------------------------------------------------------------------------
       
    44 
       
    45 echo Cleaning up...
       
    46 del MON.* ctcerr.txt profile.txt
       
    47 rd /s /q CTCHTML
       
    48 echo ...done
       
    49 
       
    50 ::-----------------------------------------------------------------------------
       
    51 :: Build & instrument code
       
    52 ::-----------------------------------------------------------------------------
       
    53 
       
    54 echo Building code and instrumenting..
       
    55 call del MON.* ctcerr.txt profile.txt
       
    56 call make distclean
       
    57 call qmake
       
    58 call ctcwrap -i d -2comp %ctc_excludes% sbs -c winscw_udeb
       
    59 echo ...done
       
    60 
       
    61 ::-----------------------------------------------------------------------------
       
    62 :: Build test code
       
    63 ::-----------------------------------------------------------------------------
       
    64 
       
    65 echo Building test code...
       
    66 call cd tsrc\ut
       
    67 call make distclean
       
    68 call qmake
       
    69 call sbs -c winscw_udeb
       
    70 echo ...done
       
    71 
       
    72 ::-----------------------------------------------------------------------------
       
    73 :: Execute the tests
       
    74 ::-----------------------------------------------------------------------------
       
    75 
       
    76 echo Running tests..
       
    77 cd ..\..
       
    78 call \epoc32\release\winscw\udeb\testcppacketdataapplugin.exe
       
    79 echo ...done
       
    80 
       
    81 ::-----------------------------------------------------------------------------
       
    82 :: Create coverage results
       
    83 ::-----------------------------------------------------------------------------
       
    84 
       
    85 echo Creating results...
       
    86 call ctcpost -p profile.txt
       
    87 call ctc2html -i profile.txt
       
    88 echo ...done
       
    89 
       
    90 popd