Package: iscsitarget
Version: 1.4.20.2-5
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu saucy ubuntu-patch

Added dep-8-tests


*** /tmp/tmp7EUYV6/bug_body

In Ubuntu, the attached patch was applied to achieve the following:

## Added dep-8-tests to improve ubuntu QA


  * d/tests: added dep-8-tests


Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers saucy-updates
  APT policy: (500, 'saucy-updates'), (500, 'saucy-security'), (500, 'saucy'), 
(100, 'saucy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8.0-19-generic (SMP w/4 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
=== modified file 'debian/changelog'

=== modified file 'debian/control'
--- debian/control	2011-06-29 11:04:54 +0000
+++ debian/control	2013-05-13 15:47:17 +0000
@@ -9,6 +9,7 @@
 Homepage: http://iscsitarget.sourceforge.net/
 Vcs-Git: git://git.debian.org/git/pkg-iscsi/iscsitarget.git
 Vcs-Browser: http://git.debian.org/?p=pkg-iscsi/iscsitarget.git
+XS-Testsuite: autopkgtest
 
 Package: iscsitarget
 Architecture: any

=== added directory 'debian/tests'
=== added file 'debian/tests/control'
--- debian/tests/control	1970-01-01 00:00:00 +0000
+++ debian/tests/control	2013-05-10 20:31:15 +0000
@@ -0,0 +1,3 @@
+Tests: daemon
+Depends: iscsitarget, iscsitarget-dkms
+Restrictions: needs-root

=== added file 'debian/tests/daemon'
--- debian/tests/daemon	1970-01-01 00:00:00 +0000
+++ debian/tests/daemon	2013-05-10 20:47:08 +0000
@@ -0,0 +1,20 @@
+#!/bin/bash
+#--------------------------
+# Testing iscitarget daemon
+#--------------------------
+set -e
+
+# modify /etc/default/iscsitarget to enable it
+CONFIG_FILE=/etc/default/iscsitarget
+TMP_CONFIG_FILE=/etc/default/iscsitarget.old
+sed -e "s/ISCSITARGET_ENABLE=false/ISCITARGET_ENABLE=true/g" $CONFIG_FILE > $TMP_CONFIG_FILE
+mv $TMP_CONFIG_FILE $CONFIG_FILE
+/etc/init.d/iscsitarget start >/dev/null 2>&1
+
+if ps aux | grep -v "grep" | grep -q "iscsitarget" > /dev/null; then
+    echo "OK"
+    exit 0
+else
+    echo "ERROR: ISCITARGET IS NOT RUNNING"
+    exit 1
+fi

Reply via email to