File: test_norm.pl

package info (click to toggle)
sphinxtrain 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,572 kB
  • sloc: ansic: 94,052; perl: 8,939; python: 6,702; cpp: 2,044; makefile: 6
file content (27 lines) | stat: -rwxr-xr-x 918 bytes parent folder | download | duplicates (7)
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
#!/usr/local/bin/perl

use strict;
use File::Copy;
require './scripts/testlib.pl';

chomp(my $host=`../config.guess | xargs ../config.sub`);
my $bindir="../bin.$host/";
my $resdir="res/";
my $exec_resdir="norm";
my $bin="$bindir$exec_resdir";
my $bin_printp="${bindir}printp";
my $out="globalmean.out";

test_help($bindir,$exec_resdir);
test_example($bindir,$exec_resdir);

my @params=(1,3,6,12,25,50,100) ;
foreach my $i (@params)
{
    copy("init_gau/gauden_counts.$i","./gauden_counts");
    test_this("$bin -accumdir . -meanfn ./globalmean",$exec_resdir,"Dry run accumulate the global mean from init_gau $i");
#    copy("./globalmean","./norm/globalmean.$i");
    test_this("${bin_printp} -gaufn ./globalmean > $out ",$exec_resdir,"Print output of norm");
    compare_these_two($out,"./norm/test_globalmean.$i.txt",$exec_resdir,"norm, generate global mean. ");
    unlink("./gauden_counts",$out,"./globalmean");
}