[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:44:55 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=fc3b735

The following commit has been merged in the master branch:
commit fc3b7354602103119412ea591cf14c7627fecbd5
Author: Robin Mills <robin at clanmills.com>
Date:   Tue Mar 24 10:36:53 2015 +0000

    #1042 #1043 #812  Added test regression detectors
---
 test/bugfixes-test.sh       |  45 +++++++++++++++++++++++++++------------
 test/data/bugfixes-test.out | Bin 124167 -> 130985 bytes
 test/functions.source       |  50 ++++++++++++++++++++++++++------------------
 3 files changed, 62 insertions(+), 33 deletions(-)

diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index 2461c79..319aaaf 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -127,7 +127,7 @@ source ./functions.source
 	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)
@@ -153,7 +153,7 @@ source ./functions.source
 	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
@@ -163,7 +163,7 @@ source ./functions.source
 	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`
@@ -174,12 +174,12 @@ source ./functions.source
 	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=799
 	filename=`prep_empty_file $num`
 	copyTestFile         bug$num.cmd
@@ -187,19 +187,28 @@ source ./functions.source
 	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 
+			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
+	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=831
 	filename=exiv2-bug$num.tif
 	printf "$num " >&3
@@ -207,7 +216,7 @@ source ./functions.source
 	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
@@ -221,7 +230,7 @@ source ./functions.source
 		# 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
@@ -250,7 +259,7 @@ source ./functions.source
 	printf "$num " >&3
 	echo '------>' Bug $num '<-------' >&2
 	copyTestFile  $filename
-	runTest exiv2 -q -pa      -g dwc  $filename 
+	runTest exiv2 -q -pa      -g dwc  $filename
 	runTest exiv2 -q -PXkyctl -g Date $filename
 
 	num=937a
@@ -273,7 +282,17 @@ source ./functions.source
 	printf "$num " >&3
 	echo '------>' Bug $num '<-------' >&2
 	copyTestFile  $filename
-	runTest exiv2 -q -pa -g Lens $filename 
+	runTest exiv2 -q -pa -g Lens $filename
+
+	num=1043  # looping and writing to a samba drive can hang!
+	printf "$num " >&3
+	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
 
 ) 3>&1 > $results 2>&1
 
@@ -282,7 +301,7 @@ printf "
"
 # ----------------------------------------------------------------------
 # Evaluate results
 cat $results | sed 's/\x0d$//' > $results-stripped
-reportTest $results-stripped $good 
+reportTest $results-stripped $good
 
 # That's all Folks!
 ##
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index d45dd7e..8943588 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/functions.source b/test/functions.source
index ce69673..dea776f 100644
--- a/test/functions.source
+++ b/test/functions.source
@@ -63,7 +63,7 @@ copyTestFile()
 	else
 		echo "*** error copyTestFile: illegal number of inputs = $# ***"
 	fi
-	
+
 }
 
 ##
@@ -88,12 +88,12 @@ reportTest()
     if [ $# -eq 0 ]; then
         lhs=$results
         rhs=$good
-    else 
+    else
         if [ $# -eq 3 ] ; then
             diffargs=$1
             lhs=$2
             rhs=$3
-        else 
+        else
             lhs=$1
             rhs=$2
         fi
@@ -114,7 +114,7 @@ reportTest()
 
 ##
 # moved here from write-test.sh
-# Function: 
+# Function:
 #     runTestCase number file
 # Params:
 #     number: Test case number
@@ -131,12 +131,12 @@ runTestCase()
     rtc_tifthumb=thumb${rtc_number}.tif
 
     rm -f $rtc_outfile $rtc_jpgthumb $rtc_tifthumb
-    rm -f iii ttt; 
+    rm -f iii ttt;
 
     echo "------------------------------------------------------------"
     runTest exifprint $rtc_infile > iii;
-    cp $rtc_infile $rtc_outfile; 
-    runTest write-test $rtc_infile $rtc_number > ttt; 
+    cp $rtc_infile $rtc_outfile;
+    runTest write-test $rtc_infile $rtc_number > ttt;
     diff -a iii ttt
 }
 
@@ -218,19 +218,19 @@ iptcTest()
 }
 
 # Make sure to pass the test file first and the known good file second
-diffCheck() 
+diffCheck()
 {
     test=$(real_path $1)
     good=$(real_path $2)
     if [ -z "$errors" ]; then let -a errors=0; fi
-    
+
     #run diff and check results
     diff -q --binary $diffargs "$test" "$good"
     if [ $? -ne 0 ]; then
        errors=$(expr $errors + 1)
     else
        rm $test
-    fi 
+    fi
 }
 
 
@@ -247,11 +247,11 @@ ioTest()
     if [ $? -ne 0 ]; then
        errors=`expr $errors + 1`
        return
-    fi 
+    fi
 
     #check results
-    diffCheck $out1 $src 
-    diffCheck $out2 $src 
+    diffCheck $out1 $src
+    diffCheck $out2 $src
     printf "."
 }
 
@@ -348,13 +348,23 @@ extendedTest()
     rm $tmp
 }
 
+##
+#
+hardLinkFiles()
+{
+	target="$1"
+	shift
+	for var; do
+		ln $target $var
+	done
+}
 
 ##
 # real_path - report the absolute path to a file
 real_path ()
 {
 	if [ "$PLATFORM" == "Darwin" ]; then
-		if [ -d "$1" ]; then	
+		if [ -d "$1" ]; then
 			cd "$1"
 			echo $PWD
 		else
@@ -382,7 +392,7 @@ copyVideoFiles ()
 		# http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
 		ext="${video##*.}"
 		if [ $ext != out ]; then
-			copyTestFile "$video" 
+			copyTestFile "$video"
 			videos+=($(basename "$video"))
 		fi
 	done
@@ -396,7 +406,7 @@ copyVideoFiles ()
 	fi
 
 	# http://stackoverflow.com/questions/7442417/how-to-sort-an-array-in-bash
-	readarray -t sorted < <(printf '%s

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list