diff -r 735348f59235 -r 948c7f65f6d4 mmtestenv/mmtesttools/Scripts/RunTests.bat --- a/mmtestenv/mmtesttools/Scripts/RunTests.bat Tue Aug 31 16:43:06 2010 +0300 +++ b/mmtestenv/mmtesttools/Scripts/RunTests.bat Wed Sep 01 12:38:50 2010 +0100 @@ -367,58 +367,88 @@ my $regex = quotemeta $EpocCDrive; $ScriptFile =~ s/$regex//gi; + # We must decide if the test needs to be run using epoc or the test framework. This is + # done by looking for _WM (Window Manager) appended to the script name. + # NB. This only applies to Typhoon, Jetstream is unaffected. - #alloc tests must be run under debug - if($ScriptFile =~ /_recog_alloc.script/i) - { - $Cmd = "$RecogUdebTestFramework $ScriptFile"; + if (!(-f $eka2IdentifyFile) && ($ScriptFile =~ /_wm.script/i)) # This script must be run using epoc and the recogniser + { + # First create the recogniser config file + my $line1 = "// This file is generated by runtests.bat\n"; + my $line2 = "RUN_SCRIPT\n"; + my $line3 = ""; + + #alloc tests must be run under debug + if($ScriptFile =~ /_alloc_wm.script/i) + { + $Cmd = "$UdebEpocEmulator"; + $line3 = "C:$ScriptFile -t 15000000\n"; } - elsif($ScriptFile =~ /_nocap_alloc.script/i) + else + { + $Cmd = "$UrelEpocEmulator"; + $line3 = "C:$ScriptFile 15000000\n"; + } + open(RECOGNISER_CFG_FILE,">$RecogniserCfgFile") or die "Could not open $RecogniserCfgFile for writing\n"; + print RECOGNISER_CFG_FILE $line1, $line2, $line3; + close(RECOGNISER_CFG_FILE); + } + else # This script can be run from the test framework + { + #alloc tests must be run under debug + if($ScriptFile =~ /_recog_alloc.script/i) + { + $Cmd = "$RecogUdebTestFramework $ScriptFile"; + } + elsif($ScriptFile =~ /_nocap_alloc.script/i) { $Cmd = "$NoneUdebTestFramework $ScriptFile"; } - elsif(($ScriptFile =~ /_alloc.script/i) || ($ScriptFile =~ /_alloc_wm.script/i) || ($ScriptFile =~ /_debug.script/i) || ($optctl{"d"}) ) + elsif(($ScriptFile =~ /_alloc.script/i) || ($ScriptFile =~ /_alloc_wm.script/i) || ($ScriptFile =~ /_debug.script/i) || ($optctl{"d"}) ) { $Cmd = "$UdebTestFramework $ScriptFile"; } - elsif($ScriptFile =~ /_recog.script/i) + elsif($ScriptFile =~ /_recog.script/i) { $Cmd = "$RecogUrelTestFramework $ScriptFile"; } - elsif($ScriptFile =~ /_nocap.script/i) + elsif($ScriptFile =~ /_nocap.script/i) { $Cmd = "$NoneUrelTestFramework $ScriptFile"; } - elsif($ScriptFile =~ /_mmddcap.script/i) + elsif($ScriptFile =~ /_mmddcap.script/i) { $Cmd = "$MMDDCapUrelTestFramework $ScriptFile"; } - elsif($ScriptFile =~ /_uecap.script/i) + elsif($ScriptFile =~ /_uecap.script/i) { $Cmd = "$UECapUrelTestFramework $ScriptFile"; } - elsif($ScriptFile =~ /_secdisp.script/i) + elsif($ScriptFile =~ /_secdisp.script/i) { #Take a backup of the existing ini files to .OLD and copy our ini files from the current dir to \epoc folders - if(!(system($copy_ini_secdisp)==0)) + if(!(system($copy_ini_secdisp)==0)) { print "Failure to execute - $Cmd: $!"; print TESTRUNLOG "Failure to execute - $Cmd: $!\n"; } - $Cmd = "$UrelTestFramework $ScriptFile"; - } - elsif($ScriptFile =~ /\\te_/i) - { - $Cmd = "$UdebTestExecute $ScriptFile"; - } - elsif($ScriptFile =~ /_te.script/i) - { - $Cmd = "$UdebTestExecute $ScriptFile"; - } - else + $Cmd = "$UrelTestFramework $ScriptFile"; + } + elsif($ScriptFile =~ /\\te_/i) + { + $Cmd = "$UdebTestExecute $ScriptFile"; + } + elsif($ScriptFile =~ /_te.script/i) + { + $Cmd = "$UdebTestExecute $ScriptFile"; + } + else { $Cmd = "$UrelTestFramework $ScriptFile"; } + } + + ($sec,my $min,my $hour,my $mday,my $mon,my $year,my $wday,my $yday,my $isdst) = localtime(time); print "Starting script at $hour:$min:$sec\n";