Post all executables to <exiv2-dir>/bin. Adjust test scripts accordingly. Added target make tests.
Thanks to Shawn for his input and help with this.
This commit is contained in:
+12
-3
@@ -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!
|
||||
##
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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})
|
||||
|
||||
@@ -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})
|
||||
|
||||
+2
-1
@@ -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; \
|
||||
|
||||
@@ -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
|
||||
|
||||
+8
-5
@@ -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
|
||||
|
||||
@@ -77,7 +77,6 @@ TESTS = addmoddel.sh \
|
||||
video-test.sh
|
||||
|
||||
test:
|
||||
./mingfixup.sh
|
||||
@list='$(TESTS)'; for p in $$list; do \
|
||||
echo Running $$p ...; \
|
||||
./$$p; \
|
||||
|
||||
+2
-4
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-3
@@ -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"
|
||||
|
||||
+1
-3
@@ -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"
|
||||
|
||||
+2
-4
@@ -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"
|
||||
|
||||
+8
-10
@@ -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"
|
||||
|
||||
@@ -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!
|
||||
##
|
||||
+1
-3
@@ -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"
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-4
@@ -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
|
||||
|
||||
+1
-3
@@ -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
|
||||
|
||||
+3
-5
@@ -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"
|
||||
|
||||
+2
-4
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user