kerneltest/e32test/group/lock.pl
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 # Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of the License "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 # Called from MNT.BAT to do some PVCS stuff.
       
    15 # 
       
    16 #
       
    17 
       
    18 use strict;
       
    19 
       
    20 if($#ARGV !=1) {
       
    21   print <<EOH;
       
    22 Usage: lock.pl <rune1> <rune2>
       
    23 
       
    24 Basically, only call this from mnt.bat
       
    25 
       
    26 EOH
       
    27 exit 1;	  
       
    28 }
       
    29 
       
    30   
       
    31 open(X, "/E32TEST/group/dir.prj") || die "Can't find the directory list, $!";
       
    32 
       
    33 #Slurp
       
    34 my @dirs=<X>;
       
    35 
       
    36 close X;
       
    37 
       
    38 # Zap comments
       
    39 foreach (@dirs) {
       
    40   if(/!/) {
       
    41 	s/^(.*)!.*/$1/;
       
    42   }
       
    43 }
       
    44 
       
    45 chomp @dirs;
       
    46 
       
    47 # Now the weird runes
       
    48 
       
    49 if(-e "locktmp.bat") {
       
    50   unlink "locktmp.bat";
       
    51 }
       
    52 
       
    53 open(X, ">locktmp.bat") || die "Can't create file $!";
       
    54 print X "\@echo off\n";
       
    55 print X "\@call cont E32TEST %1\n";
       
    56 print X "\@call $ARGV[0] li.prj $ARGV[1]\n";
       
    57 close X;
       
    58 
       
    59 foreach (grep /\w/, @dirs) {
       
    60   system("locktmp.bat $_");
       
    61 }
       
    62 
       
    63 # Remove the evidence
       
    64 unlink "locktmp.bat";
       
    65 
       
    66 exit 0;