sl@0: # sl@0: # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: # All rights reserved. sl@0: # This component and the accompanying materials are made available sl@0: # under the terms of the License "Eclipse Public License v1.0" sl@0: # which accompanies this distribution, and is available sl@0: # at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: # sl@0: # Initial Contributors: sl@0: # Nokia Corporation - initial contribution. sl@0: # sl@0: # Contributors: sl@0: # sl@0: # Description: sl@0: # sl@0: # sl@0: sl@0: use strict; sl@0: sl@0: chdir "scripts" or die "$!"; sl@0: sl@0: print "======================================\n"; sl@0: print "USBTESTLOOP starts\n"; sl@0: print localtime()."\n"; sl@0: print "======================================\n"; sl@0: sl@0: unless (-e "h4testsusbcv.bat") sl@0: { sl@0: print "Cannot find h4testsusbcv.bat\n"; sl@0: exit 0; sl@0: } sl@0: unless (-e "h4tests.bat") sl@0: { sl@0: print "Cannot find h4tests.bat\n"; sl@0: exit 0; sl@0: } sl@0: sl@0: while (1) sl@0: { sl@0: my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); sl@0: # Sod USBCV for the time being sl@0: # if ($wday == 5) # It's Friday ! sl@0: # { sl@0: # print localtime().": Start h4testsusbcv.bat\n"; sl@0: # system "h4testsusbcv.bat"; sl@0: # print localtime().": Execution of h4testsusbcv.bat complete\n"; sl@0: # } sl@0: # else sl@0: # { sl@0: print localtime().": Start h4tests.bat\n"; sl@0: system "h4tests.bat"; sl@0: print localtime().": Execution of h4tests.bat complete\n"; sl@0: # } sl@0: ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); sl@0: my $prefix = sprintf("%04d%02d%02d%02d%02d%02d", $year+1900, $mon+1, $mday, $hour, $min, $sec); sl@0: system "COPY /Y ..\\Results\\h4tests.log ..\\${prefix}_h4tests.log"; sl@0: system "COPY /Y ..\\Results\\h4performance.log ..\\${prefix}_h4performance.log"; sl@0: }