Project

General

Profile

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

Robin Mills, 09 Mar 2015 22:44

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 5 Robin Mills
For *nix builds (Mac/Cygwin/Linux), in the topmost directory use the following commands:<pre>$ cd <exiv2dir>
6 4 Robin Mills
$ make config
7
$ ./configure
8
$ make
9 1 Robin Mills
$ sudo make install
10 4 Robin Mills
$ make samples
11
$ make tests
12 5 Robin Mills
</pre>For users who prefer to use CMake:<pre>
13 1 Robin Mills
$ cd <exiv2dir>
14 4 Robin Mills
$ rmdir ../build
15
$ mkdir ../build
16
$ cd ../build
17
$ cmake <exiv2dir> -G "Unix Makefiles"
18 1 Robin Mills
$ make
19 5 Robin Mills
$ make tests</pre>There are a few things which may cause you difficulty.  You need the utility pkg-config to build the samples.  Here are some additional notes. <pre>$ cd <exiv2dir>
20 1 Robin Mills
TAKE CARE: If you build with ./configure; make - you will need to build the samples to run the test suite
21 3 Robin Mills
TAKE CARE: If you build with ./configure; make - you will need the utility pkg-config to build the samples
22 1 Robin Mills
TAKE CARE: Users of CMake/msvc64/msvc have the samples built automatically
23 3 Robin Mills
$ make tests          # This tests most exiv2 capability
24
.....
25 1 Robin Mills
$ make teste          # This tests EPS functionality (downloads and caches 20mb of test data)
26
....
27
$ make testv          # This tests Video functionality (downloads and caches 50mb of test data)
28
...
29 5 Robin Mills
</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:<pre>$  make tests EXIV2_BINDIR=$PWD/msvc64/bin/Win32/ReleaseDLL</pre>Take care, Cygwin is case sensitive about path/filenames.
30 1 Robin Mills
31
On Mac/Linux, the suite runs in about 1 minute. On Cygwin, it's about 5 minutes.
32
33 5 Robin Mills
You can run the tests individually from the <exiv2dir>/test directory:<pre>1013 rmills@rmills-linux:~/gnu/exiv2/test.build/test $ ls *.sh
34 1 Robin Mills
addmoddel.sh      crw-test.sh    exiv2-test.sh   iptctest.sh
35
preview-test.sh   tiff-test.sh   write2-test.sh  bugfixes-test.sh
36 2 Robin Mills
eps-test.sh       imagetest.sh   modify-test.sh  stringto-test.sh
37
verifyMSVC.sh     write-test.sh  conversions.sh  exifdata-test.sh
38
iotest.sh         path-test.sh   testMSVC.sh     video-test.sh
39
xmpparser-test.sh
40
41 1 Robin Mills
1014 rmills@rmills-linux:~/gnu/exiv2/test.build/test $ ./bugfixes-test.sh
42
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 
43 5 Robin Mills
all testcases passed.</pre>If all is good, it will produce a short output mostly saying 'all testcases passed.'.
44 1 Robin Mills
45
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.
46
47 5 Robin Mills
Here are the results today (2013-01-18).  Of course the output of the test suite will change as exiv2 evolves. <pre>1007 rmills@rmills-linux:~/gnu/exiv2/test.build $ make tests
48 1 Robin Mills
cd test && make test
49
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
50
Running addmoddel.sh ...
51
all testcases passed.
52
Running bugfixes-test.sh ...
53
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 
54
all testcases passed.
55
Running exifdata-test.sh ...
56
all testcases passed.
57
Running exiv2-test.sh ...
58
all testcases passed.
59
Running imagetest.sh ...
60
61
Erase all tests..................
62
Copy all tests.........
63
Copy iptc tests.........
64
---------------------------------------------------------
65
All test cases passed
66
Running iotest.sh ...
67
68
Io tests...
69
---------------------------------------------------------
70
All test cases passed
71
Running iptctest.sh ...
72
73
Read tests..................
74
Remove tests..................
75
Add/Mod tests..................
76
Extended tests..................
77
---------------------------------------------------------
78
All test cases passed
79
Running modify-test.sh ...
80
all testcases passed.
81
Running path-test.sh ...
82
Running preview-test.sh ...
83
............................................................................................
84
All testcases passed.
85
Running stringto-test.sh ...
86
all testcases passed.
87
Running tiff-test.sh ...
88
tiff-test.sh: exifprobe not found. Skipping TIFF tests.
89
Running write-test.sh ...
90
all testcases passed.
91
Running write2-test.sh ...
92
all testcases passed.
93
Running xmpparser-test.sh ...
94
all testcases passed.
95
Running conversions.sh ...
96
all testcases passed.
97
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
98
1008 rmills@rmills-linux:~/gnu/exiv2/test.build $ make teste
99
cd test && make teste
100
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
101
Running eps-test.sh ...
102
.............................................................................................................
103
All testcases passed.
104
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
105
1009 rmills@rmills-linux:~/gnu/exiv2/test.build $ make testv
106
cd test && make testv
107
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
108
Running video-test.sh ...
109
.......
110
All testcases passed.
111
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
112 5 Robin Mills
1010 rmills@rmills-linux:~/gnu/exiv2/test.build $ </pre>