[libdbd-odbc-perl] 01/04: Enable tests during build and autopkgtest.

gregor herrmann gregoa at debian.org
Sat Oct 1 17:09:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libdbd-odbc-perl.

commit a11b0572698526387bf3db787ec53d0fbcba25f5
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat Oct 1 19:04:41 2016 +0200

    Enable tests during build and autopkgtest.
    
    This uses the SQLite3 driver, as upstream does on their travis tests.
    
    Closes: #839212
---
 debian/control                  |  1 +
 debian/rules                    | 21 +--------------------
 debian/tests/pkg-perl/smoke-env |  1 +
 3 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/debian/control b/debian/control
index dde6421..6a57d70 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Testsuite: autopkgtest-pkg-perl
 Priority: optional
 Build-Depends: debhelper (>= 9.20120312),
                libdbi-perl,
+               libsqliteodbc,
                perl,
                unixodbc-dev
 Standards-Version: 3.9.8
diff --git a/debian/rules b/debian/rules
index b2062f1..144fe85 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,33 +3,14 @@
 PACKAGE = $(shell dh_listpackages)
 TMP     = $(CURDIR)/debian/$(PACKAGE)
 
-# for test target, see below
-DBUSER  := $(shell whoami)
-DBNAME  := dbd_odbc_test_db
-
 %:
 	dh $@ --with perl_dbi
 
-# here is a test target -- it works for me under postgres
-# keeping it in a separate make target, and not actually invoking it
-# should keep the requirements simpler for the non-i386 builds
-# I use the following in ~/.odbc.ini
-#	[dbd_odbc_test_db]
-#	Driver       = /usr/lib/libpsqlodbc.so
-#	Database     = dbd_odbc_test_db
-#	ReadOnly     = 0
-#	Servername   = localhost
-test:
-	createdb $(DBNAME)
-	-DBI_USER=$(DBUSER) DBI_DSN=dbi:ODBC:$(DBNAME) \
-		$(MAKE) test TEST_VERBOSE=1
-	-dropdb $(DBNAME)
-
 override_dh_auto_configure:
 	PERL_DBD_ODBC_PREFER_UNIXODBC=1 dh_auto_configure
 
 override_dh_auto_test:
-	# To run tests, use 'debian/rules test'
+	DBI_DSN=dbi:ODBC:DRIVER=SQLite3 dh_auto_test
 
 override_dh_installexamples:
 	dh_installexamples
diff --git a/debian/tests/pkg-perl/smoke-env b/debian/tests/pkg-perl/smoke-env
new file mode 100644
index 0000000..1f1a0a1
--- /dev/null
+++ b/debian/tests/pkg-perl/smoke-env
@@ -0,0 +1 @@
+DBI_DSN=dbi:ODBC:DRIVER=SQLite3

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdbd-odbc-perl.git



More information about the Pkg-perl-cvs-commits mailing list