fork
Configure Feed
Select the types of activity you want to include in your feed.
this repo has no description
fork
Configure Feed
Select the types of activity you want to include in your feed.
1#!/usr/bin/perl -w
2use File::Basename;
3
4$directory = $ARGV[0];
5
6open (EXAMPLES, "find $directory/examples -maxdepth 1 -type f ! -name '*.*' |");
7
8while (my $x = <EXAMPLES>) {
9 chomp($x);
10 my ($filename, $dummydir, $suffix) = fileparse($x);
11
12 open (HELP, "$x -help 2>&1 |");
13 my @prop;
14 my @model;
15 while (my $l = <HELP>) {
16 if ($l =~ /-propagation \((.*)\)/) {
17 $l1 = $1;
18 $l1 =~ s/ //g;
19 @prop = split(/,/, $l1);
20 } elsif ($l =~ /-model \((.*)\)/) {
21 $l1 = $1;
22 $l1 =~ s/ //g;
23 @model = split(/,/, $l1);
24 }
25 }
26 if (scalar(@prop) == 0) {
27 if (scalar(@model) == 0) {
28 runexample($directory,$filename);
29 } else {
30 foreach $m (@model) {
31 runexample($directory,"$filename -model $m");
32 }
33 }
34 } else {
35 foreach $p (@prop) {
36 if (scalar(@model) == 0) {
37 runexample($directory,"$filename -propagation $p");
38 } else {
39 foreach $m (@model) {
40 runexample($directory,"$filename -propagation $p -model $m");
41 }
42 }
43 }
44 }
45 close (HELP);
46}
47close (EXAMPLES);
48
49sub runexample {
50 $directory = $_[0];
51 $filename = $_[1];
52 print "------------------------------------------------------------\n";
53 print "Running $filename\n";
54 open (EX, "$directory/examples/$filename -time 120000 2>&1 |");
55 while ($l = <EX>) {
56 print $l;
57 }
58 close (EX);
59 print "------------------------------------------------------------\n";
60}