diff -r 000000000000 -r 96612d01cf9f tsrc/testing/tools/selgesubdirs.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tsrc/testing/tools/selgesubdirs.pl Mon Jan 18 20:21:12 2010 +0200 @@ -0,0 +1,156 @@ +# +# Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + + +#------------------------------------------------------------------------------------ +# Includes +#------------------------------------------------------------------------------------ +#use strict; +use warnings; +use Cwd; # for cwd +use FindBin; # for FindBin:Bin +use File::Path; # for mkpath +use Date::Calc; + +#------------------------------------------------------------------------------------ +# GLOBAL CODE +#------------------------------------------------------------------------------------ + +my $argcount = scalar(@ARGV); + +if(scalar(@ARGV) > 0) +{ + ShowHelp(); + exit(); +} + +print("This script deletes mobilecrashes and result directory from ./Selge.\nPress CTRL-C to quit, enter to continue.\n"); +$input = <>; +exit if($input eq "q"); + +my @dirs; +my $startDir = cwd; + +FindFiles(".", 1, "", \@dirs, "case_*"); + +foreach my $dir(@dirs) +{ + $dir =~ s/\//\\/g; #whitespaces in the end + system("del selge\\mobilecrash_*.bin\n"); + + print("copy $dir\\mobilecrash_*.bin selge\\\n"); + system("copy $dir\\mobilecrash_*.bin selge\\"); + + print("cd selge\n"); + chdir("selge"); + + print("selge.exe -m\n"); + system("selge.exe -m"); + + print("copy results\\ $dir\\\n"); + system("copy results\\ $dir\\"); + + + print("del mobilecrash_*.bin\n"); + system("del mobilecrash_*.bin"); + + print("rmdir /s /q results\\\n"); + system("rmdir /s /q results\\"); + + chdir(".."); +} + +chdir($startDir); + +exit(); + +#------------------------------------------------------------------------------------ +# ShowHelp +#------------------------------------------------------------------------------------ +sub ShowHelp { + +print <