r20731 - in /trunk/libtest-unit-perl/debian: changelog control patches/00list patches/10_examples.dpatch patches/10_examples.patch patches/Makefile patches/series rules
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jun 5 22:17:33 UTC 2008
Author: gregoa
Date: Thu Jun 5 22:17:33 2008
New Revision: 20731
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20731
Log:
* Change patch system from dpatch to quilt.
* Refresh debian/rules, no functional changes.
Added:
trunk/libtest-unit-perl/debian/patches/10_examples.patch
trunk/libtest-unit-perl/debian/patches/series
Removed:
trunk/libtest-unit-perl/debian/patches/00list
trunk/libtest-unit-perl/debian/patches/10_examples.dpatch
trunk/libtest-unit-perl/debian/patches/Makefile
Modified:
trunk/libtest-unit-perl/debian/changelog
trunk/libtest-unit-perl/debian/control
trunk/libtest-unit-perl/debian/rules
Modified: trunk/libtest-unit-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-unit-perl/debian/changelog?rev=20731&op=diff
==============================================================================
--- trunk/libtest-unit-perl/debian/changelog (original)
+++ trunk/libtest-unit-perl/debian/changelog Thu Jun 5 22:17:33 2008
@@ -6,6 +6,8 @@
* debian/rules: delete /usr/lib/perl5 only if it exists.
* Set debhelper compatibility level to 5.
* Set Standards-Version to 3.7.3 (no changes).
+ * Change patch system from dpatch to quilt.
+ * Refresh debian/rules, no functional changes.
-- gregor herrmann <gregor+debian at comodo.priv.at> Tue, 09 Oct 2007 22:32:29 +0200
Modified: trunk/libtest-unit-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-unit-perl/debian/control?rev=20731&op=diff
==============================================================================
--- trunk/libtest-unit-perl/debian/control (original)
+++ trunk/libtest-unit-perl/debian/control Thu Jun 5 22:17:33 2008
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Andreas Fester <Andreas.Fester at gmx.de>, Gunnar Wolf <gwolf at debian.org>
-Build-Depends: debhelper (>= 5), dpatch
+Build-Depends: debhelper (>= 5), quilt (>= 0.40)
Build-Depends-Indep: perl, libdevel-symdump-perl, liberror-perl, libclass-inner-perl
Standards-Version: 3.7.3
Homepage: http://search.cpan.org/dist/Test-Unit/
Added: trunk/libtest-unit-perl/debian/patches/10_examples.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-unit-perl/debian/patches/10_examples.patch?rev=20731&op=file
==============================================================================
--- trunk/libtest-unit-perl/debian/patches/10_examples.patch (added)
+++ trunk/libtest-unit-perl/debian/patches/10_examples.patch Thu Jun 5 22:17:33 2008
@@ -1,0 +1,173 @@
+Author: <Andreas Fester <Andreas.Fester at gmx.de>>
+Description: Add some simple examples how to write test cases.
+--- /dev/null
++++ libtest-unit-perl/examples/procedural-adding-suites-example.pl
+@@ -0,0 +1,72 @@
++# --------------------------------------------------
++package Foo;
++
++use Test::Unit;
++
++use constant DEBUG => 0;
++
++# code to be tested will be somewhere around here
++
++# define tests, set_up and tear_down
++
++sub test_foo_ok_1 {
++ assert(23 == 23);
++}
++
++sub test_foo_ok_2 {
++ assert(42 == 42);
++}
++
++sub set_up {
++ print "hello world\n" if DEBUG;
++}
++
++sub tear_down {
++ print "leaving world again\n" if DEBUG;
++}
++
++# --------------------------------------------------
++package Bar;
++
++use Test::Unit;
++
++use constant DEBUG => 0;
++
++# code to be tested will be somewhere around here
++
++# define tests, set_up and tear_down
++
++sub test_bar_ok_1 {
++ assert(23 == 23);
++}
++
++sub test_bar_ok_2 {
++ assert(42 == 42);
++}
++
++sub set_up {
++ print "hello world\n" if DEBUG;
++}
++
++sub tear_down {
++ print "leaving world again\n" if DEBUG;
++}
++
++# --------------------------------------------------
++package FooBar;
++
++use Test::Unit;
++
++create_suite();
++create_suite("Foo");
++create_suite("Bar");
++
++add_suite("Foo"); # add Foo to this package
++add_suite("Bar"); # add Bar to this package
++
++print "\n--- Testing FooBar ---\n";
++run_suite();
++
++add_suite("Foo", "Bar"); # add Foo to Bar
++print "\n--- Testing Bar with Foo added to it ---\n";
++run_suite("Bar");
+--- /dev/null
++++ libtest-unit-perl/examples/procedural-another-package-example.pl
+@@ -0,0 +1,31 @@
++package Foo;
++use Test::Unit;
++
++use constant DEBUG => 0;
++
++# code to be tested will be somewhere around here
++
++# define tests, set_up and tear_down
++
++sub test_ok_1 {
++ assert(23 == 23);
++}
++
++sub test_ok_2 {
++ assert(42 == 42);
++}
++
++sub set_up {
++ print "hello world\n" if DEBUG;
++}
++
++sub tear_down {
++ print "leaving world again\n" if DEBUG;
++}
++
++# and run them
++
++package Bar;
++use Test::Unit;
++create_suite("Foo");
++run_suite("Foo");
+--- /dev/null
++++ libtest-unit-perl/examples/procedural-fail-example.pl
+@@ -0,0 +1,28 @@
++use Test::Unit;
++
++use constant DEBUG => 0;
++
++# code to be tested will be somewhere around here
++
++# define tests, set_up and tear_down
++
++sub test_ok {
++ assert(23 == 23);
++}
++
++sub test_fail {
++ assert("born" =~ /loose/, "Born to lose ...");
++}
++
++sub set_up {
++ print "hello world\n" if DEBUG;
++}
++
++sub tear_down {
++ print "leaving world again\n" if DEBUG;
++}
++
++# and run them
++
++create_suite();
++run_suite();
+--- /dev/null
++++ libtest-unit-perl/examples/procedural-ok-example.pl
+@@ -0,0 +1,28 @@
++use Test::Unit;
++
++use constant DEBUG => 0;
++
++# code to be tested will be somewhere around here
++
++# define tests, set_up and tear_down
++
++sub test_ok_1 {
++ assert(23 == 23);
++}
++
++sub test_ok_2 {
++ assert(42 == 42);
++}
++
++sub set_up {
++ print "hello world\n" if DEBUG;
++}
++
++sub tear_down {
++ print "leaving world again\n" if DEBUG;
++}
++
++# and run them
++
++create_suite();
++run_suite();
Added: trunk/libtest-unit-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-unit-perl/debian/patches/series?rev=20731&op=file
==============================================================================
--- trunk/libtest-unit-perl/debian/patches/series (added)
+++ trunk/libtest-unit-perl/debian/patches/series Thu Jun 5 22:17:33 2008
@@ -1,0 +1,1 @@
+10_examples.patch
Modified: trunk/libtest-unit-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-unit-perl/debian/rules?rev=20731&op=diff
==============================================================================
--- trunk/libtest-unit-perl/debian/rules (original)
+++ trunk/libtest-unit-perl/debian/rules Thu Jun 5 22:17:33 2008
@@ -1,60 +1,59 @@
-#! /usr/bin/make -f
-# -*-makefile-*-
-# debian/rules file for libtest-unit-perl
+#!/usr/bin/make -f
+# This debian/rules file is provided as a template for normal perl
+# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
+# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
+# be used freely wherever it is useful.
-include /usr/share/dpatch/dpatch.make
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
-PACKAGE := $(shell dh_listpackages)
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
-ifndef PERL
-PERL = /usr/bin/perl
-endif
+include /usr/share/quilt/quilt.make
-TMP := $(CURDIR)/debian/$(PACKAGE)
+PERL ?= /usr/bin/perl
+PACKAGE = $(shell dh_listpackages)
+TMP = $(CURDIR)/debian/$(PACKAGE)
-build: patch-stamp build-stamp
-build-stamp:
+build: build-stamp
+build-stamp: $(QUILT_STAMPFN)
dh_testdir
-
$(PERL) Makefile.PL INSTALLDIRS=vendor
- $(MAKE) OPTIMIZE="-O2 -g -Wall"
-
+ $(MAKE)
+ # tests fail, test suite was not run before ...
+ # $(MAKE) test
touch $@
-clean-patched:
+clean: unpatch
dh_testdir
dh_testroot
-
- [ ! -f Makefile ] || $(MAKE) distclean
dh_clean build-stamp install-stamp
-
-clean: clean-patched unpatch
+ [ ! -f Makefile ] || $(MAKE) realclean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
-
dh_clean -k
-
- $(MAKE) install PREFIX=$(TMP)/usr
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
chmod u+x $(TMP)/usr/share/perl5/Test/TestRunner.pl
chmod u+x $(TMP)/usr/share/perl5/Test/TkTestRunner.pl
- -[ ! -d $(TMP)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/lib/perl5
-
+ [ ! -d $(TMP)/usr/lib/perl5 ] || \
+ rmdir --ignore-fail-on-non-empty --parents --verbose \
+ $(TMP)/usr/lib/perl5
touch $@
binary-arch:
-# We have nothing to do by default.
+# We have nothing to do here for an architecture-independent package
binary-indep: build install
dh_testdir
dh_testroot
-
+ dh_installexamples examples/*.pl
dh_installdocs
- dh_installexamples examples/*.pl
dh_installchangelogs Changes
-
dh_perl
dh_compress
dh_fixperms
@@ -64,4 +63,4 @@
dh_builddeb
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install
More information about the Pkg-perl-cvs-commits
mailing list