File: run

package info (click to toggle)
sslh 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,960 kB
  • sloc: ansic: 7,681; perl: 683; sh: 356; makefile: 136
file content (30 lines) | stat: -rwxr-xr-x 555 bytes parent folder | download
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
#! /usr/bin/perl -w

# This runs all the tests.

# Tests scripts are in *.tst files.
# Corresponding output is put in *.out.
# Reference output is put in *.ref.
# Any discrepancy will be reported!

use strict;

my @res;
foreach my $fn (`ls *.tst`) {
    chomp $fn;
    my $cmd = "./htest $fn $fn.out";
    print "$cmd\n";
    `$cmd`;
    my $res = system("diff -u $fn.ref $fn.out");
    push @res, [$fn, ($res == 0 ? "OK" : "*KO*")];
}

format =
@<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>
$_->[0], $_->[1]
.


#format_name STDOUT test_result;
map { write; } @res;