read Blackboard data correctly from the SFC file, and construct a BlackboardPart...
[openc2e.git] / runtests.pl
blob45072a677f0f8dcd6038de693cb8d8c4775f0b04
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use Test::Harness qw(&runtests $verbose);
6 my @tests = glob("unittests/*.cos");
7 my @testfiles = ();
9 for my $test (@tests) {
10 my @variants = ();
11 if ($test =~ /\.((c[123av])(,c[123av])*)\.cos$/) {
12 for my $v (split /,/, $1) {
13 push @variants,$v;
16 if (@variants == 0) {
17 @variants = ('c3');
20 #my $varr = '("'.join("\",\"",@variants).'")';
21 for my $v (@variants) {
22 my $wrapper = $test;
23 $wrapper =~ s/(\.[c123av,]*)?\.cos$/.$v.pl/;
24 open FILE, ">$wrapper";
25 print FILE <<EOF;
26 #!/usr/bin/perl
27 exec("./openc2e", "-n", "-d", "$v"."data", "-g", "$v", "-b", "$test");
28 EOF
29 close FILE;
30 chmod 0700, $wrapper;
31 push @testfiles,$wrapper;
35 $verbose = 0;
36 runtests(@testfiles);
37 map { unlink } @testfiles;