Source: camitk
Version: 3.3.2
Severity: normal
Tags: patch
User: autopkgtest-de...@lists.alioth.debian.org
Usertags: autopkgtest

Dear Maintainer,

The tests are failing in debci using autopkgtest. Below the
autopkgtest's log:

adt-run [10:41:33]: test config: [-----------------------
Detected CamiTK version is 3.3.2
Checking configuration...
CamiTK 3.3.2 configuration: Failed
*** /tmp/tmp.7UFVhpL5VP 2014-08-14 13:41:34.406124763 +0000
--- /tmp/tmp.l2kwtyqGdo 2014-08-14 13:41:33.626115358 +0000
***************
*** 1,9 ****
- CamiTK 3.3.2
- - CamiTK version......................... CamiTK 3.3.2
- - CamiTK Short Version................... camitk-3.3
- - CamiTK SO NAME......................... 3
- - CamiTK Global Installation Directory... /usr
- - Component Extension Directories........
  /usr/lib/camitk-3.3/components
- - Action Extension Directories........... /usr/lib/camitk-3.3/actions
- - Number of Component Extensions......... 12
- - Number of Action Extensions............ 71
--- 0 ----
adt-run [10:41:34]: test config: -----------------------]


The config output was hard coded in debian/tests/config only to versions
3.3.1 e 3.2.2 and the version of camitk in Debian repository is 3.3.2,
because of this the tests are failing. This patch is a temporary
solution until add complete library tests using cepgenerator (TODO). I
am creating expected config output dynamically with argument of test
(version of camitk), with this modifications the test can generate the
expected config output for any camitk version.

Thanks for consider it!


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru camitk-3.3.2.orig/debian/tests/config camitk-3.3.2/debian/tests/config
--- camitk-3.3.2.orig/debian/tests/config	2014-08-09 16:49:24.770268433 -0300
+++ camitk-3.3.2/debian/tests/config	2014-08-13 11:03:42.026167366 -0300
@@ -20,33 +20,19 @@
 # depending on the CamiTK version, the output is different
 expectedConfigOutput () {
 
-  if [ "$1" = "3.3.1" ]; then
-		cat <<EOF > $EXPECTED_CONFIG_OUTPUT
-CamiTK 3.3.1
-- CamiTK version......................... CamiTK 3.3.1
-- CamiTK Short Version................... camitk-3.3
-- CamiTK SO NAME......................... 3
+TINY=$1
+MINOR=${TINY%.*}
+MAJOR=${MINOR%.*}
+
+cat <<EOF > $EXPECTED_CONFIG_OUTPUT
+CamiTK $TINY
+- CamiTK version......................... CamiTK $TINY
+- CamiTK Short Version................... camitk-$MINOR
+- CamiTK SO NAME......................... $MAJOR
 - CamiTK Global Installation Directory... /usr
-- Component Extension Directories........ /usr/lib/camitk-3.3/components
-- Action Extension Directories........... /usr/lib/camitk-3.3/actions
-- Number of Component Extensions......... 12
-- Number of Action Extensions............ 71
+- Component Extension Directories........ /usr/lib/camitk-$MINOR/components
+- Action Extension Directories........... /usr/lib/camitk-$MINOR/actions
 EOF
-	fi
-
-	if [ "$1" = "3.2.2" ]; then
-		cat <<EOF > $EXPECTED_CONFIG_OUTPUT
-- CamiTK version......................... CamiTK 3.2.2
-- CamiTK Short Version................... camitk-3.2
-- CamiTK SO NAME......................... 3
-- CamiTK Global Installation Directory... /usr
-- Component Extension Directories........ /usr/lib/camitk-3.2/components
-- Action Extension Directories........... /usr/lib/camitk-3.2/actions
-- Number of Component Extensions......... 10
-- Number of Action Extensions............ 65
-- Registered components (G=Global, L=Local, W=Working, U=User):
-EOF
-	fi
 }
 
 # if a problem occurs, call the clean method
@@ -61,7 +47,7 @@
 
 # run the config diagnosis (skipping the user/path dependent part using sed)
 # TODO: update the camitk-config code so that extensions are always listed in the same order
-xvfb-run --auto-servernum --server-num=1 camitk-config --config | sed -n "1,5p; 9,12p" > $CONFIG_OUTPUT
+xvfb-run --auto-servernum --server-num=1 camitk-config --config | sed -n "1,5p; 9,10p" > $CONFIG_OUTPUT
 
 # compare output to expected output
 echo "Checking configuration..."

Reply via email to