diff --git a/CMakeLists.txt b/CMakeLists.txt index 167114a7..0104e666 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,16 +173,25 @@ ENDIF( EXIV2_ENABLE_BUILD_PO ) IF( NOT MSVC ) # Issue #722: out of source builds compiled against standard include files such as /usr/local/lib/include/exiv2 # do not use CREATE_SYMLINK or CMAKE_CAN_SYMLINK as they don't work on CYGWIN - EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/src exiv2) + EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/src exiv2) IF( EXIV2_ENABLE_BUILD_SAMPLES ) - EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/samples COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/src exiv2) + EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/samples COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/src exiv2) ENDIF( EXIV2_ENABLE_BUILD_SAMPLES ) IF( EXIV2_ENABLE_BUILD_PO ) - EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/po COMMAND ln -s ${CMAKE_CURRENT_SOURCE_DIR}/src exiv2) + EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/po COMMAND ln -sf ${CMAKE_CURRENT_SOURCE_DIR}/src exiv2) ENDIF( EXIV2_ENABLE_BUILD_PO ) ENDIF() +## +# tests +ADD_CUSTOM_TARGET(tests COMMAND make test "EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/test/" ) + +## +# support for test suite TODO: fixup for MSVC and think a bit more about this +# ENABLE_TESTING() +# INCLUDE(Dart) +# ADD_TEST(tests bash -c "cd ${CMAKE_SOURCE_DIR}/test/ ; make EXIV2_BINDIR=${CMAKE_BINARY_DIR}/bin" ) # That's all Folks! ## diff --git a/Makefile b/Makefile index f61de3fc..d4be5f91 100644 --- a/Makefile +++ b/Makefile @@ -72,6 +72,9 @@ samples: config/config.mk config: cd config && $(MAKE) -f config.make $(MAKECMDGOALS) + +tests: + cd test && $(MAKE) test xmpsdk: config/config.mk if test "x$(ENABLE_XMP)" = "x1"; then cd xmpsdk/src && $(MAKE) $@; fi; @@ -89,6 +92,7 @@ mostlyclean clean: config/config.mk # for packaging. distclean: clean rm -f config.log config.status libtool + rm -f bin rm -f *~ *.bak *# # This removes almost everything, including the configure script! diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index 0403fc24..63b37733 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -8,6 +8,10 @@ # automatically include all po files in the directory FILE(GLOB PO_FILES *.po) +if ( NOT MSVC ) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +endif() + UPDATE_TRANSLATIONS(exiv2 ${PO_FILES}) ADD_TRANSLATIONS(exiv2 ${PO_FILES}) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 5746dec5..2d285477 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -5,6 +5,10 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +if ( NOT MSVC ) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +endif() + if (MSVC) include(../CMake_msvc.txt) msvc_runtime_configure(${EXIV2_ENABLE_SHARED}) diff --git a/samples/Makefile b/samples/Makefile index 99d1d723..198b15c4 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -108,7 +108,8 @@ $(BINOBJ): %.o: %.cpp @$(POSTDEPEND) $(BINARY): %: %.o - $(LIBTOOL) --mode=link $(LINK.cc) -o $@ $@.o + mkdir -pv ../bin 2>&1 > /dev/null + $(LIBTOOL) --mode=link $(LINK.cc) -o ../bin/$@ $@.o %.ii: %.cpp set -e; \ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0ac55174..7dfe16dc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,10 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +if ( NOT MSVC ) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +endif() + # Private headers which are only needed for the library itself SET( LIBEXIV2_PRIVATE_HDR canonmn_int.hpp cr2image_int.hpp diff --git a/src/Makefile b/src/Makefile index 11adc0b3..bd74b75f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -247,17 +247,20 @@ lib: $(OBJ) $(LIBTOOL) --mode=link $(LINK.cc) -o $(LIBRARY) $(LOBJ) -rpath $(libdir) -version-info $(EXIV2_LTVERSION) $(LIBS) @touch lib -path-test: path-test.o utils.o - $(CXX) $(CXXFLAGS) path-test.o utils.o -o $@ +path-test: path-test.o utils.o + mkdir -pv ../bin 2>&1 > /dev/null + $(CXX) $(CXXFLAGS) path-test.o utils.o -o ../bin/$@ $(BINARY): %: %.o lib @$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $(LIBRARY) $@.o -rpath $(libdir) $(EXIV2BIN): lib $(EXIV2OBJ) $(EXIV2COBJ) - @$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $(LIBRARY) $(EXIV2OBJ) $(EXIV2COBJ) -rpath $(libdir) + mkdir -pv ../bin 2>&1 > /dev/null + @$(LIBTOOL) --mode=link $(LINK.cc) -o ../bin/$@ $(LIBRARY) $(EXIV2OBJ) $(EXIV2COBJ) -rpath $(libdir) $(MCBIN): lib $(MCOBJ) - @$(LIBTOOL) --mode=link $(LINK.cc) -o $@ $(LIBRARY) $(MCOBJ) -rpath $(libdir) + mkdir -pv ../bin 2>&1 > /dev/null + @$(LIBTOOL) --mode=link $(LINK.cc) -o ../bin/$@ $(LIBRARY) $(MCOBJ) -rpath $(libdir) install-header: $(INSTALL_DIRS) $(DESTDIR)$(incdir) @@ -277,7 +280,7 @@ install-lib: lib install-header install: $(EXIV2BIN) install-lib $(INSTALL_DIRS) $(DESTDIR)$(bindir) - @$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(EXIV2EXE) $(DESTDIR)$(bindir)/$(EXIV2EXE) + @$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) bin/$(EXIV2EXE) $(DESTDIR)$(bindir)/$(EXIV2EXE) $(INSTALL_DIRS) $(DESTDIR)$(mandir) $(INSTALL_DIRS) $(DESTDIR)$(man1dir) $(INSTALL_DATA) exiv2.1 $(DESTDIR)$(man1dir)/exiv2.1 diff --git a/test/Makefile b/test/Makefile index 6d223542..78a32b9f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -77,7 +77,6 @@ TESTS = addmoddel.sh \ video-test.sh test: - ./mingfixup.sh @list='$(TESTS)'; for p in $$list; do \ echo Running $$p ...; \ ./$$p; \ diff --git a/test/addmoddel.sh b/test/addmoddel.sh index 4d49d44b..481697fe 100755 --- a/test/addmoddel.sh +++ b/test/addmoddel.sh @@ -11,15 +11,13 @@ if [ $? -ne 0 ] ; then fi ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cp -f ./data/exiv2-empty.jpg ./tmp cd ./tmp -$samples/addmoddel exiv2-empty.jpg +$bin/addmoddel exiv2-empty.jpg $bin/exiv2 -pv exiv2-empty.jpg ) > $results diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh index c5fad4f3..601473ee 100755 --- a/test/bugfixes-test.sh +++ b/test/bugfixes-test.sh @@ -24,11 +24,9 @@ prep_any_file() ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cd ./tmp @@ -78,7 +76,7 @@ $bin/exiv2 -u -pt $filename num=480 filename=`prep_file $num` -$samples/largeiptc-test $filename ../data/imagemagick.png +$bin/largeiptc-test $filename ../data/imagemagick.png num=495 filename=`prep_file $num` @@ -182,11 +180,11 @@ $bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing $bin/exiv2 -u -v -PEkyct $filename # Test easy-access keys (using a dummy bug number) -if { test -f $samples/easyaccess-test || test -f $samples/easyaccess-test.exe; }; then +if { test -f $bin/easyaccess-test || test -f $bin/easyaccess-test.exe; }; then num=726 filename=`prep_empty_file $num` $bin/exiv2 -u -v -M"set Exif.Image.Make Samsung" $filename - $samples/easyaccess-test $filename + $bin/easyaccess-test $filename else echo "bugfixes-test.sh: easyaccess-test executable not found. Skipping regression test for issue #726." fi diff --git a/test/conversions.sh b/test/conversions.sh index 2ded7191..56fe2257 100755 --- a/test/conversions.sh +++ b/test/conversions.sh @@ -7,11 +7,9 @@ export LC_ALL=C results="./conversions.out" good="../data/conversions.out" if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cd ./tmp diff --git a/test/crw-test.sh b/test/crw-test.sh index aae443e0..e1996f46 100755 --- a/test/crw-test.sh +++ b/test/crw-test.sh @@ -17,11 +17,9 @@ fi # Main routine ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cmdfile=cmdfile crwfile=exiv2-canon-powershot-s40.crw diff --git a/test/eps-test.sh b/test/eps-test.sh index 617ecdda..c955b83b 100755 --- a/test/eps-test.sh +++ b/test/eps-test.sh @@ -6,11 +6,9 @@ export LC_ALL=C cd tmp/ if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi exiv2version="`$bin/exiv2 -V | sed -n '1 s,^exiv2 [^ ]* \([^ ]*\).*,\1,p'`" if [ -z "$exiv2version" ]; then diff --git a/test/exifdata-test.sh b/test/exifdata-test.sh index 13fd239e..6b7dcc2f 100755 --- a/test/exifdata-test.sh +++ b/test/exifdata-test.sh @@ -11,8 +11,8 @@ if [ $? -ne 0 ] ; then fi ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" + samples="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" samples="$VALGRIND $EXIV2_BINDIR" @@ -21,9 +21,9 @@ cp -f ./data/exiv2-gc.jpg ./tmp cp -f ./data/exiv2-canon-powershot-s40.jpg ./tmp cp -f ./data/exiv2-nikon-d70.jpg ./tmp cd ./tmp -$samples/exifdata-test exiv2-gc.jpg -$samples/exifdata-test exiv2-canon-powershot-s40.jpg -$samples/exifdata-test exiv2-nikon-d70.jpg +$bin/exifdata-test exiv2-gc.jpg +$bin/exifdata-test exiv2-canon-powershot-s40.jpg +$bin/exifdata-test exiv2-nikon-d70.jpg ) | tr -d '\r' > $results diff -q $diffargs $results $good diff --git a/test/exiv2-test.sh b/test/exiv2-test.sh index c6ef3230..66084766 100755 --- a/test/exiv2-test.sh +++ b/test/exiv2-test.sh @@ -10,11 +10,9 @@ fi export LC_ALL=C if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi results="./tmp/exiv2-test.out" good="./data/exiv2-test.out" diff --git a/test/imagetest.sh b/test/imagetest.sh index cc2df2f9..84f54214 100755 --- a/test/imagetest.sh +++ b/test/imagetest.sh @@ -76,11 +76,9 @@ diffCheck() # main if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi datapath="../data" diff --git a/test/iotest.sh b/test/iotest.sh index 172b1159..845b17f4 100755 --- a/test/iotest.sh +++ b/test/iotest.sh @@ -8,7 +8,7 @@ ioTest() out2=${1}.2 #run tests - $samples/iotest $src $out1 $out2 + $bin/iotest $src $out1 $out2 if [ $? -ne 0 ]; then errors=`expr $errors + 1` return @@ -39,11 +39,9 @@ diffCheck() # main if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi datapath="../data" diff --git a/test/iptctest.sh b/test/iptctest.sh index 0b1debc0..f1f04961 100755 --- a/test/iptctest.sh +++ b/test/iptctest.sh @@ -8,7 +8,7 @@ printTest() good=$datapath/${src}.ipgd #run tests - $samples/iptcprint $datapath/$src > $test + $bin/iptcprint $datapath/$src > $test #check results diffCheck $test $good @@ -26,7 +26,7 @@ removeTest() cp $datapath/$src $tmp #run tests - $samples/iptctest $tmp <<-eoc + $bin/iptctest $tmp <<-eoc r Iptc.Application2.Byline r Iptc.Application2.Caption r Iptc.Application2.Keywords @@ -34,7 +34,7 @@ removeTest() r Iptc.Application2.Keywords r Iptc.Application2.CountryName eoc - $samples/iptcprint $tmp > $test + $bin/iptcprint $tmp > $test #check results diffCheck $test $good @@ -53,7 +53,7 @@ addModTest() cp $datapath/$src $tmp #run tests - $samples/iptctest $tmp <<-eoc + $bin/iptctest $tmp <<-eoc a Iptc.Application2.Headline The headline I am a Iptc.Application2.Keywords Yet another keyword m Iptc.Application2.DateCreated 2004-8-3 @@ -63,7 +63,7 @@ addModTest() a Iptc.Envelope.TimeSent 14:41:0-05:00 a Iptc.Application2.RasterizedCaption 230 42 34 2 90 84 23 146 eoc - $samples/iptcprint $tmp > $test + $bin/iptcprint $tmp > $test #check results diffCheck $test $good @@ -82,8 +82,8 @@ extendedTest() cp $datapath/$src $tmp #run tests - $samples/iptctest $tmp < $datapath/ext.dat - $samples/iptcprint $tmp > $test + $bin/iptctest $tmp < $datapath/ext.dat + $bin/iptcprint $tmp > $test #check results diffCheck $test $good @@ -111,11 +111,9 @@ diffCheck() # main if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi datapath="../data" diffargs="--strip-trailing-cr" diff --git a/test/mingfixup.sh b/test/mingfixup.sh deleted file mode 100755 index 6e26b01d..00000000 --- a/test/mingfixup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -## -# for MING, ensure that we have .exe files in src and samples -os=$(uname) -if [ "${os:0:4}" == "MING" ]; then - cp ../src/.libs/*.exe ../src/ - cp ../src/.libs/*.dll ../src/ - cp ../samples/.libs/*.exe ../samples/ -fi - -# That's all Folks! -## diff --git a/test/modify-test.sh b/test/modify-test.sh index ad2f7d84..a793b73b 100755 --- a/test/modify-test.sh +++ b/test/modify-test.sh @@ -2,11 +2,9 @@ # Test driver for write unit tests to build Exif metadata from scratch export LC_ALL=C if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi results="./tmp/modify-test.out" good="./data/modify-test.out" diff --git a/test/path-test.sh b/test/path-test.sh index be009921..b7b445bb 100755 --- a/test/path-test.sh +++ b/test/path-test.sh @@ -1,11 +1,9 @@ #! /bin/sh # Mini test-driver for path utility functions if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cd ./tmp diff --git a/test/preview-test.sh b/test/preview-test.sh index adf4c948..4dfea1c2 100755 --- a/test/preview-test.sh +++ b/test/preview-test.sh @@ -6,11 +6,9 @@ export LC_ALL=C cd tmp/ if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi diffargs="--strip-trailing-cr" if ! diff -q $diffargs /dev/null /dev/null 2>/dev/null ; then diff --git a/test/stringto-test.sh b/test/stringto-test.sh index 6e68e443..d6636473 100755 --- a/test/stringto-test.sh +++ b/test/stringto-test.sh @@ -11,14 +11,12 @@ if [ $? -ne 0 ] ; then fi ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cd ./tmp -$samples/stringto-test +$bin/stringto-test ) > $results diff -q $diffargs $results $good diff --git a/test/tiff-test.sh b/test/tiff-test.sh index 052741e0..e7e16d50 100644 --- a/test/tiff-test.sh +++ b/test/tiff-test.sh @@ -17,11 +17,9 @@ good="./data/tiff-test.out" # Main routine ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cd ./tmp @@ -30,7 +28,7 @@ cd ./tmp testfile=mini9.tif cp -f ../data/$testfile . exifprobe $testfile -$samples/tiff-test $testfile +$bin/tiff-test $testfile exifprobe $testfile ) > $results diff --git a/test/video-test.sh b/test/video-test.sh index a52cf8fb..81aedc45 100755 --- a/test/video-test.sh +++ b/test/video-test.sh @@ -11,11 +11,9 @@ export LC_ALL=C cd tmp/ if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi diffargs="--strip-trailing-cr" if ! diff -q $diffargs /dev/null /dev/null 2>/dev/null ; then diff --git a/test/write-test.sh b/test/write-test.sh index a50a349a..0b7016a3 100755 --- a/test/write-test.sh +++ b/test/write-test.sh @@ -22,9 +22,9 @@ runTestCase() rm -f $datapath/iii $datapath/ttt; echo "------------------------------------------------------------" - $samples/exifprint $rtc_infile > $datapath/iii; + $bin/exifprint $rtc_infile > $datapath/iii; cp $rtc_infile $rtc_outfile; - $samples/write-test $rtc_infile $rtc_number > $datapath/ttt; + $bin/write-test $rtc_infile $rtc_number > $datapath/ttt; diff -a $datapath/iii $datapath/ttt } @@ -32,11 +32,9 @@ runTestCase() # main if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi datapath="." diffargs="--strip-trailing-cr" diff --git a/test/write2-test.sh b/test/write2-test.sh index f2e738ac..f24706a8 100755 --- a/test/write2-test.sh +++ b/test/write2-test.sh @@ -11,15 +11,13 @@ if [ $? -ne 0 ] ; then fi ( if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cp -f ./data/exiv2-empty.jpg ./tmp cd ./tmp -$samples/write2-test exiv2-empty.jpg +$bin/write2-test exiv2-empty.jpg ) > $results diff -q $diffargs $results $good diff --git a/test/xmpparser-test.sh b/test/xmpparser-test.sh index db76cf67..2b358a5c 100755 --- a/test/xmpparser-test.sh +++ b/test/xmpparser-test.sh @@ -7,11 +7,9 @@ export LC_ALL=C results="./xmpparser-test.out" good="../data/xmpparser-test.out" if [ -z "$EXIV2_BINDIR" ] ; then - bin="$VALGRIND ../../src" - samples="$VALGRIND ../../samples" + bin="$VALGRIND ../../bin" else bin="$VALGRIND $EXIV2_BINDIR" - samples="$VALGRIND $EXIV2_BINDIR" fi cd ./tmp @@ -29,29 +27,29 @@ fi # BlueSquare testfile=BlueSquare.xmp cp -f ../data/$testfile . -$samples/xmpparser-test $testfile +$bin/xmpparser-test $testfile diff $testfile ${testfile}-new # ---------------------------------------------------------------------- # StaffPhotographer-Example testfile=StaffPhotographer-Example.xmp cp -f ../data/$testfile . -$samples/xmpparser-test $testfile +$bin/xmpparser-test $testfile diff $testfile ${testfile}-new # ---------------------------------------------------------------------- # xmpsdk testfile=xmpsdk.xmp cp -f ../data/$testfile . -$samples/xmpparser-test $testfile +$bin/xmpparser-test $testfile diff $testfile ${testfile}-new -$samples/xmpparse ${testfile} > t1 2>&1 -$samples/xmpparse ${testfile}-new > t2 2>&1 +$bin/xmpparse ${testfile} > t1 2>&1 +$bin/xmpparse ${testfile}-new > t2 2>&1 diff t1 t2 # ---------------------------------------------------------------------- # xmpsample -$samples/xmpsample +$bin/xmpsample # ---------------------------------------------------------------------- # XMP sample commands