Add a regression script! ensure testjob parsing.

This commit is contained in:
Solomon Peachy 2018-05-15 19:56:54 -04:00
parent b7e1e62e7f
commit e40ee054be
2 changed files with 72 additions and 0 deletions

42
regression.csv Normal file
View File

@ -0,0 +1,42 @@
#backend,vid,pid,type,filename
selphycp220,0x04a9,0x30bd,1,canon_cpxxx_p.raw
selphycp10,0x04a9,0x304a,2,canon_cp10_c.raw
selphycp790,0x04a9,0x31e7,3,canon_es40_cp790_p.raw
selphycp900,0x04a9,0x3255,4,canon_cp900_p.raw
selphyes1,0x04a9,0x3141,6,canon_es1_p.raw
selphyes3,0x04a9,0x31af,8,canon_es3_es30_p.raw
selphyes40,0x04a9,0x31ee,9,canon_es40_cp790_p.raw
kodak1400,0x040a,0x4022,10,kodak_1400_letter_matte.raw
kodak805,0x040a,0x4034,10,kodak_805_letter_glossy.raw
kodak6800,0x040a,0x402b,11,kodak_68x0_4x6.raw
kodak6850,0x040a,0x402b,12,kodak_68x0_4x6.raw
kodak305,0x040a,0x404f,13,kodak_305_4x6-16bpp.raw
kodak305,0x040a,0x404f,13,kodak_305_4x6-8bpp.raw
kodak605,0x040a,0x402e,14,kodak_605_4x6.raw
kodak605,0x040a,0x402e,14,kodak_605_8x6.raw
shinkos1245,0x10ce,0x0007,15,shinko_s1245_8x10.raw
shinkos2145,0x10ce,0x000e,16,shinko_s2145_4x6.raw
shinkos6145,0x10ce,0x0019,17,shinko_s6145_4x6.raw
sonyupdr150,0x054c,0x01e8,20,sony_updr150_4x6.raw
sonyupdr150,0x054c,0x01e8,20,sony_updr150_8x6.raw
sonyupdr200,0x054c,0x01e8,20,sony_updr200_2x6.raw
sonyupdr200,0x054c,0x01e8,20,sony_updr200_4x6.raw
mitsu9550,0x06d3,0x03a1,22,mitsu_9550_4x6.raw
mitsu9600,0x06d3,0x03a9,24,mitsu_9600_4x6.raw
mitsu9600,0x06d3,0x03a9,24,mitsu_9600_4x6-gp.raw
mitsu9800,0x06d3,0x03ad,25,mitsu_9800_4x6-12bpp.raw
mitsu9800,0x06d3,0x03ad,25,mitsu_9800_4x6-8bpp.raw
mitsu70x,0x06d3,0x3b30,28,mitsu_d70x_4x6-16bpp.raw
mitsu70x,0x06d3,0x3b30,28,mitsu_d70x_4x6-8bpp.raw
mitsu70x,0x06d3,0x3b30,28,mitsu_d70x_8x6-8bpp.raw
mitsud90,0x06d3,0x3b60,30,mitsu_d90_4x6.raw
mitsuk60,0x06d3,0x3b31,31,mitsu_k60_4x6-16bpp.raw
mitsuk60,0x06d3,0x3b31,31,mitsu_k60_4x6-8bpp.raw
mitsup93d,0x06d3,0x0398,32,mitsu_p93d-1280x1920.raw
mitsup95d,0x06d3,0x3b10,33,mitsu_p95d-1280x1920.raw
citizencw01,0x1343,0x0002,34,citizen_cw01_4x6.raw
citizencw01,0x1343,0x0002,34,citizen_cw01_6x9.raw
dnpds40,0x1343,0x0003,36,dnp_ds40_4x6.raw
dnpds80,0x1343,0x0004,38,dnp_ds80_8x12.raw
magicard,0x0c1f,0x1800,43,magicard-native.raw
magicard,0x0c1f,0x1800,43,magicard-8bpp.raw
1 #backend vid pid type filename
2 selphycp220 0x04a9 0x30bd 1 canon_cpxxx_p.raw
3 selphycp10 0x04a9 0x304a 2 canon_cp10_c.raw
4 selphycp790 0x04a9 0x31e7 3 canon_es40_cp790_p.raw
5 selphycp900 0x04a9 0x3255 4 canon_cp900_p.raw
6 selphyes1 0x04a9 0x3141 6 canon_es1_p.raw
7 selphyes3 0x04a9 0x31af 8 canon_es3_es30_p.raw
8 selphyes40 0x04a9 0x31ee 9 canon_es40_cp790_p.raw
9 kodak1400 0x040a 0x4022 10 kodak_1400_letter_matte.raw
10 kodak805 0x040a 0x4034 10 kodak_805_letter_glossy.raw
11 kodak6800 0x040a 0x402b 11 kodak_68x0_4x6.raw
12 kodak6850 0x040a 0x402b 12 kodak_68x0_4x6.raw
13 kodak305 0x040a 0x404f 13 kodak_305_4x6-16bpp.raw
14 kodak305 0x040a 0x404f 13 kodak_305_4x6-8bpp.raw
15 kodak605 0x040a 0x402e 14 kodak_605_4x6.raw
16 kodak605 0x040a 0x402e 14 kodak_605_8x6.raw
17 shinkos1245 0x10ce 0x0007 15 shinko_s1245_8x10.raw
18 shinkos2145 0x10ce 0x000e 16 shinko_s2145_4x6.raw
19 shinkos6145 0x10ce 0x0019 17 shinko_s6145_4x6.raw
20 sonyupdr150 0x054c 0x01e8 20 sony_updr150_4x6.raw
21 sonyupdr150 0x054c 0x01e8 20 sony_updr150_8x6.raw
22 sonyupdr200 0x054c 0x01e8 20 sony_updr200_2x6.raw
23 sonyupdr200 0x054c 0x01e8 20 sony_updr200_4x6.raw
24 mitsu9550 0x06d3 0x03a1 22 mitsu_9550_4x6.raw
25 mitsu9600 0x06d3 0x03a9 24 mitsu_9600_4x6.raw
26 mitsu9600 0x06d3 0x03a9 24 mitsu_9600_4x6-gp.raw
27 mitsu9800 0x06d3 0x03ad 25 mitsu_9800_4x6-12bpp.raw
28 mitsu9800 0x06d3 0x03ad 25 mitsu_9800_4x6-8bpp.raw
29 mitsu70x 0x06d3 0x3b30 28 mitsu_d70x_4x6-16bpp.raw
30 mitsu70x 0x06d3 0x3b30 28 mitsu_d70x_4x6-8bpp.raw
31 mitsu70x 0x06d3 0x3b30 28 mitsu_d70x_8x6-8bpp.raw
32 mitsud90 0x06d3 0x3b60 30 mitsu_d90_4x6.raw
33 mitsuk60 0x06d3 0x3b31 31 mitsu_k60_4x6-16bpp.raw
34 mitsuk60 0x06d3 0x3b31 31 mitsu_k60_4x6-8bpp.raw
35 mitsup93d 0x06d3 0x0398 32 mitsu_p93d-1280x1920.raw
36 mitsup95d 0x06d3 0x3b10 33 mitsu_p95d-1280x1920.raw
37 citizencw01 0x1343 0x0002 34 citizen_cw01_4x6.raw
38 citizencw01 0x1343 0x0002 34 citizen_cw01_6x9.raw
39 dnpds40 0x1343 0x0003 36 dnp_ds40_4x6.raw
40 dnpds80 0x1343 0x0004 38 dnp_ds80_8x12.raw
41 magicard 0x0c1f 0x1800 43 magicard-native.raw
42 magicard 0x0c1f 0x1800 43 magicard-8bpp.raw

30
regression.pl Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/perl
use strict;
my @array;
while (<STDIN>) {
chomp;
next if /^#/;
my @row = split(/,/);
$ENV{"TEST_MODE"} = "2";
$ENV{"BACKEND"} = $row[0];
$ENV{"EXTRA_VID"} = $row[1];
$ENV{"EXTRA_PID"} = $row[2];
$ENV{"EXTRA_TYPE"} = $row[3];
print "***** $row[0] $row[1] $row[2] $row[3] $row[4]\n";
my @args = ("valgrind", "./dyesub_backend", "testjobs/${row[4]}");
my $rval = system(@args);
if ($rval < 0) {
print "***** FAIL: failure to launch ($rval)\n";
} elsif ($rval > 0) {
print "***** FAIL: failure to parse/execute ($rval)\n";
} else {
print "***** PASS\n";
}
}