[DRE-commits] [ruby-rack] 03/03: Add autopkgtest smoke test

Antonio Terceiro terceiro at moszumanska.debian.org
Thu Jul 24 22:51:54 UTC 2014


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

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

commit 08c41ad103ab0a2e49048a07b27c0aae1943ea0d
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Thu Jul 24 19:49:52 2014 -0300

    Add autopkgtest smoke test
---
 debian/changelog        |  1 +
 debian/control          |  1 +
 debian/tests/control    |  9 +++++++++
 debian/tests/smoke-test | 20 ++++++++++++++++++++
 4 files changed, 31 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index ab67542..b580907 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ ruby-rack (1.5.2-2) unstable; urgency=medium
   * Rebuild with recent gem2deb to make package visible to Rubygems on all
     Ruby interpreters
   * Drop transitional packages
+  * Add autopkgtest smoke test
 
  -- Antonio Terceiro <terceiro at debian.org>  Thu, 24 Jul 2014 19:24:55 -0300
 
diff --git a/debian/control b/debian/control
index 78cc8e6..18f993a 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,7 @@ Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-rack.git
 Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-rack.git;a=summary
 Homepage: http://rack.rubyforge.org
 XS-Ruby-Versions: all
+Testsuite: autopkgtest
 
 Package: ruby-rack
 Architecture: all
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..ea76b26
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,9 @@
+Tests: smoke-test
+Depends: @, curl
+
+# Tests: test-with-dependencies
+# Depends: @, @builddeps@, g++, make
+
+# Tests: test-with-restrictions
+# Restrictions: allow-stderr needs-root break-testbed rw-build-tree
+
diff --git a/debian/tests/smoke-test b/debian/tests/smoke-test
new file mode 100755
index 0000000..8b5af5a
--- /dev/null
+++ b/debian/tests/smoke-test
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+exec 2>&1
+
+set -ex
+
+appdir=${ADTTMP:-/tmp}/app
+mkdir $appdir
+cd $appdir
+
+cat > config.ru <<EOF
+run(lambda { |request| [200, {'Content-Type' => 'text/html'}, ['Hello, world!']]})
+EOF
+
+rackup --pid smoke.pid --daemonize
+sleep 5
+
+curl -s http://localhost:9292/ | grep 'Hello, world'
+
+kill $(cat smoke.pid)

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



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