[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.2.0-17-g5a3f5d3



The following commit has been merged in the master branch:
commit ea6f583ba06f8492907aad39ed3fdff41847a088
Author: Russ Allbery <rra@debian.org>
Date:   Fri Jan 30 22:16:50 2009 -0800

    Add runtests support for selecting a different test skeleton
    
    * t/runtests:
      + [RA] Add support for selecting a different test package skeleton.

diff --git a/debian/changelog b/debian/changelog
index 7cab403..2ecfe46 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,9 @@ lintian (2.2.1) UNRELEASED; urgency=low
     + [ADB] Fix the spelling of "pedantic".  Thanks, Michal Čihař.
       (Closes: #513083)
 
+  * t/runtests:
+    + [RA] Add support for selecting a different test package skeleton.
+
  -- Russ Allbery <rra@debian.org>  Sun, 25 Jan 2009 12:51:40 -0800
 
 lintian (2.2.0) unstable; urgency=low
diff --git a/t/runtests b/t/runtests
index d020b36..489326d 100755
--- a/t/runtests
+++ b/t/runtests
@@ -302,13 +302,14 @@ sub test_package {
 
     print "Cleaning up and repopulating $targetdir...\n" if $DEBUG;
     runsystem_ok("rm", "-rf", $targetdir);
+    my $skel = $testdata->{skeleton};
     if ($is_native) {
-	runsystem("cp", "-rp", "$tmpldir/skel", $targetdir);
+	runsystem("cp", "-rp", "$tmpldir/$skel", $targetdir);
 	runsystem("rm", "-f", "$targetdir/debian/changelog");
 	runsystem("rsync", "-rp", "$origdir/debian/", "$targetdir/")
 	    if -d "$origdir/debian/";
     } else {
-	runsystem("cp", "-rp", "$tmpldir/skel.upstream", $targetdir);
+	runsystem("cp", "-rp", "$tmpldir/${skel}.upstream", $targetdir);
 	runsystem("rm", "-f", "$targetdir/.dummy");
 	runsystem("rsync", "-rp", "$origdir/upstream/", "$targetdir/");
 	if (-x "$origdir/pre_upstream") {
@@ -318,7 +319,7 @@ sub test_package {
 	runsystem("cd $RUNDIR && ".
 		  "tar czf ${pkg}_${orig_version}.orig.tar.gz $pkgdir");
 	runsystem("rsync", "-rp", "--exclude=debian/changelog",
-		  "$tmpldir/skel/", "$targetdir/");
+		  "$tmpldir/$skel/", "$targetdir/");
 	runsystem("rsync", "-rp", "$origdir/debian/", "$targetdir/")
 	    if -d "$origdir/debian/";
     }
@@ -561,6 +562,8 @@ sub check_test_is_sane {
 
     $data->{'test-for'} ||= '';
     $data->{'test-against'} ||= '';
+
+    $data->{skeleton} ||= 'skel';
     $data->{options} ||= '-I -E';
 
     if ($DEBUG) {
diff --git a/t/tests/README b/t/tests/README
index a8cafca..abab913 100644
--- a/t/tests/README
+++ b/t/tests/README
@@ -83,6 +83,16 @@ test or the bug that you're testing for.  This should be one of "Debian
 Bug#nnnn" for a bug report, a URL into the debian-lint-maint mailing list
 archives, or a message ID for the message to the list.
 
+By default, templates/skel and templates/skel.upstream are used as the
+test skeleton and then the files in the specific test directory are
+overlaid.  To start from a different skeleton, use:
+
+    Skeleton: <skeleton to start from>
+
+The value must match a directory name in the t/templates directory.  If
+this is a non-native package, there must also be a corresponding
+<skeleton>.upstream directory.
+
 All other fields in the .desc file are optional and control the values
 filled into the template control and changelog files by the test suite
 harness.  The following additional fields are currently supported:

-- 
Debian package checker


Reply to: