logsui/tsrc/unittestrunner/unittest_qt.pl
changeset 21 2f0af9ba7665
parent 0 4a5361db8937
equal deleted inserted replaced
18:acd4e87b24b4 21:2f0af9ba7665
    27 $projectdrive = "z:"; #is set to correct at run-time 
    27 $projectdrive = "z:"; #is set to correct at run-time 
    28 
    28 
    29 $unitTestRunner = "unittest_qt.pl";
    29 $unitTestRunner = "unittest_qt.pl";
    30 $scriptLocation = "logsui/tsrc/unittestrunner";
    30 $scriptLocation = "logsui/tsrc/unittestrunner";
    31 $coverageResultsDirDefault = "logsui/tsrc/unittestrunner/qtresults/";
    31 $coverageResultsDirDefault = "logsui/tsrc/unittestrunner/qtresults/";
       
    32 $coverageResultsDirFunctional = "logsui/tsrc/unittestrunner/qtfunctionalresults";
    32 $testConfigDefault = "unittest_qt_config.txt";
    33 $testConfigDefault = "unittest_qt_config.txt";
    33 $qtProFileDefault = "tsrc.pro";
    34 $qtProFileDefault = "tsrc.pro";
    34 $buildResults = "BuildResults.txt";
    35 $buildResults = "BuildResults.txt";
    35 $coverageDat = "MON.dat";
    36 $coverageDat = "MON.dat";
    36 $coverageSymbols = "MON.sym";
    37 $coverageSymbols = "MON.sym";
    45 $xmlResultLine = "Incident";
    46 $xmlResultLine = "Incident";
    46 $xmlCaseFailed = "failed";
    47 $xmlCaseFailed = "failed";
    47 $xmlCasePassed = "pass";
    48 $xmlCasePassed = "pass";
    48 $outputString = "";
    49 $outputString = "";
    49 $outputFileBodyStart = "<body";
    50 $outputFileBodyStart = "<body";
       
    51 
       
    52 $qmakeConfig = "-config coverage";
    50 
    53 
    51 $totalCount = 0;
    54 $totalCount = 0;
    52 $passedCount = 0;
    55 $passedCount = 0;
    53 $failedCount = 0;
    56 $failedCount = 0;
    54 
    57 
    97 	
   100 	
    98 # create textual output
   101 # create textual output
    99 chdir("$coverageResultsDir");
   102 chdir("$coverageResultsDir");
   100 doSystemCall("ctcpost $coverageSymbols $coverageDat -p $coverageProfile -T 70");
   103 doSystemCall("ctcpost $coverageSymbols $coverageDat -p $coverageProfile -T 70");
   101 doSystemCall("ctc2html -i $coverageProfile -t 70");
   104 doSystemCall("ctc2html -i $coverageProfile -t 70");
       
   105 $coverageResultsDirFunctional = "$projectdrive$projectrootname$coverageResultsDirFunctional";
       
   106 doSystemCall("ctcpost $coverageSymbols $coverageDat -ff -p $coverageProfile");
       
   107 doSystemCall("ctc2html -i $coverageProfile -o $coverageResultsDirFunctional");
   102 
   108 
   103 # clear target for intrumentation result
   109 # clear target for intrumentation result
   104 $ENV{'CTC_DATA_PATH'}= "";	
   110 $ENV{'CTC_DATA_PATH'}= "";	
   105 
   111 
   106 combineResults();
   112 combineResults();
   218 {
   224 {
   219     if ( !defined $qtProFile ){
   225     if ( !defined $qtProFile ){
   220         print("Pro file not defined, using default. \n");
   226         print("Pro file not defined, using default. \n");
   221         $qtProFile = $qtProFileDefault;
   227         $qtProFile = $qtProFileDefault;
   222     }
   228     }
   223     doSystemCall( "qmake $qtProFile" );
   229     doSystemCall( "qmake $qtProFile $qmakeConfig" );
   224     doSystemCall( "sbs reallyclean" );
   230     doSystemCall( "sbs reallyclean" );
   225     doSystemCall( "qmake $qtProFile" );
   231     doSystemCall( "qmake $qtProFile $qmakeConfig" );
   226     
   232     
   227     $exclude = "-C \"EXCLUDE+*\tsrc\*\" -C \"EXCLUDE+*/*/tsrc/*\" -C \"EXCLUDE+*/*/*/tsrc/*\" -C \"EXCLUDE+moc_*\"";
   233     $exclude = "-C \"EXCLUDE+*\tsrc\*\" -C \"EXCLUDE+*/*/tsrc/*\" -C \"EXCLUDE+*/*/*/tsrc/*\" -C \"EXCLUDE+moc_*\"";
   228     
   234     
   229     doSystemCall( "call ctcwrap -i d -n $coverageResultsDir$coverageSymbols $exclude -2comp sbs.bat -c winscw_udeb" );
   235     doSystemCall( "call ctcwrap -i d -n $coverageResultsDir$coverageSymbols $exclude -2comp sbs.bat -c winscw_udeb" );
   230 }
   236 }