[DRE-commits] [ruby-mysql] 07/08: Run tests only on CI

Antonio Terceiro terceiro at moszumanska.debian.org
Mon Oct 6 11:54:35 UTC 2014


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

terceiro pushed a commit to branch master
in repository ruby-mysql.

commit 4b7d1b3e0da474f208c57e537225f647a2d8a16a
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Mon Oct 6 08:33:05 2014 -0300

    Run tests only on CI
    
    Since the tests need a running MySQL server
---
 debian/changelog                                        |  2 ++
 debian/control                                          |  2 +-
 debian/patches/add-basic-encoding-awareness-logic.patch |  6 +++---
 debian/ruby-test-files.yaml                             |  2 --
 debian/rules                                            |  2 --
 debian/tests/control                                    |  2 ++
 debian/tests/test-suite                                 | 11 +++++++++++
 7 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 763a68a..6fcedb5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ ruby-mysql (2.9.1-1) UNRELEASED; urgency=medium
   * New upstream release.
   * debian/patches/add-basic-encoding-awareness-logic.patch: rebase against
     latest upstream code.
+  * Added DEP-8 testsuite using the upstream test suite, against a local MySQL
+    server.
 
  -- Antonio Terceiro <terceiro at debian.org>  Sun, 05 Oct 2014 16:04:40 -0300
 
diff --git a/debian/control b/debian/control
index 6f650cd..f0b634d 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-mysql.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-mysql.git;a=summary
 Homepage: http://www.tmtm.org/en/mysql/
 XS-Ruby-Versions: all
-Testsuite: autopkgtest-pkg-ruby
+Testsuite: autopkgtest
 
 Package: ruby-mysql
 Architecture: any
diff --git a/debian/patches/add-basic-encoding-awareness-logic.patch b/debian/patches/add-basic-encoding-awareness-logic.patch
index 3850f1e..087e408 100644
--- a/debian/patches/add-basic-encoding-awareness-logic.patch
+++ b/debian/patches/add-basic-encoding-awareness-logic.patch
@@ -10,7 +10,7 @@ Author: Loren Segal <lsegal at soen.ca>
 Origin: https://github.com/lsegal/mysql-ruby/commit/b7e4613559f0a741935ad375f07f9411c2107bb7
 Bug-Debian: http://bugs.debian.org/678515
 Reviewed-By: Antonio Terceiro <terceiro at debian.org>
-Last-Update: 2012-08-05
+Last-Update: 2014-10-06
 
 --- a/ext/mysql_api/mysql.c
 +++ b/ext/mysql_api/mysql.c
@@ -260,7 +260,7 @@ Last-Update: 2012-08-05
        assert_equal([""], @s.fetch)
 -      assert_equal(["abc"], @s.fetch)
 +      row = @s.fetch
-+      assert_equal(Encoding.default_external, row[0].encoding) if RUBY_VERSION =~ /1.9/
++      assert_equal(Encoding.default_external, row[0].encoding) if RUBY_VERSION >= '1.9'
 +      assert_equal(["abc"], row)
        assert_equal(["def"], @s.fetch)
        assert_equal(["abc"], @s.fetch)
@@ -269,7 +269,7 @@ Last-Update: 2012-08-05
          case c
          when 0
            assert_equal([1,"abc",Mysql::Time.new(1970,12,24,23,59,05)], a)
-+          assert_equal(Encoding.default_external, a[1].encoding) if RUBY_VERSION =~ /1.9/
++          assert_equal(Encoding.default_external, a[1].encoding) if RUBY_VERSION >= '1.9'
          when 1
            assert_equal([2,"def",Mysql::Time.new(2112,9,3,12,34,56)], a)
          when 2
diff --git a/debian/ruby-test-files.yaml b/debian/ruby-test-files.yaml
deleted file mode 100644
index f0adab5..0000000
--- a/debian/ruby-test-files.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- test/test_mysql.rb
diff --git a/debian/rules b/debian/rules
index be1b9bb..61ac991 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,8 +1,6 @@
 #!/usr/bin/make -f
 #export DH_VERBOSE=1
 
-export LANG=C.UTF-8
-
 %:
 	dh $@ --buildsystem=ruby --with ruby
 
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..c72c68d
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test-suite
+Depends: @, ruby-test-unit, mysql-server
diff --git a/debian/tests/test-suite b/debian/tests/test-suite
new file mode 100755
index 0000000..1a92f34
--- /dev/null
+++ b/debian/tests/test-suite
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+exec 2>&1
+
+set -ex
+
+export LANG=C.UTF-8
+
+mysql -u root -e 'CREATE DATABASE test'
+
+ruby test/test_mysql.rb

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mysql.git



More information about the Pkg-ruby-extras-commits mailing list