cmmanager/cpdestinationplugin/tsrc/ut/tools/cpdestinationplugin_ctc.bat
changeset 27 489cf6208544
equal deleted inserted replaced
23:7ec726f93df1 27:489cf6208544
       
     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 Destination plugin test cases with CTC analysis.
       
    16 
       
    17 @echo off
       
    18 
       
    19 :: -----------------------------------------------------------------------------
       
    20 :: Instructions
       
    21 :: -----------------------------------------------------------------------------
       
    22 :: 
       
    23 :: Remember to use the test CommsDat that can be set and restored with the
       
    24 :: helper scripts:
       
    25 :: - commsdat_set.bat
       
    26 :: - commsdat_restore.bat
       
    27 
       
    28 call .\commsdat_set.bat
       
    29 
       
    30 ::-----------------------------------------------------------------------------
       
    31 :: Set the local variables
       
    32 ::-----------------------------------------------------------------------------
       
    33 
       
    34 :: Control Panel Destination plugin base directory
       
    35 set cpdestinationplugin_dir=..\..\..
       
    36 pushd %cpdestinationplugin_dir%
       
    37 
       
    38 :: CTC instrumentation excludes
       
    39 set ctc_excludes=-C EXCLUDE=* -C NO_EXCLUDE=src\*.cpp -C SKIP_FUNCTION_NAME=CpAddDestinationEntryItemData::createSettingView,CpDestinationEntryItemData::showErrorNote,CpIapItem::showErrorNote
       
    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\testcpdestinationplugin.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 call .\commsdat_restore.bat
       
    91 
       
    92 popd