summaryrefslogtreecommitdiff
path: root/regenerate_raw.pl
blob: 70fc6fca5c2db406b700665c8450bfcbc466974a (plain)
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
#!/usr/bin/perl

$html = 1;

sub GenRaw {

    $VSDVL = '1 2 5 6 11 vdx vsdx';

    @vsdVersionList = split( /\s+/, $VSDVL );

    foreach $vsdVersion (@vsdVersionList) {

        # remove all diff files, since they are possible outdated now
        $diffs = 'testset/' . $vsdVersion . '/*.diff';
        `rm -f $diffs`;

        $regrInput = 'testset/' . $vsdVersion . '/regression.in';
        $FL        = `cat $regrInput`;

        @fileList = split( /\n/, $FL );
        foreach $file (@fileList) {
            $filePath = 'testset/' . $vsdVersion . '/' . $file;
            `vsd2raw $filePath >$filePath.raw 2>&1`;
            `vsd2xhtml $filePath > $filePath.xhtml 2> /dev/null`;
            `xmllint --c14n --nonet --dropdtd $filePath.xhtml > $filePath.xhtml.tmp 2>/dev/null`;
            `xmllint --format $filePath.xhtml.tmp > $filePath.xhtml 2>/dev/null`;
            `rm $filePath.xhtml.tmp`;
            `vsd2odg $filePath > $filePath.odg 2> /dev/null`;
            `xmllint --c14n --nonet --dropdtd $filePath.odg > $filePath.odg.tmp 2>/dev/null`;
            `xmllint --format $filePath.odg.tmp > $filePath.odg 2>/dev/null`;
            `rm $filePath.odg.tmp`;
            `vss2raw $filePath >$filePath.sraw 2>&1`;
            `vss2xhtml $filePath > $filePath.sxhtml 2> /dev/null`;
            `xmllint --c14n --nonet --dropdtd $filePath.sxhtml > $filePath.sxhtml.tmp 2>/dev/null`;
            `xmllint --format $filePath.sxhtml.tmp > $filePath.sxhtml 2>/dev/null`;
            `rm $filePath.sxhtml.tmp`;
            `vss2odg $filePath > $filePath.sodg 2> /dev/null`;
            `xmllint --c14n --nonet --dropdtd $filePath.sodg > $filePath.sodg.tmp 2>/dev/null`;
            `xmllint --format $filePath.sodg.tmp > $filePath.sodg 2>/dev/null`;
            `rm $filePath.sodg.tmp`;
        }
    }
}

# Main function
&GenRaw;

1;