Project

General

Profile

Actions

How do I run the test suite for Exiv2

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.

For *nix builds (Mac/Cygwin/Linux), in the topmost directory use the following commands:

$ cd <exiv2dir>
$ make config
$ ./configure
$ make
$ sudo make install
$ make samples
$ make tests
For users who prefer to use CMake:
$ cd <exiv2dir>
$ rmdir ../build
$ mkdir ../build
$ cd ../build
$ cmake <exiv2dir> -G "Unix Makefiles" 
$ make
$ make tests
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.
$ cd <exiv2dir>
TAKE CARE: If you build with ./configure; make - you will need to build the samples to run the test suite
TAKE CARE: If you build with ./configure; make - you will need the utility pkg-config to build the samples
TAKE CARE: Users of CMake/msvc have the samples built automatically
$ make tests          # This tests most exiv2 capability
.....
$ make teste          # This tests EPS functionality (downloads and caches 20mb of test data)
....
$ make testv          # This tests Video functionality (downloads and caches 50mb of test data)
...
For msvc2003 and msvc2005 builds, please define the environment string EXIV2_BINDIR to be the name of the directory in which exiv2.exe (and other applications) are built:
$  make tests EXIV2_BINDIR=$PWD/msvc2005/bin/Win32/ReleaseDLL
Take care, Cygwin is case sensitive about path/filenames.

On Mac/Linux, the suite runs in about 1 minute. On Cygwin, it's about 5 minutes.

You can run the tests individually from the <exiv2dir>/test directory:

1013 rmills@rmills-linux:~/gnu/exiv2/test.build/test $ ls *.sh
addmoddel.sh      crw-test.sh    exiv2-test.sh   iptctest.sh
preview-test.sh   tiff-test.sh   write2-test.sh  bugfixes-test.sh
eps-test.sh       imagetest.sh   modify-test.sh  stringto-test.sh
verifyMSVC.sh     write-test.sh  conversions.sh  exifdata-test.sh
iotest.sh         path-test.sh   testMSVC.sh     video-test.sh
xmpparser-test.sh

1014 rmills@rmills-linux:~/gnu/exiv2/test.build/test $ ./bugfixes-test.sh
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 
all testcases passed.
If all is good, it will produce a short output mostly saying 'all testcases passed.'.

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.

Here are the results today (2013-01-18). Of course the output of the test suite will change as exiv2 evolves.

1007 rmills@rmills-linux:~/gnu/exiv2/test.build $ make tests
cd test && make test
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
Running addmoddel.sh ...
all testcases passed.
Running bugfixes-test.sh ...
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 
all testcases passed.
Running exifdata-test.sh ...
all testcases passed.
Running exiv2-test.sh ...
all testcases passed.
Running imagetest.sh ...

Erase all tests..................
Copy all tests.........
Copy iptc tests.........
---------------------------------------------------------
All test cases passed
Running iotest.sh ...

Io tests...
---------------------------------------------------------
All test cases passed
Running iptctest.sh ...

Read tests..................
Remove tests..................
Add/Mod tests..................
Extended tests..................
---------------------------------------------------------
All test cases passed
Running modify-test.sh ...
all testcases passed.
Running path-test.sh ...
Running preview-test.sh ...
............................................................................................
All testcases passed.
Running stringto-test.sh ...
all testcases passed.
Running tiff-test.sh ...
tiff-test.sh: exifprobe not found. Skipping TIFF tests.
Running write-test.sh ...
all testcases passed.
Running write2-test.sh ...
all testcases passed.
Running xmpparser-test.sh ...
all testcases passed.
Running conversions.sh ...
all testcases passed.
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
1008 rmills@rmills-linux:~/gnu/exiv2/test.build $ make teste
cd test && make teste
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
Running eps-test.sh ...
.............................................................................................................
All testcases passed.
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
1009 rmills@rmills-linux:~/gnu/exiv2/test.build $ make testv
cd test && make testv
make[1]: Entering directory `/home/rmills/gnu/exiv2/test.build/test'
Running video-test.sh ...
.......
All testcases passed.
make[1]: Leaving directory `/home/rmills/gnu/exiv2/test.build/test'
1010 rmills@rmills-linux:~/gnu/exiv2/test.build $ 

Updated by Robin Mills over 5 years ago ยท 6 revisions