Project

General

Profile

How do I run the test suite for Exiv2 » History » Version 3

Robin Mills, 01 Apr 2013 22:04

1 1 Robin Mills
h1. How do I run the test suite for Exiv2
2
3
You can run the test suite on MacOSX, Linux and Windows.  To run on Windows, you will need to install Cygwin because the test suite is written as Bash scripts.  You can run the test suite on Cygwin on exiv2 built with MSVC, Cygwin or MinGW.
4
5 2 Robin Mills
For *nix builds (Mac/Cygwin/Linux), in the topmost directory:
6 1 Robin Mills
<pre>
7
$ cd <exiv2dir>
8 3 Robin Mills
TAKE CARE: If you build with ./configure; make - you will need to build the samples to run the test suite
9
TAKE CARE: If you build with ./configure; make - you will need the utility pkg-config to build the samples
10
TAKE CARE: Users of CMake/msvc64/msvc have the samples built automatically
11 1 Robin Mills
$ make tests          # This tests most exiv2 capability
12
.....
13
$ make teste          # This tests EPS functionality (downloads and caches 20mb of test data)
14
....
15
$ make testv          # This tests Video functionality (downloads and caches 50mb of test data)
16
...
17
</pre>For MSVC and MSVC64 builds, please define the environment string EXIV2_BINDIR to be the name of the directory in which exiv2.exe (and other applications) are built:
18
<pre>$  make tests EXIV2_BINDIR=$PWD/msvc64/bin/Win32/ReleaseDLL</pre>Take care, Cygwin is case sensitive about path/filenames.
19
20
On Mac/Linux, the suite runs in about 1 minute. On Cygwin, it's about 5 minutes.
21
22
You can run the tests individually from the <exiv2dir>/test directory:<pre>
23
1013 rmills@rmills-linux:~/gnu/exiv2/test.build/test $ ls *.sh
24 2 Robin Mills
addmoddel.sh      crw-test.sh    exiv2-test.sh   iptctest.sh
25
preview-test.sh   tiff-test.sh   write2-test.sh  bugfixes-test.sh
26
eps-test.sh       imagetest.sh   modify-test.sh  stringto-test.sh
27
verifyMSVC.sh     write-test.sh  conversions.sh  exifdata-test.sh
28
iotest.sh         path-test.sh   testMSVC.sh     video-test.sh
29
xmpparser-test.sh
30
31 1 Robin Mills
1014 rmills@rmills-linux:~/gnu/exiv2/test.build/test $ ./bugfixes-test.sh
32
426 440 443 444 445 447 452 460 479 480 495 498 501 528 540 554 662 666 683 711 726 751 769 799 800 831 (836 skipped) 841 876 
33
all testcases passed.</pre>
34
If all is good, it will produce a short output mostly saying 'all testcases passed.'.
35
36
If you encounter issues - large amounts of inexplicable output - you should run test/*.sh individually to identify which test (or tests) are failing, and read the code of the failing script.  Mosts tests use reference files in <exiv2dir>/test/data to create files in <exiv2dir>/test/tmp/ and files are output files are differences between the reference and the generated output.
37
38
Here are the results today (2013-01-18).  Of course the output of the test suite will change as exiv2 evolves. 
39
<pre>
40
1007 rmills@rmills-linux:~/gnu/exiv2/test.build $ make tests
41
cd test && make test
42
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
43
Running addmoddel.sh ...
44
all testcases passed.
45
Running bugfixes-test.sh ...
46
426 440 443 444 445 447 452 460 479 480 495 498 501 528 540 554 662 666 683 711 726 751 769 799 800 831 (836 skipped) 841 876 
47
all testcases passed.
48
Running exifdata-test.sh ...
49
all testcases passed.
50
Running exiv2-test.sh ...
51
all testcases passed.
52
Running imagetest.sh ...
53
54
Erase all tests..................
55
Copy all tests.........
56
Copy iptc tests.........
57
---------------------------------------------------------
58
All test cases passed
59
Running iotest.sh ...
60
61
Io tests...
62
---------------------------------------------------------
63
All test cases passed
64
Running iptctest.sh ...
65
66
Read tests..................
67
Remove tests..................
68
Add/Mod tests..................
69
Extended tests..................
70
---------------------------------------------------------
71
All test cases passed
72
Running modify-test.sh ...
73
all testcases passed.
74
Running path-test.sh ...
75
Running preview-test.sh ...
76
............................................................................................
77
All testcases passed.
78
Running stringto-test.sh ...
79
all testcases passed.
80
Running tiff-test.sh ...
81
tiff-test.sh: exifprobe not found. Skipping TIFF tests.
82
Running write-test.sh ...
83
all testcases passed.
84
Running write2-test.sh ...
85
all testcases passed.
86
Running xmpparser-test.sh ...
87
all testcases passed.
88
Running conversions.sh ...
89
all testcases passed.
90
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
91
1008 rmills@rmills-linux:~/gnu/exiv2/test.build $ make teste
92
cd test && make teste
93
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
94
Running eps-test.sh ...
95
.............................................................................................................
96
All testcases passed.
97
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
98
1009 rmills@rmills-linux:~/gnu/exiv2/test.build $ make testv
99
cd test && make testv
100
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
101
Running video-test.sh ...
102
.......
103
All testcases passed.
104
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
105
1010 rmills@rmills-linux:~/gnu/exiv2/test.build $ 
106
</pre>