cleanup_0.27

v0.27.3
Robin Mills 5 years ago
parent 431c2caec7
commit 591f9e62b4

@ -52,7 +52,7 @@ The file ReadMe.txt in a build bundle describes how to install the library on th
5. [Platform Notes](#5) 5. [Platform Notes](#5)
1. [Linux](#5-1) 1. [Linux](#5-1)
2. [macOS](#5-2) 2. [macOS](#5-2)
3. [MinGW](#5-3) 3. [MinGW/msys2](#5-3)
4. [Cygwin](#5-4) 4. [Cygwin](#5-4)
5. [Microsoft Visual C++](#5-5) 5. [Microsoft Visual C++](#5-5)
6. [Unix](#5-6) 6. [Unix](#5-6)
@ -560,7 +560,16 @@ In order to use the same instance of a class concurrently in multiple threads th
The level of thread safety within Exiv2 varies depending on the type of metadata: The Exif and IPTC code is reentrant. The XMP code uses the Adobe XMP toolkit (XMP SDK), which according to its documentation is thread-safe. It actually uses mutexes to serialize critical sections. However, the XMP SDK initialisation function is not mutex protected, thus Exiv2::XmpParser::initialize is not thread-safe. In addition, Exiv2::XmpProperties::registerNs writes to a static class variable, and is also not thread-safe. The level of thread safety within Exiv2 varies depending on the type of metadata: The Exif and IPTC code is reentrant. The XMP code uses the Adobe XMP toolkit (XMP SDK), which according to its documentation is thread-safe. It actually uses mutexes to serialize critical sections. However, the XMP SDK initialisation function is not mutex protected, thus Exiv2::XmpParser::initialize is not thread-safe. In addition, Exiv2::XmpProperties::registerNs writes to a static class variable, and is also not thread-safe.
Therefore, multi-threaded applications need to ensure that these two XMP functions are serialized, e.g., by calling them from an initialization section which is run before any threads are started. Therefore, multi-threaded applications need to ensure that these two XMP functions are serialized, e.g., by calling them from an initialization section which is run before any threads are started. All exiv2 sample applications begin with:
```c++
int main(int argc, const char* argv[])
{
Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate);
...
}
```
[TOC](#TOC) [TOC](#TOC)
@ -574,7 +583,7 @@ Adobe's XMPsdk is generally thread-safe, however it has to be initialized and te
The exiv2 command-line program and sample applications call the following at the outset: The exiv2 command-line program and sample applications call the following at the outset:
``` ```c++
Exiv2::XmpParser::initialize(); Exiv2::XmpParser::initialize();
::atexit(Exiv2::XmpParser::terminate); ::atexit(Exiv2::XmpParser::terminate);
``` ```
@ -698,7 +707,7 @@ You will find that 3 tests fail at the end of the test suite. It is safe to ign
Exiv2 uses the default compiler for your system. Exiv2 v0.27 was written to the C++ 1998 standard and uses auto\_ptr. The C++11 and C++14 compilers will issue deprecation warnings about auto\_ptr. As _auto\_ptr support has been removed from C++17, you cannot build Exiv2 v0.27 with C++17 or later compilers._ Exiv2 v0.28 and later do not use auto\_ptr and will build with all modern C++ Standard Compilers. Exiv2 uses the default compiler for your system. Exiv2 v0.27 was written to the C++ 1998 standard and uses auto\_ptr. The C++11 and C++14 compilers will issue deprecation warnings about auto\_ptr. As _auto\_ptr support has been removed from C++17, you cannot build Exiv2 v0.27 with C++17 or later compilers._ Exiv2 v0.28 and later do not use auto\_ptr and will build with all modern C++ Standard Compilers.
To generate a build with C++11: To build with C++11:
```bash ```bash
$ cd <exiv2dir> $ cd <exiv2dir>
@ -709,7 +718,9 @@ $ make
The option -DCMAKE\_CXX\_STANDARD=11 specifies the C++ Language Standard. Possible values are 98, 11 or 14. The option -DCMAKE\_CXX\_STANDARD=11 specifies the C++ Language Standard. Possible values are 98, 11 or 14.
The option -DCMAKE\_CXX\_FLAGS=-Wno-deprecated suppresses warnings from C++11 concerning auto\_ptr and other deprecated features. **Caution:** Visual Studio users should not use -DCMAKE\_CXX\_FLAGS=-Wno-deprecated. The option -DCMAKE\_CXX\_FLAGS=-Wno-deprecated suppresses warnings from C++11 concerning auto\_ptr. The compiler will issue deprecation warnings about video, eps and ssh code in Exiv2 v0.27. This is intentional. These features of Exiv2 will not be available in Exiv2 v0.28.
**Caution:** Visual Studio users should not use -DCMAKE\_CXX\_FLAGS=-Wno-deprecated.
[TOC](#TOC) [TOC](#TOC)
@ -763,7 +774,7 @@ For new bug reports and feature requests, please open an issue in Github.
| Unit tests | C++ | \<exiv2dir\>/unitTests | $ make unit_test | -DEXIV2\_BUILD\_UNIT\_TESTS=On | | Unit tests | C++ | \<exiv2dir\>/unitTests | $ make unit_test | -DEXIV2\_BUILD\_UNIT\_TESTS=On |
| Version test | C++ | \<exiv2dir\>/src/version.cpp | $ make version_test | Always in library | | Version test | C++ | \<exiv2dir\>/src/version.cpp | $ make version_test | Always in library |
_**Caution Visual Studio Users using cmd.exe**_<br>_You may use MinGW/msys2 `make` to to execute tests in the test directory. To execute tests from the build directory, use `cmake`. This is discussed in detail below: [Running tests on Visual Studio builds](#4-2)_ _**Caution: Visual Studio Users using cmd.exe**_<br>_You may use MinGW/msys2 `make` to to execute tests in the test directory. To execute tests from the build directory, use `cmake`. This is discussed in detail below: [Running tests on Visual Studio builds](#4-2)_
#### Environment Variables used by the test suite: #### Environment Variables used by the test suite:
@ -771,7 +782,7 @@ If you build the code in the directory \<exiv2dir\>build, tests will run using t
| Variable | Default | Platforms | Purpose | | Variable | Default | Platforms | Purpose |
|:-- |:-- |:-- |:-- | |:-- |:-- |:-- |:-- |
| EXIV2_BINDIR | **\<exiv2dir\>/build/bin** | All Platforms | Location of built binary objects (exiv2.exe) | | EXIV2_BINDIR | **\<exiv2dir\>/build/bin** | All Platforms | Path of built binaries (exiv2.exe) |
| EXIV2_PORT | **12762**<br>**12671**<br>**12760** | Cygwin<br>MinGW/msys2<br>Other Platforms | Test TCP/IP Port | | EXIV2_PORT | **12762**<br>**12671**<br>**12760** | Cygwin<br>MinGW/msys2<br>Other Platforms | Test TCP/IP Port |
| EXIV2_HTTP | **http://localhost** | All Platforms | Test http server | | EXIV2_HTTP | **http://localhost** | All Platforms | Test http server |
| EXIV2_EXT | **.exe** | msvc<br>Cygwin<br>MinGW/msys2 | Extension used by executable binaries | | EXIV2_EXT | **.exe** | msvc<br>Cygwin<br>MinGW/msys2 | Extension used by executable binaries |
@ -779,6 +790,7 @@ If you build the code in the directory \<exiv2dir\>build, tests will run using t
| EXIV2_ECHO | _**not set**_ | All Platforms | For debugging Bash scripts | | EXIV2_ECHO | _**not set**_ | All Platforms | For debugging Bash scripts |
| VALGRIND | _**not set**_ | All Platforms | For debugging Bash scripts | | VALGRIND | _**not set**_ | All Platforms | For debugging Bash scripts |
| VERBOSE | _**not set**_ | All Platforms | Causes make to report its actions | | VERBOSE | _**not set**_ | All Platforms | Causes make to report its actions |
| PATH<br>DYLD\_LIBRARY\_PATH<br>LD\_LIBRARY\_PATH | $EXIV2\_BINDIR/../lib | Windows<br>macOS<br>Other platforms | Path of dynamic libraries |
The Variable EXIV2\_PORT or EXIV2\_HTTP can be set to None to skip http tests. The http server is started with the command `python3 -m http.server $port`. On Windows, you will need to run this manually _**once**_ to authorise the firewall to permit python to use the port. The Variable EXIV2\_PORT or EXIV2\_HTTP can be set to None to skip http tests. The http server is started with the command `python3 -m http.server $port`. On Windows, you will need to run this manually _**once**_ to authorise the firewall to permit python to use the port.
@ -913,6 +925,17 @@ The code for the unit tests is in `<exiv2dir>/unitTests`. To include unit tests
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575) There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
```bash
$ pushd /tmp
$ curl -LO https://github.com/google/googletest/archive/release-1.8.0.tar.gz
$ tar xzf release-1.8.0.tar.gz
$ mkdir -p googletest-release-1.8.0/build
$ pushd googletest-release-1.8.0/build
$ cmake .. ; make ; make install
$ popd
$ popd
```
[TOC](#TOC) [TOC](#TOC)
<div id="4-4"> <div id="4-4">
@ -936,6 +959,7 @@ The python tests are stored in the directory `tests` and you can run them all wi
```bash ```bash
$ cd <exiv2dir>/tests $ cd <exiv2dir>/tests
$ export LD_LIBRARY_PATH="$PWD/../build/lib:$LD_LIBRARY_PATH"
$ python3 runner.py $ python3 runner.py
``` ```
@ -949,7 +973,7 @@ $ python3 runner.py --verbose bugfixes/redmine/test_issue_841.py # or $(find .
You may wish to get a brief summary of failures with commands such as: You may wish to get a brief summary of failures with commands such as:
```bash ```bash
$ cd <exiv2dir>/build ( or cd <exiv2dir>/test) $ cd <exiv2dir>/build (or cd <exiv2dir>/test)
$ make python_tests 2>&1 | grep FAIL $ make python_tests 2>&1 | grep FAIL
``` ```
@ -960,12 +984,12 @@ $ make python_tests 2>&1 | grep FAIL
| *Tests* | Unix Style Platforms _(bash)_ | Visual Studio _(cmd.exe)_ | | *Tests* | Unix Style Platforms _(bash)_ | Visual Studio _(cmd.exe)_ |
|:-- |:--- |:-- | |:-- |:--- |:-- |
| | $ cd \<exiv2dir\>/build or $ cd \<exiv2dir\>/test | \> cd \<exiv2dir\>/build | | | $ cd \<exiv2dir\>/build **or**<br> $ cd \<exiv2dir\>/test | \> cd \<exiv2dir\>/build |
| all | $ make tests | \> cmake --build . --config Release --target tests | | tests | $ make tests | \> cmake --build . --config Release --target tests |
| bash | $ make bash_tests | \> cmake --build . --config Release --target bash_tests | | bash_tests | $ make bash_tests | \> cmake --build . --config Release --target bash_tests |
| python | $ make python_tests | \> cmake --build . --config Release --target python_tests | | python_tests | $ make python_tests | \> cmake --build . --config Release --target python_tests |
| unit | $ make unit_test | \> cmake --build . --config Release --target unit_test | | unit_test | $ make unit_test | \> cmake --build . --config Release --target unit_test |
| version | $ make version_test | \> cmake --build . --config Release --target version_test | | version_test | $ make version_test | \> cmake --build . --config Release --target version_test |
[TOC](#TOC) [TOC](#TOC)
@ -986,6 +1010,8 @@ $ sudo apt --yes update
$ sudo apt install --yes build-essential git clang ccache python3 libxml2-utils cmake python3 libexpat1-dev libz-dev zlib1g-dev libssh-dev libcurl4-openssl-dev libgtest-dev google-mock $ sudo apt install --yes build-essential git clang ccache python3 libxml2-utils cmake python3 libexpat1-dev libz-dev zlib1g-dev libssh-dev libcurl4-openssl-dev libgtest-dev google-mock
``` ```
For users of other platforms, the script <exiv2dir>/ci/install_dependencies.sh has code used to configure many platforms. The code in that file is a useful guide to configuring your platform.
Get the code from GitHub and build Get the code from GitHub and build
```bash ```bash
@ -1012,12 +1038,10 @@ I recommend that you build and install CMake from source.
[TOC](#TOC) [TOC](#TOC)
<div id="5-3"> <div id="5-3">
### 5.3 MinGW ### 5.3 MinGW/msys2
Please note that the platform MinGW/msys2 32 is obsolete and superceded by MinGW/msys2 64. Please note that the platform MinGW/msys2 32 is obsolete and superceded by MinGW/msys2 64.
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
#### MinGW/msys2 64 bit #### MinGW/msys2 64 bit
Install: [http://repo.msys2.org/distrib/x86_64/msys2-x86\_64-20190524.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe) Install: [http://repo.msys2.org/distrib/x86_64/msys2-x86\_64-20190524.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20190524.exe)
@ -1040,7 +1064,7 @@ endlocal
Install tools and dependencies: Install tools and dependencies:
```bash ```bash
$ for i in base-devel git cmake coreutils python3 man gcc gdb make dos2unix diffutils zlib-devel libexpat-devel libiconv-devel gettext-devel; do (echo y|pacman -S $i); done $ for i in base-devel git cmake coreutils python3 man gcc gdb make dos2unix tar diffutils zlib-devel libexpat-devel libiconv-devel gettext-devel; do (echo y|pacman -S $i); done
``` ```
#### Download exiv2 from github and build #### Download exiv2 from github and build
@ -1076,14 +1100,7 @@ Please note that the platform Cygwin/32 is obsolete and superceded by Cygwin/64.
Download: [https://cygwin.com/install.html](https://cygwin.com/install.html) and run setup-x86_64.exe. I install into c:\\cygwin64 Download: [https://cygwin.com/install.html](https://cygwin.com/install.html) and run setup-x86_64.exe. I install into c:\\cygwin64
You need: You need:
make, cmake, gcc, gettext-devel pkg-config, dos2unix, zlib-devel, libexpat1-devel, git, python3-interpreter, libiconv, libxml2-utils, libncurses. make, cmake, curl, gcc, gettext-devel pkg-config, dos2unix, tar, zlib-devel, libexpat1-devel, git, python3-interpreter, libiconv, libxml2-utils, libncurses.
Download and build libiconv-1.15: [https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz](https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz)
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
Download and build cmake from source because I can't get the cygwin installed cmake 3.6.2 to work.
To build cmake from source, you need libncurses. [https://cmake.org/download/](https://cmake.org/download/)
I use the following batch file "cygwin64.bat" to start the Cygwin/64 bash shell from the Dos Command Prompt (cmd.exe). I use the following batch file "cygwin64.bat" to start the Cygwin/64 bash shell from the Dos Command Prompt (cmd.exe).
@ -1139,7 +1156,6 @@ endlocal
[TOC](#TOC) [TOC](#TOC)
<div id="5-6"> <div id="5-6">
### 5.6 Unix ### 5.6 Unix
Exiv2 can be built on many Unix and Linux distros. With v0.27.2, we are starting to actively support the Unix Distributions NetBSD and FreeBSD. For v0.27.3, I have added support for Solaris 11.4 Exiv2 can be built on many Unix and Linux distros. With v0.27.2, we are starting to actively support the Unix Distributions NetBSD and FreeBSD. For v0.27.3, I have added support for Solaris 11.4
@ -1229,5 +1245,5 @@ $ sudo pkg install developer/gcc-7
[TOC](#TOC) [TOC](#TOC)
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2020-05-17 Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2020-05-20

@ -74,6 +74,7 @@ SVN = svn://dev.exiv2.org/svn/testdata/trunk
# Add test drivers to this list # Add test drivers to this list
TESTS = addmoddel.sh \ TESTS = addmoddel.sh \
conversions.sh \ conversions.sh \
crw-test.sh \
exifdata-test.sh \ exifdata-test.sh \
exiv2-test.sh \ exiv2-test.sh \
geotag-test.sh \ geotag-test.sh \
@ -92,21 +93,9 @@ TESTS = addmoddel.sh \
write2-test.sh \ write2-test.sh \
xmpparser-test.sh xmpparser-test.sh
# video tests
TESTV = video-test.sh
TESTVW = write-video-test.sh
# EPS tests
TESTE = eps-test.sh \
eps-preview-test.sh
# webready tests
TESTX = httpiotest.sh \
curliotest.sh \
sshiotest.sh
addmoddel \ addmoddel \
conversions \ conversions \
crw-test \
geotag-test \ geotag-test \
icc-test \ icc-test \
iso65k-test \ iso65k-test \
@ -159,62 +148,17 @@ python_tests:
@echo @echo
@echo ---- Running python_tests ---- @echo ---- Running python_tests ----
@echo @echo
-( source functions.source ; cd ../tests ; if [ ! -z $$VERBOSE ]; then verbose=--verbose ;fi ; python3 runner.py $$verbose ) -( . functions.source ; cd ../tests ; if [ ! -z $$VERBOSE ]; then verbose=--verbose ;fi ; python3 runner.py $$verbose )
testv:
@for t in /video ; do \
if [ ! -e data/$$t ]; then \
echo svn export '$(SVN)'$$t data$$t -r 3100 ; \
svn export '$(SVN)'$$t data$$t -r 3100 ; \
fi ; done
@list='$(TESTV)'; for p in $$list; do \
echo Running $$p ...; \
./$$p; \
done
testvw:
@for t in /video ; do \
if [ ! -e data/$$t ]; then \
echo svn export '$(SVN)'$$t data$$t ; \
svn export '$(SVN)'$$t data$$t ; \
fi ; done
@list='$(TESTVW)'; for p in $$list; do \
echo Running $$p ...; \
./$$p; \
done
teste:
@for t in /eps ; do \
if [ ! -e data/$$t ]; then \
echo svn export '$(SVN)'$$t data$$t ; \
svn export '$(SVN)'$$t data$$t ; \
fi ; done
@list='$(TESTE)'; for p in $$list; do \
echo Running $$p ...; \
./$$p; \
rc=$$?; \
if [ $$rc -ne 0 ]; then \
echo result = $$rc ; \
exit $$rc ; \
fi ; \
done
testx:
@list='$(TESTX)'; for p in $$list; do \
echo Running $$p ...; \
./$$p; \
done
mostlyclean clean: mostlyclean clean:
rm -rf $(top_srcdir)/test/tmp/* rm -rf $(top_srcdir)/test/tmp/*
distclean: clean distclean: clean
$(RM) *~ *.bak *# $(RM) *~ *.bak $(top_srcdir)/data/tmp
# This command is intended for maintainers to use; it deletes files # This command is intended for maintainers
# that may need special tools to rebuild.
maintainer-clean: distclean maintainer-clean: distclean
rm -rf $(top_srcdir)/data/video $(top_srcdir)/test/data/eps rm -rf $(top_srcdir)/data/tmp
# That's all Folks! # That's all Folks!
## ##

@ -1,855 +0,0 @@
#!/usr/bin/env bash
# Test driver with regression tests for bugfixes
source ./functions.source
( cd "$testdir"
num=426
filename=`prep_file $num`
runTest exiv2 -u -pi $filename
num=440
filename=`prep_file $num`
runTest exiv2 -u -pi $filename
num=443
filename=`prep_file $num`
runTest exiv2 -u -b -pt $filename
num=444
filename=`prep_file $num`
runTest exiv2 -u -pi $filename
num=445
filename=`prep_file $num`
runTest exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $filename
runTest exiv2 -u -b -pt $filename
filename=exiv2-empty.jpg
copyTestFile $filename
runTest exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $filename
runTest exiv2 -u -b -pt $filename
num=447 # Problem only visible in Valgrind
filename=`prep_file $num`
runTest exiv2 -u -pi $filename
num=452
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude SRational -1/3 -2/3 -3/3" $filename
runTest exiv2 -u -pv $filename
runTest exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude Rational 1/3 2/3 3/3" $filename
runTest exiv2 -u -pv $filename
num=460
filename=`prep_file $num`
runTest exiv2 -u -pt $filename
num=479
filename=`prep_file $num`
runTest exiv2 -u -pt $filename
num=480
filename=`prep_file $num`
runTest largeiptc-test $filename $datadir/imagemagick.png
num=495
filename=`prep_file $num`
runTest exiv2 -u -pi $filename
num=498
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude 0/1 1/1 2/1" $filename
runTest exiv2 -u -v -pv $filename
runTest exiv2 -u -v -M"del Exif.GPSInfo.GPSLatitude" $filename
runTest exiv2 -u -v -pv $filename
num=501
filename=`prep_file $num`
runTest exiv2 -u -pi $filename
num=528
filename=`prep_file $num`
runTest exiv2 -u -pt $filename
runTest exiv2 -u -v -M"set Exif.Image.Software GI" $filename
num=540
filename=`prep_file $num`
runTest exiv2 -u -px $filename
num=554
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M"set Exif.Image.DateTime Date 2007-05-27" $filename
runTest exiv2 -u -pt $filename
num=662
filename=`prep_empty_file $num`
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii An ascii comment" $filename
runTest exiv2 -u -PEnh $filename
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii A\\nnewline" $filename
runTest exiv2 -u -PEnh $filename
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A Unicode comment" $filename
runTest exiv2 -u -PEnh $filename
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \\u01c4" $filename
runTest exiv2 -u -PEnh $filename
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A\\u01c4C" $filename
runTest exiv2 -u -PEnh $filename
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\\nNewline" $filename
runTest exiv2 -u -PEnh $filename
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\\tTab" $filename
runTest exiv2 -u -PEnh $filename
# Test invalid escape sequences
runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \\ugggg" $filename
runTest exiv2 -u -PEnh $filename
num=666
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M'set Exif.Image.Make NIKON' \
-M'set Exif.Image.Model D90' \
-M'set Exif.Nikon3.ShutterCount 100' \
-M'set Exif.Nikon3.SerialNumber 123' \
-M'set Exif.NikonSi02xx.Version 48 50 51 52' \
-M'set Exif.NikonSi02xx.ShutterCount 100' $filename
runTest exiv2 -u -pa -u -b $filename
num=683
filename=`prep_any_file $num exiv2-nikon-d70.jpg`
rm -f 2004-03-30-Tue-090.jpg
runTest exiv2 -u -f -r %Y-%m-%d-%a-%j $filename
ls 2004-03-30-Tue-090.jpg
num=711
printf "$num " >&3
# Little endian (II)
filename=exiv2-bug${num}-1.jpg
copyTestFile exiv2-empty.jpg $filename
echo '------>' Bug $num '<-------' >&2
runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' \
-M'set Exif.Image.DocumentName Float 0.12345' \
-M'set Exif.Image.ImageDescription Double 0.987654321' $filename
runTest exiv2 -u -v -PEkyct $filename
runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename
runTest exiv2 -u -v -PEkyct $filename
runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename
runTest exiv2 -u -v -PEkyct $filename
# Big endian (MM)
filename=exiv2-bug${num}-2.jpg
copyTestFile exiv2-kodak-dc210.jpg $filename
runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' \
-M'set Exif.Image.DocumentName Float 0.12345' \
-M'set Exif.Image.ImageDescription Double 0.987654321' $filename
runTest exiv2 -u -v -PEkyct $filename
runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename
runTest exiv2 -u -v -PEkyct $filename
runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename
runTest exiv2 -u -v -PEkyct $filename
# Test easy-access keys (using a dummy bug number)
if [ 1 = $(existsTest easyaccess-test) ]; then
num=726
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M"set Exif.Image.Make Samsung" $filename
runTest easyaccess-test $filename
else
echo "bugfixes-test.sh: easyaccess-test executable not found. Skipping regression test for issue #726."
fi
# Test 'migration of XMP namespaces' (see #751 and related forum post)
num=751
filename=`prep_empty_file $num`
xmpname=exiv2-bug$num.xmp
runTest exiv2 -v -M'reg imageapp orig/' -M 'set Xmp.imageapp.uuid abcd' $filename
runTest exiv2 -f -eX $filename
cat $xmpname
runTest exiv2 -v -M'reg imageapp dest/' -M 'set Xmp.imageapp.uuid abcd' $filename
runTest exiv2 -f -eX $filename
cat $xmpname
num=769
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M"add Exif.Image.Make Canon" -M"add Exif.CanonCs.0x0001 Short 1" -M"add Exif.CanonCs.0x0000 Short 2" $filename
runTest exiv2 -u -v -PEkyct $filename
num=784
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -px $filename
runTest exiv2 -M"add Xmp.lr.hierarchicalSubject root|1st|2nd|3rd|4th|5th" $filename
runTest exiv2 -px $filename
num=799
filename=`prep_empty_file $num`
copyTestFile bug$num.cmd
runTest exiv2 -v -m bug$num.cmd $filename
runTest exiv2 -v -pa $filename
runTest exiv2 -f -eX $filename
cat exiv2-bug$num.xmp
num=800
printf "$num " >&3
for type in 8BIM AgHg DCSR PHUT; do
for format in jpg psd; do
echo "------> Bug $num ($type in $format) <-------" >&2
filename=exiv2-bug$num-$type.$format
copyTestFile $filename
runTest exiv2 -u -v -M'set Exif.Photo.UserComment Test' $filename
runTest exiv2 -u -pt $filename
done
done
num=812 # updating a hardlinked file can "empty" the other files!
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile exiv2-bug884c.jpg bug$num.jpg
hardLinkFiles bug$num.jpg bug$num-B.jpg bug$num-C.jpg
runTest exiv2 -u -v -M"set Exif.Photo.UserComment Test Bug $num" bug$num.jpg
runTest exiv2 -PE -g UserComment bug${num}*.jpg
runTest exiv2 -u -v -M"set Exif.Photo.UserComment Test Bug $num modified" bug$num.jpg
runTest exiv2 -PE -g UserComment bug${num}*.jpg
num=816 # test Camera: Pentax + Lens:Sigma 55-200mm F4-5.6 DC is correctly reported
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
for X in a b c d e; do
filename=exiv2-bug${num}${X}.exv
copyTestFile $filename
runTest exiv2 -pa --grep Lens $filename
done
num=825 # Panasonic Manometer Tag
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
for X in a b; do
filename=exiv2-bug${num}${X}.exv
copyTestFile $filename
runTest exiv2 -pv --grep mano/i $filename
runTest exiv2 -pa --grep mano/i $filename
done
num=831
filename=exiv2-bug$num.tif
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile mini9.tif $filename
runTest exiv2 -v -Qd -M'set Exif.Image.ImageDescription Just GIMP' $filename
runTest exiv2 -v -pa $filename
num=836
filename=exiv2-bug$num.eps
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename $filename
if [ -e $filename/rsrc ]; then
printf "$num " >&3
copyTestFile $filename.rsrc $filename/rsrc
runTest exiv2 -M'set Exif.Photo.UserComment Test' $filename
diff -q $datadir/$filename.rsrc $filename/rsrc
else
# skip this test on systems which do not have resource forks
printf "($num skipped) " >&3
fi
num=841
filename=exiv2-bug$num.png
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=855
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa $filename
num=876
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa $filename | grep Model
num=884
filenames="exiv2-bug${num}a.jpg exiv2-bug${num}b.jpg exiv2-bug${num}c.jpg"
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
for filename in $filenames; do
copyTestFile $filename
runTest exiv2 -pt $filename | grep -i lenstype
done
num=922
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pX $filename ; echo '' # add a lf after the XMP/xml
filename=iptc-psAPP13-wIPTCempty-psAPP13-wIPTC.jpg
copyTestFile $filename
runTest exiv2 -pX $filename
for filename in exiv2-bug$num.png exiv2-bug$num.tif exiv2-bug${num}a.jpg; do
copyTestFile $filename ;
runTest exiv2 -pX $filename ; echo ''
runTest exiv2 -pS $filename
done
num=935
filename=`prep_empty_file $num`
runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 605/10" $filename
runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 2/3" $filename
runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 0/0" $filename
runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 605/605" $filename
runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 100/1500" $filename
runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime Ascii Test" $filename
runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename
runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename
num=937
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -q -pa -g dwc $filename
runTest exiv2 -q -PXkyctl -g Date $filename
num=937a
filename=exiv2.dc.dwc.i18n.jpg
dataname=exiv2.dc.dwc.i18n.txt
diffname=exiv2.dc.dwc.i18n.diff
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
copyTestFile $dataname
copyTestFile $diffname
runTest exiv2 -pa $filename | sort > $num-before.txt
runTest exiv2 -m $dataname $filename
runTest exiv2 -pa $filename | sort > $num-after.txt
diff $diffargs $num-before.txt $num-after.txt > $num.txt
diff $diffargs $num.txt $diffname
num=1024
filename=exiv2-bug$num.exv
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep gpsl/i $filename
num=1026
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -q -pa -g Lens $filename
num=1040
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -px $filename
num=1043 # looping and writing to a samba drive can hang!
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
for n in A B C D E F G H I J K L M N O P Q R S T U V W X Y Z; do
copyTestFile exiv2-bug884c.jpg bug${num}-$n.jpg
done
for name in bug${num}-*.jpg; do
runTest exiv2 -u -v -M"set Exif.Photo.UserComment Test Bug $num my filename is $name" $name
done
runTest exiv2 -PE -g UserComment bug${num}*.jpg
num=1044
filename=exiv2-bug$num.tif
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -q -pa -g PageNumber $filename
num=1053
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile exiv2-bug884c.jpg $filename
runTest exiv2 -PE -g ImageWidth $filename
runTest exiv2 -PE -K ImageWidth $filename
runTest exiv2 -PE -K Exif.Image.ImageWidth $filename
num=1054
filename1=exiv2-bug${num}-1.jpg
filename2=exiv2-bug${num}-2.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile BlueSquare.xmp $filename1
copyTestFile exiv2-bug784.jpg $filename2
runTest exiv2json $filename1
runTest exiv2json x $filename1
runTest exiv2json $filename2
num=1058
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile exiv2-empty.jpg $filename
# Add titles in 2 languages and one default
runTest exiv2 -M'set Xmp.dc.title lang="de-DE" GERMAN' $filename
runTest exiv2 -M'set Xmp.dc.title lang="en-GB" BRITISH' $filename
runTest exiv2 -M'set Xmp.dc.title Everybody else' $filename
runTest exiv2 -px $filename
# Remove languages, test case for the language
runTest exiv2 -M'set Xmp.dc.title lang="DE-de" german' $filename
runTest exiv2 -M'set Xmp.dc.title lang="EN-gb"' $filename
runTest exiv2 -M'set Xmp.dc.title' $filename
runTest exiv2 -px $filename
num=1062
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa -g zone $filename
num=1080
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa $filename
num=1074
filename=exiv2-bug$num.png
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pC $filename > ${num}_1.icc ; checkSum ${num}_1.icc
copyTestFile imagemagick.png
runTest exiv2 -pC imagemagick.png > ${num}_2.icc ; checkSum ${num}_2.icc
copyTestFile Reagan.tiff
runTest exiv2 -pC Reagan.tiff > ${num}_3.icc ; checkSum ${num}_3.icc
copyTestFile Reagan.jpg
runTest exiv2 -pC Reagan.jpg > ${num}_4.icc ; checkSum ${num}_4.icc
num=1108
filename=exiv2-bug$num.exv
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pR $filename
copyTestFile imagemagick.png
runTest exiv2 -pR imagemagick.png
copyTestFile ReaganLargeTiff.tiff
runTest exiv2 -pR ReaganLargeTiff.tiff
copyTestFile Reagan.jpg
runTest exiv2 -pR Reagan.jpg
echo ''
num=1112
filename=exiv2-bug$num.xmp
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -M 'del Xmp.dc.title' $filename
cat $filename
echo ''
num=1114
filename=exiv2-bug$num.jpg
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pv -g TuneAdj $filename
num=1122
filename=exiv2-bug$num.exv
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pv -g Lens $filename
runTest exiv2 -pa -g Lens $filename
num=1137
filename=exiv2-bug$num.exv
printf "$num " >&3
echo '------>' Bug $num '<-------' >&2
copyTestFile Stonehenge.exv $filename
copyTestFile Stonehenge.exv
runTest exiv2 -PkV --grep GPSL $filename
runTest exiv2 -PkV --grep GPSL Stonehenge.exv | runTest exiv2 -m- $filename
runTest exiv2 -pa --grep GPSL $filename
num=1140
printf "$num " >&3
filename=exiv2-bug$num.exv
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa -g Lens $filename
num=1144
printf "$num " >&3
for i in a b c d e f g; do
filename=exiv2-bug$num$i.exv
echo '------>' Bug $num$i '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa -g Lens $filename
done
num=1145
printf "$num " >&3
for i in a b c d e; do
filename=exiv2-bug$num$i.exv
echo '------>' Bug $num$i '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa -g Lens $filename
done
num=1153
printf "$num " >&3
for E in A J; do for i in a b c d e f g h i j k; do
filename=exiv2-bug$num${E}${i}.exv
echo '------>' Bug $num${E}${i} '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa -g Lens $filename
done;done
num=1155
printf "$num " >&3
for i in a b c d e f g h i; do
filename=exiv2-bug$num${i}.exv
echo '------>' Bug $num${i} '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa -g Lens $filename
done
num=1166
printf "$num " >&3
filename=exiv2-bug$num.exv
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
num=1167
printf "$num " >&3
filename=exiv2-bug$num.exv
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
num=1170
printf "$num " >&3
filename=exiv2-bug$num.exv
echo '------>' Bug $num '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
num=1179
printf "$num " >&3
for X in a b c d e f g h i j; do
filename=exiv2-bug$num$X.exv
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep fuji/i $filename
done
num=1202
printf "$num " >&3
filename=exiv2-bug$num.jpg # test/tmp/20030925_201850.jpg
copyTestFile $filename
for value in 0 1 8 9 -1; do
runTest exiv2 -M"set Exif.CanonCs.FocusContinuous SShort $value" $filename
runTest exiv2 -K Exif.CanonCs.FocusContinuous $filename
done
num=1223
printf "$num " >&3
filename=exiv2-bug$num.jpg
copyTestFile RAW_PENTAX_K30.exv
copyTestFile RAW_PENTAX_K100.exv
runTest exiv2 -pa --grep Shutter RAW_PENTAX_K30.exv
runTest exiv2 -pa --grep Shutter RAW_PENTAX_K100.exv
num=1225
printf "$num " >&3
filename=exiv2-bug$num.exv
copyTestFile $filename
runTest exiv2 -pa --grep Bar $filename
num=1229
printf "$num " >&3
filename=exiv2-bug$num.jpg
copyTestFile $filename
runTest exiv2 -pX $filename | xmllint --format -
num=1231
printf "$num " >&3
for X in a b; do
filename=exiv2-bug$num$X.jpg
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep CanonTi/i $filename
done
num=1242
printf "$num " >&3
filename=Reagan.jp2
copyTestFile $filename
runTest exiv2 -pa $filename
num=1247
printf "$num " >&3
filename=exiv2-bug$num.jpg
copyTestFile $filename
runTest exiv2 -pa $filename
num=1252
printf "$num " >&3
for X in a b; do
filename=exiv2-bug$num$X.exv
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
done
num=1305
printf "$num " >&3
filename=IMGP0006-min.jpg
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g20
printf "$num " >&3
filename=exiv2-$num.exv
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
for filename in CanonEF100mmF2.8LMacroISUSM.exv \
TamronSP15-30mmF2.8DiVCUSDA012.exv \
TamronSP90mmF2.8DiVCUSDMacroF004.exv \
TamronSP90mmF2.8DiVCUSDMacroF017.exv
do
copyTestFile $filename
runTest exiv2 -pa --grep lenstype/i $filename
done
num=g45
printf "$num " >&3
filename=exiv2-$num.exv
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 -pa --grep lens/i $filename
num=g55
printf "$num " >&3
filename=POC8
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename 2>/dev/null
num=g57
printf "$num " >&3
filename=POC
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g79
printf "$num " >&3
filename=POC2
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g52
printf "$num " >&3
filename=POC5
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
echo 'ORF IMAGE'
runTest exiv2 $filename
num=g51
printf "$num " >&3
filename=POC4
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
echo 'RW2 IMAGE'
runTest exiv2 $filename
num=g50
printf "$num " >&3
filename=POC3
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g53
printf "$num " >&3
filename=POC6
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
echo 'ORF IMAGE'
runTest exiv2 $filename
num=g56
printf "$num " >&3
filename=POC9
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g58
printf "$num " >&3
filename=POC11
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
echo 'ORF IMAGE'
runTest exiv2 $filename
num=g59
printf "$num " >&3
filename=POC12
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
echo 'ORF IMAGE'
runTest exiv2 $filename
num=g60
printf "$num " >&3
filename=POC13
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
echo 'ORF IMAGE'
runTest exiv2 $filename
num=g71
printf "$num " >&3
filename=003-heap-buffer-over
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g73
printf "$num " >&3
filename=02-Invalid-mem-def
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g74
printf "$num " >&3
filename=005-invalid-mem
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g75
printf "$num " >&3
filename=008-invalid-mem
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g76
printf "$num " >&3
filename=010_bad_free
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g54
printf "$num " >&3
filename=POC7
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g134
printf "$num " >&3
filename=004-heap-buffer-over
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g132
printf "$num " >&3
filename=01-Null-exiv2-poc
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g144
printf "$num " >&3
filename=POC1
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g159
printf "$num " >&3
filename=printStructure
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g138
printf "$num " >&3
filename=007-heap-buffer-over
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g139
printf "$num " >&3
filename=009-stack-over
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g140
printf "$num " >&3
filename=006-heap-buffer-over
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
num=g188
printf "$num " >&3
filename=poc_2017-12-12_issue188
echo '------>' Bug $filename '<-------' >&2
copyTestFile $filename
runTest exiv2 $filename
) 3>&1 > $results 2>&1
printf "\n"
# ----------------------------------------------------------------------
# Evaluate results
cat $results | tr -d $'\r' > $results-stripped
mv $results-stripped $results
reportTest $results $good
# That's all Folks!
##

@ -1,233 +0,0 @@
#!/usr/bin/python
##
# build-test.py [--verbose]
#
# reads the output of exiv2 -v -V and inspects it for sanity
# inspect run-library libraries platform/compiler/{debug|release}{shared|static}
# TODO: 1 report loaded libraries that we didn't expect
# 2 mingw support
##
import os
import sys
import subprocess
##
# print error msg and terminate
def error(msg):
print '***',msg,'***'
sys.exit(1)
##
# run a command and return output string
def runCommand(command):
##
# don't use check_output
# this is 2.7 feature.
# not available on cygwin's default python 2.6.8 interpreter
# result=subprocess.check_output( command.split(' '))
##
result =subprocess.Popen(command.split(' '), stdout=subprocess.PIPE).communicate()[0]
# ensure lines are \n terminated (remove \r bytes)
return result.replace('\r\n', '\n').replace('\r', '\n')
##
# process the version information dictionary
def platform(dict):
verbose=dict.has_key('verbose')
for k in sorted(dict.keys()):
v=dict[k]
if type(v)==type([]):
v='['+str(len(v))+']'
if verbose:
print "%-20s -> %s" % (k,v)
##
# search dict for an array of libraries
def expect(dict,expects):
verbose=dict.has_key('verbose')
libs=dict['library']
E={};
for e in expects:
e=e.lower().replace('-','.') # cygwin uses '-' in versioning
e=e.split('.')[0]
if verbose:
print 'expect library',e
E[e]=0
for lib in libs:
lib=lib.lower().replace('\\','/') # cygwin uses '\' in pathnames
lib=lib.replace('-','.')
lib=os.path.basename(lib).split('.')[0]
if E.has_key(lib):
E[lib]=E[lib]+1
if verbose:
print 'found library',lib
for e in E.keys():
if E[e]==0:
error( "expected library '%s' not found" % e )
##
def apple(dict):
expects= [ 'libSystem.B.dylib'
, 'libexpat.1.dylib'
, 'libz.1.dylib'
, 'libiconv.2.dylib'
, 'libdyld.dylib'
, 'libc++.1.dylib'
# , 'libstdc++.6.dylib' # I suspect this is only with GCC (Xcode4 and earlier)
] ;
# which version of macOS ?
os_major=int(os.uname()[2].split('.')[0])
os_minor=int(os.uname()[2].split('.')[1])
NC=13;ML=12;LION=11;SL=10;LEO=9;
if dict['dll']:
expects.append('libexiv2.12.dylib')
## Mountain Lion
if os_major==ML and dict['dll']:
expects.append('libexiv2.12.dylib')
expects.append('libSystem.B.dylib')
expects.append('libexpat.1.dylib')
expects.append('libz.1.dylib')
expects.append('libiconv.2.dylib')
expects.append('libstdc++.6.dylib')
expects.append('libdyld.dylib')
expects.append('libc++.1.dylib')
expect(dict,expects)
expect_bits = 32 if os_major==LEO else 64
if expect_bits != dict['bits']:
error('*** expected %d bit build ***' % expect_bits)
##
def linux(dict):
expects = [ 'libdl.so.2'
, 'libexiv2.so.12'
, 'libstdc++.so.6'
, 'libm.so.6'
, 'libgcc_s.so.1'
, 'libc.so.6'
, 'libz.so.1'
, 'libexpat.so.1'
]
expect(dict,expects)
##
def windows(dict):
expects = [ 'ntdll.dll'
, 'kernel32.dll'
, 'kernelbase.dll'
, 'psapi.dll'
];
if dict['dll']:
dll='d.dll' if dict['debug'] else '.dll'
expects.append( 'exiv2' + dll )
expects.append( 'zlib1' + dll )
expects.append('libexpat.dll' )
# c run time libraries
# 2003=71, 2005=80, 2008=90, 2010=100
v=int( float(dict['version'])*10 )
expects.append('msvcr%d%s' % (v,dll) )
expects.append('msvcp%d%s' % (v,dll) )
expect(dict,expects)
##
def cygwin(dict):
expects = [ 'ntdll.dll'
, 'kernel32.dll'
, 'kernelbase.dll'
, 'cygexiv2-12.dll'
, 'cygwin1.dll'
, 'cyggcc_s-1.dll'
, 'cygstdc++-6.dll'
, 'psapi.dll'
, 'cygexpat-1.dll'
, 'cygiconv-2.dll'
, 'cygintl-8.dll'
];
expect(dict,expects)
##
def mingw(dict):
error("can't test platform mingw")
##
def unknown(dict):
error("can't test platform unknown")
##
def main(args):
this=os.path.abspath(args[0])
##
# find the exiv2 executable
exiv2='exiv2'
if os.environ.has_key('EXIV2_BINDIR'):
exiv2=os.path.abspath(os.path.join(os.environ['EXIV2_BINDIR'],exiv2))
else:
exiv2=os.path.join(os.path.dirname(this),'../bin',exiv2)
##
# collect the version dictionary from exiv2
dict={}
verbose=False
for arg in args:
if arg == '--verbose':
verbose=True
dict['verbose']=True
if os.path.exists(exiv2):
output = runCommand(exiv2 + ' -v -V')
if verbose:
print output
lines = output.split('\n')
for l in lines:
kv=l.split('=')
if len(kv)==2:
k=kv[0]
v=kv[1]
if not dict.has_key(k):
dict[k]=[]
dict[k].append(v)
# flatten value arrays of length 1
for k in dict.keys():
if type(dict[k])==type([]):
if len(dict[k])==1:
dict[k]=dict[k][0]
# convert numeric strings to ints
debug='debug'
dll='dll'
bits='bits'
dict[dll ] = int(dict[dll])
dict[debug] = int(dict[debug])
dict[bits ] = int(dict[bits])
##
# analyse the version dictionary
platform(dict)
eval(dict['platform']+'(dict)')
##
# report
v='Release' if dict[debug]==0 else 'Debug'
d='DLL' if dict[dll ]==0 else ''
print "build %dbit %-8s %-12s looks good" % (dict[bits],dict['platform'],v+d)
else:
error("exiv2 not found!")
if __name__ == '__main__':
main(sys.argv)
# That's all Folks!
##

@ -2,11 +2,9 @@
# Test driver for CRW file operations # Test driver for CRW file operations
source ./functions.source source ./functions.source
( cd "$testdir" ( cd "$testdir"
crwfile=exiv2-canon-powershot-s40.crw crwfile=exiv2-canon-powershot-s40.crw
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Testcases: Add and modify tags # Testcases: Add and modify tags
cmdfile=cmdfile1 cmdfile=cmdfile1
@ -21,23 +19,17 @@ source ./functions.source
copyTestFile $crwfile copyTestFile $crwfile
runTest exiv2 -v -pt $crwfile runTest exiv2 -v -pt $crwfile
runTest exiv2 -v -m $cmdfile $crwfile runTest exiv2 -v -m$cmdfile $crwfile
# runTest crwparse $crwfile
runTest exiv2 -v -pt $crwfile runTest exiv2 -v -pt $crwfile
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# Testcases: Delete tags # Testcases: Delete tags
cmdfile=cmdfile2
( echo del Exif.Canon.OwnerName
) > $cmdfile2
copyTestFile $crwfile copyTestFile $crwfile
runTest exiv2 -v -pt $crwfile runTest exiv2 -v -pt $crwfile
runTest exiv2 -v -m $cmdfile $crwfile runTest exiv2 -v -M'del Exif.Canon.OwnerName' $crwfile
# runTest crwparse $crwfile
runTest exiv2 -v -pt $crwfile runTest exiv2 -v -pt $crwfile
) 3>&1 > $results 2>&1 ) 3>&1 > $results
printf "\n" printf "\n"

@ -1,156 +0,0 @@
#!/usr/bin/env bash
# Test driver for CurlIO
source ./functions.source
##
#function to test remote read access in basicio.cpp
RemoteReadTest()
{
arg=$1
scheme=${arg:0:4}
src=$(basename "$arg")
filename=${src%.*}
test=${filename}.txt
good=$datapath/${filename}.txt
dot=.
# run tests
runTest exifprint $1 "--curl" > $test
#check results
diffCheckAscii $test $good
printf $dot
}
##
#function to test remoteio read/write access in basicio.cpp
RemoteIOTest()
{
arg=$1
scheme=${arg:0:4}
src=$(basename "$arg")
filename=${src%.*}
test=${filename}.txt
good=$datapath/remoteio.txt
dot=.
# print out the metadata
runTest remotetest $1 "--curl" > $test
#check results
diffCheckAscii $test $good
printf $dot
}
( cd "$testdir"
# check environmental variable
if [ -z $EXIV2_AWSUBUNTU_HOST ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_HOST "***"
exit 1
fi
if [ -z $EXIV2_AWSUBUNTU_USERNAME ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_USERNAME "***"
exit 1
fi
if [ -z $EXIV2_AWSUBUNTU_PASSWORD ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_PASSWORD "***"
exit 1
fi
errors=0
tesfile="conntest.jpg"
files+=(remoteImg{0..9}.jpg)
iopngfiles+=(remoteio{1..5}.png)
iojpgfiles+=(remoteio{6..10}.jpg)
USE_CURL=$("$bin"/exiv2 -v -V | grep ^curlprotocols= | sed s/curlprotocols=//)
if [ "$USE_CURL" == "" ]; then
#Skip remoteIo test cases
echo 'Curl is not used. Skip remoteio test cases.'
else
# HTTP protocol
if [[ "$USE_CURL" == *http* ]]; then
# test connection
printf 'http test connection '
TEST_CON=$("$bin"/conntest http://$EXIV2_AWSUBUNTU_HOST/$testfile)
if [[ "$TEST_CON" == OK* ]]; then
errors=0
printf 'OK\nHTTP IO '
for name in ${iopngfiles[@]}; do
RemoteIOTest "http://$EXIV2_AWSUBUNTU_HOST/$name"
done
for name in ${iojpgfiles[@]}; do
RemoteIOTest "http://$EXIV2_AWSUBUNTU_HOST/$name"
done
if [ $errors -eq 0 ]; then
printf '\nAll test cases passed\n'
else
echo $errors ' test cases failed!'
fi
else
echo $TEST_CON
printf "FAIL\nnot run httpIo\n"
fi
else
echo 'Curl doesnt support HTTP'
fi
# HTTPS protocol
if [[ "$USE_CURL" == *https* ]]; then
# test connection
printf 'https test connection '
TEST_CON=$("$bin"/conntest https://$EXIV2_AWSUBUNTU_HOST/$testfile)
if [[ "$TEST_CON" == OK* ]]; then
errors=0
printf 'OK\nHTTPS IO '
for name in ${iopngfiles[@]}; do
RemoteIOTest "https://$EXIV2_AWSUBUNTU_HOST/$name"
done
for name in ${iojpgfiles[@]}; do
RemoteIOTest "https://$EXIV2_AWSUBUNTU_HOST/$name"
done
if [ $errors -eq 0 ]; then
printf '\nAll test cases passed\n'
else
echo $errors ' test cases failed!'
fi
else
echo $TEST_CON
printf "FAIL\nnot run httpsIo\n"
fi
else
echo 'Curl doesnt support HTTPS'
fi
# FTP protocol
if [[ "$USE_CURL" == *ftp* ]]; then
# test connection
printf 'ftp test connection '
TEST_CON=$("$bin"/conntest ftp://"$EXIV2_AWSUBUNTU_USERNAME"_ftp:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/$testfile)
if [[ "$TEST_CON" == OK* ]]; then
errors=0
printf 'OK\nFTP READ '
for name in ${files[@]}; do
RemoteReadTest "ftp://"$EXIV2_AWSUBUNTU_USERNAME"_ftp:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/$name"
done
if [ $errors -eq 0 ]; then
printf '\nAll test cases passed\n'
else
echo $errors ' test cases failed!'
fi
else
echo $TEST_CON
printf "FAIL\nnot run FTP read\n"
fi
else
echo 'Curl doesnt support FTP'
fi
fi
)
# That's all Folks!
##

Binary file not shown.

@ -14,18 +14,25 @@ Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Canon.SerialNumber Long 2 43b226716 Exif.Canon.SerialNumber Long 2 43b226716
Exif.Canon.FirmwareVersion Ascii 22 Firmware Version 1.10 Exif.Canon.FirmwareVersion Ascii 22 Firmware Version 1.10
Exif.Canon.FocalLength Short 4 7.1 mm Exif.Canon.FocalLength Short 4 7.1 mm
Exif.CanonSi.AutoISO Short 1 100
Exif.CanonSi.ISOSpeed Short 1 100 Exif.CanonSi.ISOSpeed Short 1 100
Exif.CanonSi.MeasuredEV Short 1 6.97 Exif.CanonSi.MeasuredEV Short 1 6.97
Exif.CanonSi.TargetAperture Short 1 F2.8 Exif.CanonSi.TargetAperture Short 1 F2.8
Exif.CanonSi.TargetShutterSpeed Short 1 1/15 s Exif.CanonSi.TargetShutterSpeed Short 1 1/15 s
Exif.CanonSi.WhiteBalance Short 1 Auto Exif.CanonSi.WhiteBalance Short 1 Auto
Exif.CanonSi.SlowShutter Short 1 Off
Exif.CanonSi.Sequence Short 1 0 Exif.CanonSi.Sequence Short 1 0
Exif.CanonSi.CameraTemperature Short 1 --
Exif.CanonSi.FlashGuideNumber Short 1 0
Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used
Exif.CanonSi.FlashBias Short 1 0 EV Exif.CanonSi.FlashBias Short 1 0 EV
Exif.CanonSi.SubjectDistance Short 1 892 Exif.CanonSi.AutoExposureBracketing Short 1 Off
Exif.CanonSi.SubjectDistance Short 1 8.92 m
Exif.CanonSi.ApertureValue Short 1 F2.9 Exif.CanonSi.ApertureValue Short 1 F2.9
Exif.CanonSi.ShutterSpeedValue Short 1 1/15 s Exif.CanonSi.ShutterSpeedValue Short 1 1/15 s
Exif.CanonSi.MeasuredEV2 Short 1 -6.00 Exif.CanonSi.MeasuredEV2 Short 1 -6.00
Exif.CanonSi.BulbDuration Short 1 0
Exif.CanonSi.CameraType Short 1 Compact
Exif.Photo.FNumber Rational 1 F2.9 Exif.Photo.FNumber Rational 1 F2.9
Exif.Photo.ExposureTime Rational 1 1/15 s Exif.Photo.ExposureTime Rational 1 1/15 s
Exif.CanonCs.Macro Short 1 Off Exif.CanonCs.Macro Short 1 Off
@ -67,12 +74,42 @@ Add Exif.Canon.SerialNumber "2" (Long)
Set Exif.Photo.ISOSpeedRatings "155" (Short) Set Exif.Photo.ISOSpeedRatings "155" (Short)
Set Exif.Photo.DateTimeOriginal "2007:11:11 09:10:11" (Ascii) Set Exif.Photo.DateTimeOriginal "2007:11:11 09:10:11" (Ascii)
File 1/1: exiv2-canon-powershot-s40.crw File 1/1: exiv2-canon-powershot-s40.crw
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.JPEGInterchangeFormat Long 1 0
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 4418
Exif.Photo.PixelXDimension Long 1 2272
Exif.Photo.PixelYDimension Long 1 1704
Exif.Image.Orientation Short 1 top, left
Exif.Canon.FileNumber Long 1 130-3050
Exif.Photo.DateTimeOriginal Ascii 20 2007:11:11 09:10:11
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image
Exif.Canon.OwnerName Ascii 16 Different owner
Exif.Image.Make Ascii 6 Canon Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 20 Canon PowerShot S40 Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Canon.OwnerName Ascii 16 Different owner Exif.Canon.SerialNumber Long 2 000000001
Exif.Canon.FocalLength Short 1 65535 Exif.Canon.FirmwareVersion Ascii 17 Whatever version
Exif.Photo.DateTimeOriginal Ascii 20 2086:12:17 15:32:15 Exif.Canon.FocalLength Short 4 2 227 286 215
./crw-test.sh: line 40: $cmdfile2: ambiguous redirect Exif.CanonSi.AutoISO Short 1 100
Exif.CanonSi.ISOSpeed Short 1 100
Exif.CanonSi.MeasuredEV Short 1 6.97
Exif.CanonSi.TargetAperture Short 1 F2.8
Exif.CanonSi.TargetShutterSpeed Short 1 1/15 s
Exif.CanonSi.WhiteBalance Short 1 Auto
Exif.CanonSi.SlowShutter Short 1 Off
Exif.CanonSi.Sequence Short 1 0
Exif.CanonSi.CameraTemperature Short 1 --
Exif.CanonSi.FlashGuideNumber Short 1 0
Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used
Exif.CanonSi.FlashBias Short 1 0 EV
Exif.CanonSi.AutoExposureBracketing Short 1 Off
Exif.CanonSi.SubjectDistance Short 1 8.92 m
Exif.CanonSi.ApertureValue Short 1 F2.9
Exif.CanonSi.ShutterSpeedValue Short 1 1/15 s
Exif.CanonSi.MeasuredEV2 Short 1 -6.00
Exif.CanonSi.BulbDuration Short 1 0
Exif.CanonSi.CameraType Short 1 Compact
Exif.Photo.FNumber Rational 1 F2.9
Exif.Photo.ExposureTime Rational 1 1/15 s
File 1/1: exiv2-canon-powershot-s40.crw File 1/1: exiv2-canon-powershot-s40.crw
Exif.Thumbnail.Compression Short 1 JPEG (old-style) Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.JPEGInterchangeFormat Long 1 0 Exif.Thumbnail.JPEGInterchangeFormat Long 1 0
@ -89,18 +126,25 @@ Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Canon.SerialNumber Long 2 43b226716 Exif.Canon.SerialNumber Long 2 43b226716
Exif.Canon.FirmwareVersion Ascii 22 Firmware Version 1.10 Exif.Canon.FirmwareVersion Ascii 22 Firmware Version 1.10
Exif.Canon.FocalLength Short 4 7.1 mm Exif.Canon.FocalLength Short 4 7.1 mm
Exif.CanonSi.AutoISO Short 1 100
Exif.CanonSi.ISOSpeed Short 1 100 Exif.CanonSi.ISOSpeed Short 1 100
Exif.CanonSi.MeasuredEV Short 1 6.97 Exif.CanonSi.MeasuredEV Short 1 6.97
Exif.CanonSi.TargetAperture Short 1 F2.8 Exif.CanonSi.TargetAperture Short 1 F2.8
Exif.CanonSi.TargetShutterSpeed Short 1 1/15 s Exif.CanonSi.TargetShutterSpeed Short 1 1/15 s
Exif.CanonSi.WhiteBalance Short 1 Auto Exif.CanonSi.WhiteBalance Short 1 Auto
Exif.CanonSi.SlowShutter Short 1 Off
Exif.CanonSi.Sequence Short 1 0 Exif.CanonSi.Sequence Short 1 0
Exif.CanonSi.CameraTemperature Short 1 --
Exif.CanonSi.FlashGuideNumber Short 1 0
Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used
Exif.CanonSi.FlashBias Short 1 0 EV Exif.CanonSi.FlashBias Short 1 0 EV
Exif.CanonSi.SubjectDistance Short 1 892 Exif.CanonSi.AutoExposureBracketing Short 1 Off
Exif.CanonSi.SubjectDistance Short 1 8.92 m
Exif.CanonSi.ApertureValue Short 1 F2.9 Exif.CanonSi.ApertureValue Short 1 F2.9
Exif.CanonSi.ShutterSpeedValue Short 1 1/15 s Exif.CanonSi.ShutterSpeedValue Short 1 1/15 s
Exif.CanonSi.MeasuredEV2 Short 1 -6.00 Exif.CanonSi.MeasuredEV2 Short 1 -6.00
Exif.CanonSi.BulbDuration Short 1 0
Exif.CanonSi.CameraType Short 1 Compact
Exif.Photo.FNumber Rational 1 F2.9 Exif.Photo.FNumber Rational 1 F2.9
Exif.Photo.ExposureTime Rational 1 1/15 s Exif.Photo.ExposureTime Rational 1 1/15 s
Exif.CanonCs.Macro Short 1 Off Exif.CanonCs.Macro Short 1 Off
@ -136,21 +180,68 @@ Exif.CanonCs.SpotMeteringMode Short 1 Center
File 1/1: exiv2-canon-powershot-s40.crw File 1/1: exiv2-canon-powershot-s40.crw
Del Exif.Canon.OwnerName Del Exif.Canon.OwnerName
File 1/1: exiv2-canon-powershot-s40.crw File 1/1: exiv2-canon-powershot-s40.crw
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.JPEGInterchangeFormat Long 1 0
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 4418
Exif.Photo.PixelXDimension Long 1 2272
Exif.Photo.PixelYDimension Long 1 1704
Exif.Image.Orientation Short 1 top, left
Exif.Canon.FileNumber Long 1 130-3050
Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 17:54:36
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image
Exif.Image.Make Ascii 6 Canon Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 20 Canon PowerShot S40 Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Canon.SerialNumber Long 1104 dbff55551 Exif.Canon.SerialNumber Long 2 43b226716
Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image Exif.Canon.FirmwareVersion Ascii 22 Firmware Version 1.10
Exif.CanonSi.ISOSpeed Short 1 3.125 Exif.Canon.FocalLength Short 4 7.1 mm
Exif.CanonSi.MeasuredEV Short 1 5.13 Exif.CanonSi.AutoISO Short 1 100
Exif.CanonSi.TargetAperture Short 1 F1 Exif.CanonSi.ISOSpeed Short 1 100
Exif.CanonSi.TargetShutterSpeed Short 1 1 s Exif.CanonSi.MeasuredEV Short 1 6.97
Exif.CanonSi.WhiteBalance Short 1 Daylight Exif.CanonSi.TargetAperture Short 1 F2.8
Exif.CanonSi.Sequence Short 1 2 Exif.CanonSi.TargetShutterSpeed Short 1 1/15 s
Exif.CanonSi.AFPointUsed Short 1 0 focus points; none used Exif.CanonSi.WhiteBalance Short 1 Auto
Exif.CanonSi.SlowShutter Short 1 Off
Exif.CanonSi.Sequence Short 1 0
Exif.CanonSi.CameraTemperature Short 1 --
Exif.CanonSi.FlashGuideNumber Short 1 0
Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used
Exif.CanonSi.FlashBias Short 1 0 EV Exif.CanonSi.FlashBias Short 1 0 EV
Exif.CanonSi.SubjectDistance Short 1 12291 Exif.CanonSi.AutoExposureBracketing Short 1 Off
Exif.CanonSi.ApertureValue Short 1 65535 Exif.CanonSi.SubjectDistance Short 1 8.92 m
Exif.CanonSi.ShutterSpeedValue Short 1 1 s Exif.CanonSi.ApertureValue Short 1 F2.9
Exif.CanonSi.MeasuredEV2 Short 1 79.25 Exif.CanonSi.ShutterSpeedValue Short 1 1/15 s
Exif.Photo.FNumber Rational 1 F-2.1e+03 Exif.CanonSi.MeasuredEV2 Short 1 -6.00
Exif.Photo.ExposureTime Rational 1 (1/0) Exif.CanonSi.BulbDuration Short 1 0
Exif.CanonSi.CameraType Short 1 Compact
Exif.Photo.FNumber Rational 1 F2.9
Exif.Photo.ExposureTime Rational 1 1/15 s
Exif.CanonCs.Macro Short 1 Off
Exif.CanonCs.Selftimer Short 1 Off
Exif.CanonCs.Quality Short 1 RAW
Exif.CanonCs.FlashMode Short 1 Off
Exif.CanonCs.DriveMode Short 1 Single / timer
Exif.CanonCs.FocusMode Short 1 AI servo AF
Exif.CanonCs.ImageSize Short 1 Large
Exif.CanonCs.EasyMode Short 1 Manual
Exif.CanonCs.DigitalZoom Short 1 None
Exif.CanonCs.Contrast Short 1 Normal
Exif.CanonCs.Saturation Short 1 Normal
Exif.CanonCs.Sharpness Short 1 Normal
Exif.CanonCs.ISOSpeed Short 1 100
Exif.CanonCs.MeteringMode Short 1 Evaluative
Exif.CanonCs.FocusType Short 1 Auto
Exif.CanonCs.AFPoint Short 1 Center
Exif.CanonCs.ExposureProgram Short 1 Program (P)
Exif.CanonCs.LensType Short 1 n/a
Exif.CanonCs.Lens Short 3 7.1 - 21.3 mm
Exif.CanonCs.MaxAperture Short 1 F2.9
Exif.CanonCs.MinAperture Short 1 F8
Exif.CanonCs.FlashActivity Short 1 Did not fire
Exif.CanonCs.FlashDetails Short 1
Exif.CanonCs.FocusContinuous Short 1 Single
Exif.CanonCs.AESetting Short 1 Normal AE
Exif.CanonCs.ImageStabilization Short 1 (65535)
Exif.CanonCs.DisplayAperture Short 1 0
Exif.CanonCs.ZoomSourceWidth Short 1 2272
Exif.CanonCs.ZoomTargetWidth Short 1 2272
Exif.CanonCs.SpotMeteringMode Short 1 Center

@ -1,12 +0,0 @@
Reagan.jpg
Exif.Image.Software Ascii 40 Adobe Photoshop Elements 12.0 Macintosh
ReaganLargePng.png
Exif.Image.Software Ascii 11 GIMP 2.9.5
ReaganLargeTiff.tiff
Exif.Image.Software Ascii 11 GIMP 2.9.5
ReaganLargeJpg.jpg
Exif.Image.Software Ascii 12 GIMP 2.8.18
Reagan.tiff
Exif.Image.Software Ascii 29 Adobe Photoshop CS Macintosh
DSC_0002.NEF
Exif.Image.Software Ascii 10 Ver.1.00

@ -1,128 +0,0 @@
Read standard Ifd from data buffer
IFD Offset: 0x00000001, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0x00000036
2 0x0003 Ascii (1) 7 0x0000003c
3 0x0004 Ascii (1) 9 0x00000043
Next IFD: 0x00000000
Data of entry 1:
0037 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
003d 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
0044 4d 61 6c 61 79 73 69 61 00 Malaysia.
Setting value of entry 3...
Wrote 76 characters to data buffer
IFD Offset: 0x00000001, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0x00000036
2 0x0003 Ascii (1) 7 0x0000003c
3 0x0004 Ascii (1) 6 0x00000043
Next IFD: 0x00000000
Data of entry 1:
0037 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
003d 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
0044 54 48 52 45 45 00 THREE.
Read non-standard Ifd from data buffer
IFD Offset: 0x00000016, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0xffffffea
2 0x0003 Ascii (1) 7 0xfffffff0
3 0x0004 Ascii (1) 9 0xfffffff7
Next IFD: 0x00000000
Data of entry 1:
0000 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
0006 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
000d 4d 61 6c 61 79 73 69 61 00 Malaysia.
Setting value of entry 3...
IFD Offset: 0x00000016, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0xffffffea
2 0x0003 Ascii (1) 7 0xfffffff0
3 0x0004 Ascii (1) 6 0xfffffff7
Next IFD: 0x00000000
Data of entry 1:
0000 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
0006 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
000d 54 48 52 45 45 00 00 00 00 THREE....
Test boundary checks, the following reads should generate warnings or errors
--- read (3)
Warning: Upper boundary of data for IFD0 entry 3 is out of bounds:
Offset = 0x00000043, size = 9, exceeds buffer size by 1 Bytes; Truncating the data.
--- read (4)
Error: Upper boundary of the 1st data entry of IFD0 is out of bounds:
Offset = 0x00000036, exceeds buffer size by 1 Bytes
Ifd::read (4) failed, rc = 6
--- read (5)
Warning: Upper boundary of data for IFD0 entry 2 is out of bounds:
Offset = 0x0000003c, size = 7, exceeds buffer size by 7 Bytes; Truncating the data.
Warning: Upper boundary of data for IFD0 entry 3 is out of bounds:
Offset = 0x00000043, size = 9, exceeds buffer size by 16 Bytes; Truncating the data.
--- read (6)
Error: IFD0 memory of the pointer to the next IFD lies outside of the IFD memory buffer.
Ifd::read (6) failed, rc = 6
--- read (7)
Error: IFD0 memory of the pointer to the next IFD lies outside of the IFD memory buffer.
Ifd::read (7) failed, rc = 6
Create Ifd from scratch
IFD Offset: 0x00000000, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0x00000036
2 0x0003 Ascii (1) 7 0x0000003c
3 0x0004 Ascii (1) 9 0x00000043
Next IFD: 0x00000000
Data of entry 1:
0036 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
003c 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
0043 4d 61 6c 61 79 73 69 61 00 Malaysia.
Move data buffer
IFD Offset: 0x00000001, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0x00000036
2 0x0003 Ascii (1) 7 0x0000003c
3 0x0004 Ascii (1) 9 0x00000043
Next IFD: 0x00000000
Data of entry 1:
0037 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
003d 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
0044 54 48 52 45 45 00 00 00 00 THREE....
IFD Offset: 0x00000001, IFD Entries: 4
Entry Tag Format (Bytes each) Number Offset
----- ------ --------------------- ------ -----------
0 0x0001 Ascii (1) 4 54 68 65 00
1 0x0002 Ascii (1) 6 0x00000036
2 0x0003 Ascii (1) 7 0x0000003c
3 0x0004 Ascii (1) 9 0x00000043
Next IFD: 0x00000000
Data of entry 1:
0037 4b 75 61 6c 61 00 Kuala.
Data of entry 2:
003d 4c 75 6d 70 75 72 00 Lumpur.
Data of entry 3:
0044 54 48 52 45 45 00 00 00 00 THREE....

@ -1,21 +0,0 @@
Key 'Canon' matches 'Canon' with a score of 7.
Key 'Canon' matches 'Canon*' with a score of 6.
Key 'Canon Corp.' matches 'Canon*' with a score of 6.
Key 'PENTAX Corporation' matches 'PENTAX*' with a score of 7.
Key 'foobar' matches '*foo*bar*' with a score of 7.
Key 'barfoofoobarbar' matches '*foo*bar*' with a score of 7.
Key 'foo' does not match 'foo*bar'.
Key 'bar' does not match 'foo*bar'.
Key 'foobar' matches 'foo*bar' with a score of 7.
Key 'fooYAHOObar' matches 'foo*bar' with a score of 7.
Key 'Thefoobar' does not match 'foo*bar'.
Key 'foobarTrick' does not match 'foo*bar'.
Key 'ThefoobarTrick' does not match 'foo*bar'.
Key 'ThefooYAHOObarTrick' does not match 'foo*bar'.
Key 'anything' matches '*' with a score of 1.
Key 'anything times two' matches '**' with a score of 1.
Key 'bar' matches '*bar' with a score of 4.
Key 'bar' does not match 'b*bar'.
Key 'bbar' matches 'b*bar' with a score of 5.
Key 'bar' does not match '*foobar'.
Key 'foobar' matches '*bar' with a score of 4.

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

@ -1,522 +0,0 @@
-----> eps-flat_coreldraw-x3-lev2.eps <-----
Command: exiv2 -pp eps-flat_coreldraw-x3-lev2.eps
Preview 1: image/tiff, 1164x1054 pixels, 1229768 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_coreldraw-x3-lev2.eps
Exit code: 0
-----> eps-flat_coreldraw-x5-lev2.eps <-----
Command: exiv2 -pp eps-flat_coreldraw-x5-lev2.eps
Preview 1: image/tiff, 422x348 pixels, 152914 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_coreldraw-x5-lev2.eps
Exit code: 0
-----> eps-flat_inkscape-epsi.eps <-----
Command: exiv2 -pp eps-flat_inkscape-epsi.eps
Exiv2 exception in print action for file eps-flat_inkscape-epsi.eps:
eps-flat_inkscape-epsi.eps: The file contains data of an unknown image type
Exit code: 1
Command: exiv2 -f -ep eps-flat_inkscape-epsi.eps
Exiv2 exception in extract action for file eps-flat_inkscape-epsi.eps:
eps-flat_inkscape-epsi.eps: The file contains data of an unknown image type
Exit code: 1
-----> eps-flat_oodraw_ai-10-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-10-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-10-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-8-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-8-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-8-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-8-lev3.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-8-lev3.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-8-lev3.eps
Exit code: 0
-----> eps-flat_oodraw_ai-9-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-9-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-9-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs2-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs2-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs2-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs3-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs3-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs3-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs4-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs4-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs4-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs5-lev2.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs5-lev2.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs5-lev2.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs5-lev3-nodocthumb.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs5-lev3-nodocthumb.eps
Preview 1: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs5-lev3-nodocthumb.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs5-lev3-pre.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs5-lev3-pre.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/tiff, 213x170 pixels, 37902 bytes
Preview 3: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs5-lev3-pre.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs5-lev3.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs5-lev3.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs5-lev3.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs5-lev3_exiftool-8.56.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs5-lev3_exiftool-8.56.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs5-lev3_exiftool-8.56.eps
Exit code: 0
-----> eps-flat_oodraw_ai-cs5-lev3_ns-xapGImg.eps <-----
Command: exiv2 -pp eps-flat_oodraw_ai-cs5-lev3_ns-xapGImg.eps
Preview 1: image/x-portable-anymap, 128x104 pixels, 39951 bytes
Preview 2: image/jpeg, 256x208 pixels, 3166 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_oodraw_ai-cs5-lev3_ns-xapGImg.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-ascii-colorprofile.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii-colorprofile.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii-colorprofile.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-ascii-pre.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii-pre.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii-pre.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-ascii.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-ascii85-pre.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii85-pre.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii85-pre.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-ascii85.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii85.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii85.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Preview 1: image/jpeg, 37x47 pixels, 574 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps
Warning: Unable to find XMP metadata as announced at position: 291
Exit code: 0
-----> eps-flat_photoshop-cs5-binary-pre.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary-pre.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary-pre.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-binary.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-binary_exiftool-8.56.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary_exiftool-8.56.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary_exiftool-8.56.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-binary_exiv2-bigxmp.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary_exiv2-bigxmp.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary_exiv2-bigxmp.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-binary_exiv2.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary_exiv2.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary_exiv2.eps
Exit code: 0
-----> eps-flat_photoshop-cs5-binary_exiv2_missing-begin-xml-packet.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary_exiv2_missing-begin-xml-packet.eps
Warning: Missing %begin_xml_packet in Photoshop EPS at position: 8560
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary_exiv2_missing-begin-xml-packet.eps
Warning: Missing %begin_xml_packet in Photoshop EPS at position: 8560
Exit code: 0
-----> eps-flat_photoshop-cs5-binary_no-adocontainsxmp.eps <-----
Command: exiv2 -pp eps-flat_photoshop-cs5-binary_no-adocontainsxmp.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-cs5-binary_no-adocontainsxmp.eps
Exit code: 0
-----> eps-flat_photoshop-e9-win-doseps.eps <-----
Command: exiv2 -pp eps-flat_photoshop-e9-win-doseps.eps
Preview 1: image/jpeg, 160x120 pixels, 2252 bytes
Preview 2: image/tiff, 454x340 pixels, 23782 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-e9-win-doseps.eps
Exit code: 0
-----> eps-flat_photoshop-e9-win.eps <-----
Command: exiv2 -pp eps-flat_photoshop-e9-win.eps
Preview 1: image/jpeg, 160x120 pixels, 2252 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-e9-win.eps
Exit code: 0
-----> eps-flat_photoshop-e9-win_exiv2.eps <-----
Command: exiv2 -pp eps-flat_photoshop-e9-win_exiv2.eps
Preview 1: image/jpeg, 160x120 pixels, 2252 bytes
Exit code: 0
Command: exiv2 -f -ep eps-flat_photoshop-e9-win_exiv2.eps
Exit code: 0
-----> eps-nested_noxmp_ai-8-lev2.eps <-----
Command: exiv2 -pp eps-nested_noxmp_ai-8-lev2.eps
Preview 1: image/x-portable-anymap, 88x128 pixels, 33806 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_ai-8-lev2.eps
Exit code: 0
-----> eps-nested_noxmp_ai-8-lev3.eps <-----
Command: exiv2 -pp eps-nested_noxmp_ai-8-lev3.eps
Preview 1: image/x-portable-anymap, 88x128 pixels, 33806 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_ai-8-lev3.eps
Exit code: 0
-----> eps-nested_noxmp_ai-cs5-lev2.eps <-----
Command: exiv2 -pp eps-nested_noxmp_ai-cs5-lev2.eps
Preview 1: image/x-portable-anymap, 88x128 pixels, 33806 bytes
Preview 2: image/jpeg, 176x256 pixels, 3555 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_ai-cs5-lev2.eps
Exit code: 0
-----> eps-nested_noxmp_ai-cs5-lev3.eps <-----
Command: exiv2 -pp eps-nested_noxmp_ai-cs5-lev3.eps
Preview 1: image/x-portable-anymap, 88x128 pixels, 33806 bytes
Preview 2: image/jpeg, 176x256 pixels, 3555 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_ai-cs5-lev3.eps
Exit code: 0
-----> eps-nested_noxmp_indesign-cs5-lev2-bin.eps <-----
Command: exiv2 -pp eps-nested_noxmp_indesign-cs5-lev2-bin.eps
Preview 1: image/tiff, 595x841 pixels, 8124 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_indesign-cs5-lev2-bin.eps
Exit code: 0
-----> eps-nested_noxmp_indesign-cs5-lev2.eps <-----
Command: exiv2 -pp eps-nested_noxmp_indesign-cs5-lev2.eps
Preview 1: image/tiff, 595x841 pixels, 8124 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_indesign-cs5-lev2.eps
Exit code: 0
-----> eps-nested_noxmp_indesign-cs5-lev3-bin.eps <-----
Command: exiv2 -pp eps-nested_noxmp_indesign-cs5-lev3-bin.eps
Preview 1: image/tiff, 595x841 pixels, 8124 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_indesign-cs5-lev3-bin.eps
Exit code: 0
-----> eps-nested_noxmp_indesign-cs5-lev3.eps <-----
Command: exiv2 -pp eps-nested_noxmp_indesign-cs5-lev3.eps
Preview 1: image/tiff, 595x841 pixels, 8124 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_indesign-cs5-lev3.eps
Exit code: 0
-----> eps-nested_noxmp_oodraw-lev2-epsi.eps <-----
Command: exiv2 -pp eps-nested_noxmp_oodraw-lev2-epsi.eps
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_oodraw-lev2-epsi.eps
Exit code: 0
-----> eps-nested_noxmp_oodraw-lev2-pre.eps <-----
Command: exiv2 -pp eps-nested_noxmp_oodraw-lev2-pre.eps
Preview 1: image/tiff, 719x1048 pixels, 14236 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_noxmp_oodraw-lev2-pre.eps
Exit code: 0
-----> eps-nested_xmp_ai-3-lev3.eps <-----
Command: exiv2 -pp eps-nested_xmp_ai-3-lev3.eps
Preview 1: image/tiff, 100x100 pixels, 11692 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_ai-3-lev3.eps
Exit code: 0
-----> eps-nested_xmp_ai-8-lev3.eps <-----
Command: exiv2 -pp eps-nested_xmp_ai-8-lev3.eps
Preview 1: image/tiff, 100x100 pixels, 22300 bytes
Preview 2: image/x-portable-anymap, 128x128 pixels, 49167 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_ai-8-lev3.eps
Exit code: 0
-----> eps-nested_xmp_ai-cs5-lev3.eps <-----
Command: exiv2 -pp eps-nested_xmp_ai-cs5-lev3.eps
Preview 1: image/tiff, 100x100 pixels, 22300 bytes
Preview 2: image/x-portable-anymap, 128x128 pixels, 49167 bytes
Preview 3: image/jpeg, 256x256 pixels, 4276 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_ai-cs5-lev3.eps
Exit code: 0
-----> eps-nested_xmp_indesign-cs5-lev3-bin.eps <-----
Command: exiv2 -pp eps-nested_xmp_indesign-cs5-lev3-bin.eps
Preview 1: image/tiff, 595x841 pixels, 8080 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_indesign-cs5-lev3-bin.eps
Exit code: 0
-----> eps-nested_xmp_indesign-cs5-lev3.eps <-----
Command: exiv2 -pp eps-nested_xmp_indesign-cs5-lev3.eps
Preview 1: image/tiff, 595x841 pixels, 8080 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_indesign-cs5-lev3.eps
Exit code: 0
-----> eps-nested_xmp_indesign-cs5-lev3_failure-exiftool-8.56.eps <-----
Command: exiv2 -pp eps-nested_xmp_indesign-cs5-lev3_failure-exiftool-8.56.eps
Warning: Unable to find XMP embedding trailer ending at position: 186519
Preview 1: image/tiff, 595x841 pixels, 8076 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_indesign-cs5-lev3_failure-exiftool-8.56.eps
Warning: Unable to find XMP embedding trailer ending at position: 186519
Exit code: 0
-----> eps-nested_xmp_oodraw-lev2-epsi.eps <-----
Command: exiv2 -pp eps-nested_xmp_oodraw-lev2-epsi.eps
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_oodraw-lev2-epsi.eps
Exit code: 0
-----> eps-nested_xmp_oodraw-lev2-pre.eps <-----
Command: exiv2 -pp eps-nested_xmp_oodraw-lev2-pre.eps
Preview 1: image/tiff, 719x1048 pixels, 14476 bytes
Exit code: 0
Command: exiv2 -f -ep eps-nested_xmp_oodraw-lev2-pre.eps
Exit code: 0
-----> eps-old-r2872_01.eps <-----
Command: exiv2 -pp eps-old-r2872_01.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-old-r2872_01.eps
Exit code: 0
-----> eps-old-r2872_02.eps <-----
Command: exiv2 -pp eps-old-r2872_02.eps
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-old-r2872_02.eps
Exit code: 0
-----> eps-old-r2872_03.eps <-----
Command: exiv2 -pp eps-old-r2872_03.eps
Warning: Missing %begin_xml_packet in Photoshop EPS at position: 1396
Preview 1: image/jpeg, 37x47 pixels, 854 bytes
Exit code: 0
Command: exiv2 -f -ep eps-old-r2872_03.eps
Warning: Missing %begin_xml_packet in Photoshop EPS at position: 1396
Exit code: 0
-----> eps-old-r2872_04.eps <-----
Command: exiv2 -pp eps-old-r2872_04.eps
Preview 1: image/jpeg, 160x120 pixels, 2252 bytes
Exit code: 0
Command: exiv2 -f -ep eps-old-r2872_04.eps
Exit code: 0

@ -1,106 +0,0 @@
#!/usr/bin/env bash
# Test driver for previews
source ./functions.source
( cd "$testdir"
images="eps/eps-flat_coreldraw-x3-lev2.eps \
eps/eps-flat_coreldraw-x5-lev2.eps \
eps/eps-flat_inkscape-epsi.eps \
eps/eps-flat_oodraw_ai-10-lev2.eps \
eps/eps-flat_oodraw_ai-8-lev2.eps \
eps/eps-flat_oodraw_ai-8-lev3.eps \
eps/eps-flat_oodraw_ai-9-lev2.eps \
eps/eps-flat_oodraw_ai-cs-lev2.eps \
eps/eps-flat_oodraw_ai-cs2-lev2.eps \
eps/eps-flat_oodraw_ai-cs3-lev2.eps \
eps/eps-flat_oodraw_ai-cs4-lev2.eps \
eps/eps-flat_oodraw_ai-cs5-lev2.eps \
eps/eps-flat_oodraw_ai-cs5-lev3-nodocthumb.eps \
eps/eps-flat_oodraw_ai-cs5-lev3-pre.eps \
eps/eps-flat_oodraw_ai-cs5-lev3.eps \
eps/eps-flat_oodraw_ai-cs5-lev3_exiftool-8.56.eps \
eps/eps-flat_oodraw_ai-cs5-lev3_ns-xapGImg.eps \
eps/eps-flat_photoshop-cs5-ascii-colorprofile.eps \
eps/eps-flat_photoshop-cs5-ascii-pre.eps \
eps/eps-flat_photoshop-cs5-ascii.eps \
eps/eps-flat_photoshop-cs5-ascii85-pre.eps \
eps/eps-flat_photoshop-cs5-ascii85.eps \
eps/eps-flat_photoshop-cs5-ascii_failure-bigxmp.eps \
eps/eps-flat_photoshop-cs5-binary-pre.eps \
eps/eps-flat_photoshop-cs5-binary.eps \
eps/eps-flat_photoshop-cs5-binary_exiftool-8.56.eps \
eps/eps-flat_photoshop-cs5-binary_exiv2-bigxmp.eps \
eps/eps-flat_photoshop-cs5-binary_exiv2.eps \
eps/eps-flat_photoshop-cs5-binary_exiv2_missing-begin-xml-packet.eps \
eps/eps-flat_photoshop-cs5-binary_no-adocontainsxmp.eps \
eps/eps-flat_photoshop-e9-win-doseps.eps \
eps/eps-flat_photoshop-e9-win.eps \
eps/eps-flat_photoshop-e9-win_exiv2.eps \
eps/eps-nested_noxmp_ai-8-lev2.eps \
eps/eps-nested_noxmp_ai-8-lev3.eps \
eps/eps-nested_noxmp_ai-cs5-lev2.eps \
eps/eps-nested_noxmp_ai-cs5-lev3.eps \
eps/eps-nested_noxmp_indesign-cs5-lev2-bin.eps \
eps/eps-nested_noxmp_indesign-cs5-lev2.eps \
eps/eps-nested_noxmp_indesign-cs5-lev3-bin.eps \
eps/eps-nested_noxmp_indesign-cs5-lev3.eps \
eps/eps-nested_noxmp_oodraw-lev2-epsi.eps \
eps/eps-nested_noxmp_oodraw-lev2-pre.eps \
eps/eps-nested_xmp_ai-3-lev3.eps \
eps/eps-nested_xmp_ai-8-lev3.eps \
eps/eps-nested_xmp_ai-cs5-lev3.eps \
eps/eps-nested_xmp_indesign-cs5-lev3-bin.eps \
eps/eps-nested_xmp_indesign-cs5-lev3.eps \
eps/eps-nested_xmp_indesign-cs5-lev3_failure-exiftool-8.56.eps \
eps/eps-nested_xmp_oodraw-lev2-epsi.eps \
eps/eps-nested_xmp_oodraw-lev2-pre.eps \
eps/eps-old-r2872_01.eps \
eps/eps-old-r2872_02.eps \
eps/eps-old-r2872_03.eps \
eps/eps-old-r2872_04.eps"
for filepath in $images; do
filename=`basename "$filepath"`
image=`echo "$filename" | sed 's,\.[^.]*$,,'`
printf "." >&3
echo
echo "-----> $filename <-----"
cp "../data/$filepath" ./
echo
echo "Command: exiv2 -pp $filename"
runTest exiv2 -pp "$filename"
exitcode=$?
echo "Exit code: $exitcode"
rm -f "$image-preview"*
echo
echo "Command: exiv2 -f -ep $filename"
runTest exiv2 -f -ep "$filename"
echo "Exit code: $?"
runTest exiv2 -pp "$filename" 2>/dev/null | sed -n 's,^Preview \([0-9]\+\):.*,\1,p' | while read preview; do
diff $diffargs -q "../data/preview/$image-preview$preview."* "$image-preview$preview."*
done
done
) 3>&1 > "$testdir/eps-preview-test.out" 2>&1
echo "."
# ----------------------------------------------------------------------
# Result
if ! diff -q $diffargs "$testdir/$datadir/preview/eps-preview-test.out" "$testdir/eps-preview-test.out" ; then
diff -u $diffargs "$testdir/$datadir/preview/eps-preview-test.out" "$testdir/eps-preview-test.out"
exit 1
fi
echo "All testcases passed."
# That's all Folks!
##

@ -1,145 +0,0 @@
#!/usr/bin/env bash
# Test driver for EPS files
source ./functions.source
( cd "$testdir"
##
# what version of exiv2 are we using?
exiv2version="`$bin/exiv2 -V | sed -n '1 s,^exiv2 [^ ]* \([^ ]*\).*,\1,p'`"
if [ -z "$exiv2version" ]; then
echo "Error: Unable to determine Exiv2 version"
exit 1
fi
if [ ! -d $datadir/eps/ ]; then
echo "Error: $datadir/eps/ does not exist"
exit 1
fi
##
# ensure that no data file is already stamped with the current version
for file in $datadir/eps/eps-*.eps.*; do
if ! grep "_Exiv2Version_" "$file" >/dev/null ; then
echo "Error: $file contains hard-coded Exiv2 version"
exit 1
fi
done
##
# get down to work!
for file in $datadir/eps/eps-*.eps; do
image="`basename "$file" .eps`"
printf "." >&3
echo
echo "-----> $image.eps <-----"
copyTestFile "eps/$image.eps" "$image.eps"
echo
echo "Command: exiv2 -u -pa $image.eps"
runTest exiv2 -u -pa "$image.eps"
exitcode="$?"
echo "Exit code: $exitcode"
if [ "$exitcode" -ne 0 -a "$exitcode" -ne 253 ] ; then
continue
fi
echo
echo "Command: exiv2 -dx $image.eps"
runTest exiv2 -dx "$image.eps"
exitcode="$?"
echo "Exit code: $exitcode"
if [ "$exitcode" -eq 0 ] ; then
# using perl instead of sed, because on some systems sed adds a line ending at EOF
perl -pe "s,_Exiv2Version_,$exiv2version," < "$datadir/eps/$image.eps.delxmp" > "$image.eps.delxmp"
if ! diff -q $diffargs "$image.eps.delxmp" "$image.eps" ; then
continue
fi
# Ensure that "exiv2 -ex" won't merge metadata into the
# *.exv file generated by a previous run of the test suite.
rm -f "$image.exv"
echo
echo "Command: exiv2 -f -ex $image.eps"
runTest exiv2 -f -ex "$image.eps"
echo "Exit code: $?"
if ! diff -q $diffargs "$datadir/eps/eps-test-delxmp.exv" "$image.exv" ; then
continue
fi
fi
echo
echo "Restore: $image.eps"
copyTestFile "eps/$image.eps" "$image.eps"
echo
echo "Command: exiv2 -f -eX $image.eps"
runTest exiv2 -f -eX "$image.eps"
echo "Exit code: $?"
diff -q $diffargs "$datadir/eps/$image.xmp" "$image.xmp"
# Using "-ix" instead of "-iX" because the latter
# executes writeMetadata() twice, making it hard to debug.
copyTestFile "eps/eps-test-newxmp.xmp" "$image.exv"
echo
echo "Command: exiv2 -ix $image.eps"
runTest exiv2 -ix "$image.eps"
exitcode="$?"
echo "Exit code: $exitcode"
if [ "$exitcode" -ne 0 ] ; then
continue
fi
# using perl instead of sed, because on some systems sed adds a line ending at EOF
perl -pe "s,_Exiv2Version_,$exiv2version," < "$datadir/eps/$image.eps.newxmp" > "$image.eps.newxmp"
if ! diff -q $diffargs "$image.eps.newxmp" "$image.eps" ; then
continue
fi
echo
echo "Command: (2) exiv2 -ix $image.eps"
runTest exiv2 -ix "$image.eps"
echo "Exit code: $?"
diff -q $diffargs "$image.eps.newxmp" "$image.eps"
# Ensure that "exiv2 -ex" won't merge metadata into the
# *.exv file generated by a previous run of the test suite.
rm -f "$image.exv"
echo
echo "Command: exiv2 -f -ex $image.eps"
runTest exiv2 -f -ex "$image.eps"
echo "Exit code: $?"
diff -q $diffargs "$datadir/eps/eps-test-newxmp.exv" "$image.exv"
done
) 3>&1 > "$testdir/eps-test.out" 2>&1
echo "."
# ----------------------------------------------------------------------
# Result
if ! diff -q $diffargs "$testdir/$datadir/eps/eps-test.out" "$testdir/eps-test.out" ; then
diff -u $diffargs "$testdir/$datadir/eps/eps-test.out" "$testdir/eps-test.out"
exit 1
fi
echo "All testcases passed."
# That's all Folks!
##

@ -518,22 +518,6 @@ prepareTest()
export LD_LIBRARY_PATH="$bin/../lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$bin/../lib:$LD_LIBRARY_PATH"
fi fi
if [ "$PLATFORM" == cygwin ]; then
# We need a private version of diff for linux compatibility
diff()
{
args=()
for i in "$@"; do
if [ ${i:0:1} != '-' ]; then
i="$(cygpath -aw $i)"
fi
args+=($i)
done
DIFF=$(which diff)
"$DIFF" ${args[@]}
}
fi
## ##
# figure out arguments for diff # figure out arguments for diff
good="$here/data/${this}.out" good="$here/data/${this}.out"
@ -575,7 +559,6 @@ prepareTest()
exit 42 exit 42
fi fi
done done
} }
prepareTest prepareTest

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Test driver for http/https
source ./functions.source
pushd "$testdir" 2>/dev/null
recursive=$1
server=exiv2.dyndns.org
dir=userContent/testfiles/webready
host="http://$server:8080"
if [ ! -z "$recursive" ]; then
if [ $(runTest exiv2 -vVg curlproto | grep -q https ; echo $?) == "0" ]; then
host="https://$server:8443"
else
echo "*** https is not a supported protocol - test skipped ***"
exit 0
fi
fi
echo 'server: ' $host
(
for filename in Reagan.jpg ReaganLargePng.png ReaganLargeTiff.tiff ReaganLargeJpg.jpg Reagan.tiff DSC_0002.NEF ; do
echo $filename
runTest exiv2 -pa --grep Software $host/$dir/$filename
done
) 2>&1 > $results
# ----------------------------------------------------------------------
# Evaluate results
cat $results | tr -d $'\r' > $results-stripped
mv $results-stripped $results
reportTest $results $good
popd 2>/dev/null
if [ -z "$recursive" ]; then
$0 1
fi
# That's all Folks!
##

@ -1,65 +0,0 @@
#!/usr/bin/env bash
# Test driver for httptest and httpIo
source ./functions.source
##
#function to test httpio class in basicio.cpp
httpIoTest()
{
arg=$1
scheme=${arg:0:4}
src=$(basename "$arg")
filename=${src%.*}
test=${filename}.txt
good=$datapath/remoteio.txt
dot=.
# print out the metadata
runTest remotetest $1 "--nocurl" > $test
#check results
diffCheckAscii $test $good
printf $dot
}
( cd "$testdir"
# check environmental variable
if [ -z $EXIV2_AWSUBUNTU_HOST ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_HOST "***"
exit 1
fi
errors=0
testfile="conntest.jpg"
iopngfiles+=(remoteio{1..5}.png)
iojpgfiles+=(remoteio{6..10}.jpg)
# test connection (basic sanity test)
printf 'http test connection '
TEST_CON=$("$bin"/conntest http://$EXIV2_AWSUBUNTU_HOST/$testfile)
if [[ "$TEST_CON" == OK* ]]; then
#Tests for httpIo
printf 'OK\nHTTP IO '
for name in ${iopngfiles[@]}; do
httpIoTest "http://$EXIV2_AWSUBUNTU_HOST/$name"
done
for name in ${iojpgfiles[@]}; do
httpIoTest "http://$EXIV2_AWSUBUNTU_HOST/$name"
done
if [ $errors -eq 0 ]; then
printf '\nAll test cases passed\n'
else
printf "\n---------------------------------------------------------\n"
echo $errors 'httpIo failed!'
fi
else
echo $TEST_CON
printf "FAIL\nnot run httpIo\n"
fi
)
# That's all Folks!
##

@ -1,118 +0,0 @@
#!/usr/bin/env bash
# Test driver for SshIo
source ./functions.source
##
#function to test remote read access in basicio.cpp
SFTPReadTest()
{
arg=$1
scheme=${arg:0:4}
src=$(basename "$arg")
filename=${src%.*}
test=${filename}.txt
good=$datapath/${filename}.txt
dot=.
# run tests
runTest exifprint $1 > $test
#check results
diffCheckAscii $test $good
printf $dot
}
##
#function to test remote read access in basicio.cpp
SshIOTest()
{
arg=$1
scheme=${arg:0:4}
src=$(basename "$arg")
filename=${src%.*}
test=${filename}.txt
good=$datapath/remoteio.txt
dot=.
# print out the metadata
runTest remotetest $1 > $test
#check results
diffCheckAscii $test $good
printf $dot
}
( cd "$testdir"
# check environmental variable
if [ -z $EXIV2_AWSUBUNTU_HOST ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_HOST "***"
exit 1
fi
if [ -z $EXIV2_AWSUBUNTU_USERNAME ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_USERNAME "***"
exit 1
fi
if [ -z $EXIV2_AWSUBUNTU_PASSWORD ]; then
echo "***" please set the environmental variable EXIV2_AWSUBUNTU_PASSWORD "***"
exit 1
fi
testfile="conntest.jpg"
files+=(remoteImg{0..9}.jpg)
iopngfiles+=(remoteio{1..5}.png)
iojpgfiles+=(remoteio{6..10}.jpg)
USE_SSH=$("$bin"/exiv2 -v -V | grep ^ssh= | sed s/ssh=//)
if [ "$USE_SSH" == "0" ]; then
#Skip remoteIo test cases
echo 'Ssh is not used. Skip sshio test cases.'
else
# test connection
printf 'sftp test connection '
TEST_CON=$("$bin"/conntest sftp://"$EXIV2_AWSUBUNTU_USERNAME"_sftp:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/var/www/$testfile)
if [[ "$TEST_CON" == OK* ]]; then
# SFTP protocol
errors=0
printf 'OK\nSFTP READ '
for name in ${files[@]}; do
SFTPReadTest "sftp://"$EXIV2_AWSUBUNTU_USERNAME"_sftp:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/var/www/$name"
done
if [ $errors -eq 0 ]; then
printf '\nAll test cases passed\n'
else
echo $errors ' test cases failed!'
fi
else
echo $TEST_CON
printf "FAIL\nnot run SFTP read\n"
fi
# test connection
printf 'ssh test connection '
TEST_CON=$("$bin"/conntest ssh://$EXIV2_AWSUBUNTU_USERNAME:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/sshtest/$testfile)
if [[ "$TEST_CON" == OK* ]]; then
# SSH protocol
errors=0
printf 'OK\nSSH IO '
for name in ${iopngfiles[@]}; do
SshIOTest "ssh://$EXIV2_AWSUBUNTU_USERNAME:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/sshtest/$name"
done
for name in ${iojpgfiles[@]}; do
SshIOTest "ssh://$EXIV2_AWSUBUNTU_USERNAME:$EXIV2_AWSUBUNTU_PASSWORD@$EXIV2_AWSUBUNTU_HOST/sshtest/$name"
done
if [ $errors -eq 0 ]; then
printf '\nAll test cases passed\n'
else
echo $errors ' test cases failed!'
fi
else
echo $TEST_CON
printf "FAIL\nnot run SSH read\n"
fi
fi
)
# That's all Folks!
##

@ -1,43 +0,0 @@
#!/usr/bin/env bash
msvc=$1
test=$2
home=$(dirname $(readlink -f $0))
if [ -z "$msvc" ]; then
echo usage: $0 \<path-to-msvc-bin\> [test]
exit
fi
if [ ! -d "$msvc" ]; then
echo directory "$msvc" does not exist
exit
else
msvc=$(readlink -f "$msvc")
fi
if [ -z $test ]; then
test=tests
fi
for d in $(find "$msvc" -name exiv2.exe -exec dirname {} ";"); do
export EXIV2_BINDIR=$d
bar='-----'
Bar=$bar
for i in $(seq 0 $((${#d}+1))); do Bar+=-; done
Bar+=$bar
echo $Bar
echo $bar $d $bar
echo $bar $(cygpath -aw "$msvc") $bar
echo $Bar
(
cd "$home/.."
make $test
if [ -z "$2" ]; then
$d/exiv2.exe -v -V
fi
)
done
# That's all Folks!
##

@ -1,49 +0,0 @@
#!/usr/bin/env bash
# Test driver for video files
#
# video-asf.wmv http://www.educationalquestions.com/video/DLP_PART_2_768k.wmv
# video-avi.avi http://redmine.yorba.org/attachments/631/Nikon_Coolpix_S3000.AVI
# video-matroska.mkv http://www.bunkus.org/videotools/mkvtoolnix/samples/vsshort-vorbis-subs.mkv
# video-quicktime.mp4 http://dev.exiv2.org/attachments/362/20100709_002.mp4
source ./functions.source
( cd "$testdir"
for file in ../data/video/video-*; do
video="`basename "$file"`"
if [ $video != "video-test.out" ] ; then
printf "." >&3
echo
echo "-----> $video <-----"
copyTestFile "video/$video" "$video"
echo
echo "Command: exiv2 -u -pa $video"
runTest exiv2 -u -pa "$video"
exitcode="$?"
echo "Exit code: $exitcode"
if [ "$exitcode" -ne 0 -a "$exitcode" -ne 253 ] ; then
continue
fi
fi
done
) 3>&1 > "$testdir/video-test.out" 2>&1
echo "."
# ----------------------------------------------------------------------
# Result
if ! diff -q $diffargs "$testdir/$datadir/video/video-test.out" "$testdir/video-test.out" ; then
diff -u -a $diffargs "$testdir/$datadir/video/video-test.out" "$testdir/video-test.out"
exit 1
fi
echo "All testcases passed."
# That's all Folks!
##

@ -1,68 +0,0 @@
#!/usr/bin/env bash
# Test driver for write video
source ./functions.source
##
# set up output and reference file
out=$(real_path "$testdir/$this.out")
copyTestFile "video/$this.out"
( cd "$testdir"
videos=($(copyVideoFiles))
# write metadata to videos
runTest exiv2 -M "set Xmp.video.MicroSecPerFrame 64" ${videos[*]}
runTest exiv2 -M "set Xmp.video.MaxDataRate 4096" ${videos[*]}
runTest exiv2 -M "set Xmp.video.FrameCount 2048" ${videos[*]}
runTest exiv2 -M "set Xmp.video.InitialFrames 4" ${videos[*]}
runTest exiv2 -M "set Xmp.video.StreamCount 2" ${videos[*]}
runTest exiv2 -M "set Xmp.video.SuggestedBufferSize 1024" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Width 240" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Height 320" ${videos[*]}
runTest exiv2 -M "set Xmp.video.FileDataRate 128" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Duration 2048" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Codec mjpg" ${videos[*]}
runTest exiv2 -M "set Xmp.video.FrameRate 1024" ${videos[*]}
runTest exiv2 -M "set Xmp.video.VideoQuality 128" ${videos[*]}
runTest exiv2 -M "set Xmp.video.VideoSampleSize 256" ${videos[*]}
runTest exiv2 -M "set Xmp.audio.Codec mpv4" ${videos[*]}
runTest exiv2 -M "set Xmp.audio.SampleRate 32" ${videos[*]}
runTest exiv2 -M "set Xmp.audio.SampleCount 32" ${videos[*]}
runTest exiv2 -M "set Xmp.video.DateUT $date" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Comment Metadata was Edited Using Exiv2" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Language Kannada" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Country India" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Copyright Photographer" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Genre Sample Test Video" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Software Exiv2 0.25" ${videos[*]}
runTest exiv2 -M "set Xmp.video.Junk Its a junk Data" ${videos[*]}
runTest exiv2 -M "set Xmp.video.MediaLanguage English" ${videos[*]}
for video in ${videos[*]}; do
printf "." >&3
echo
echo "-----> $video <-----"
echo
echo "Command: exiv2 -u -pa $video"
# run command | ignore binary and no Date nor NumOfColours tags
runTest exiv2 -u -pa "$video" | sed -E -e 's/\d128-\d255/_/g' | grep -a -v -e Date
done
) 3>&1 2>&1 > "$out"
echo "."
# ----------------------------------------------------------------------
# Result
diffCheck "$out" "$testdir/$datadir/video/$this.out"
if [ $errors ]; then
echo -e $errors 'test case(s) failed!'
else
echo -e "all testcases passed."
fi
# That's all Folks!
##
Loading…
Cancel
Save