File: qatomemtest.pl

package info (click to toggle)
emboss 6.6.0%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 571,544 kB
  • sloc: ansic: 460,579; java: 29,439; perl: 13,573; sh: 12,754; makefile: 3,283; csh: 706; asm: 351; xml: 239; pascal: 237; modula3: 8
file content (57 lines) | stat: -rwxr-xr-x 1,151 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/perl -w

$checkinst = "/homes/pmr/check/bin/";

open (VERSION, "embossversion -full -auto|") || die "Unable to run embossversion";
while(<VERSION>) {
    if(/^InstallDirectory:\s+(\S+)/) {
	$embossinst = "$1/bin/";
    }
}
close VERSION;

%ignore = ("emnu" => "stdin input",
	   "mse" => "stdin input",
           "fretree" => "stdin input"
);

%count = ();

%unknownapps = ();

while (<>) {
    if(/^[\#]/){
	next;
    }
    else {
	if(/^(\S+)/) {$app = $1}
	else {$app = "qatest"}
	if(defined($ignore{$app})) {next}
	$num = ++$count{$app};
	if(-e "$embossinst/$app") {
	    s/^(\S+) +/$1-qa$num = $1 /;
	}
	elsif (-e "$checkinst/$app") {
	    s/^(\S+) +/$1-qa$num =test= $1 /;
	}
	else {
	    if(!defined($unknownapps{$app})) {
		print STDERR "Unknown application $app\n";
		$unknownapps{$app}=0;
	    }
	    $unknownapps{$app}++;
	}
	s/[\[](-[^\]]+)[\]]//gos;
	s/([ ,:\@])\.\.\/([^.])/$1..\/..\/qa\/$2/gos;
#	s/([ ,:\@])\.\.\/\.\.\/([^.])/$1..\/$2/gos;
	s/  / /gos;
    }
    s/ -auto Y//;
    s/ -auto//;
    s/$/ -auto/;
    print;
}

foreach $a (sort(keys(%unknownapps))) {
    print STDERR "Unknown $unknownapps{$a} times '$a'\n";
}