[Pkg-haskell-commits] [package-plan] 01/02: Implement test-packages without creating a dummy cabal file,

Joachim Breitner nomeata at moszumanska.debian.org
Sat Jul 26 14:16:09 UTC 2014


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

nomeata pushed a commit to branch master
in repository package-plan.

commit 6340ae2fc61845066ef99b46d6f7971a2982d71d
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sat Jul 26 15:55:17 2014 +0200

    Implement test-packages without creating a dummy cabal file,
    
    only with adding all the packages as arguments.
---
 test-packages.pl | 34 +++++++---------------------------
 1 file changed, 7 insertions(+), 27 deletions(-)

diff --git a/test-packages.pl b/test-packages.pl
index 6f51d39..8f8d874 100755
--- a/test-packages.pl
+++ b/test-packages.pl
@@ -181,12 +181,12 @@ __END__
 		my $pkg = $1;
 		my $version = $2;
 		unless (exists $versions{$pkg}) {
-			printf "Ignoring patches for %s-%s, not listed in all-packages.txt\n", $pkg ,$version;
+			printf "Ignoring patches for %s-%s, not listed in packages.txt\n", $pkg ,$version;
 			$error_count++;
 			next
 		}
 		unless ($version eq $versions{$pkg}) {
-			# printf "Ignoring patches for %s-%s, version does not match %s in all-packages.txt\n", $pkg ,$version, $versions{$pkg};
+			# printf "Ignoring patches for %s-%s, version does not match %s in packages.txt\n", $pkg ,$version, $versions{$pkg};
 			next
 		}
 		my $cabalpath = sprintf "%s/%s/%s.cabal", $pkg, $version, $pkg;
@@ -219,29 +219,7 @@ __END__
 }
 
 
-print "Creating all-packages.cabal...\n";
 unlink "all-packages.cabal";
-open CABAL, ">", "all-packages.cabal" or die $!;
-print CABAL <<__END__;
--- This is auto-generated by ./test-packages.pl from packages.txt, make sure to edit that file!
-name: all-packages
-description: Dummy package that depends on all packages in Debian, to check for co-buildability
-version: 0
-build-type: Simple
-cabal-version: >= 1.2
-
-library
-  build-depends:
-__END__
-
-my $comma = "";
-for my $pkg (sort keys %versions) {
-	next if (exists $comments{$pkg});
-	printf CABAL "    %s%s (%s %s)\n", $comma, $pkg, ($allow_upgrade?">=":"=="), $versions{$pkg};
-	$comma = ", ";
-}
-close CABAL;
-chmod 0444, "all-packages.cabal";
 
 @flags = uniq(@flags);
 printf "Using flags: %s\n", join " ", @flags;
@@ -256,7 +234,7 @@ my $total_out;
 my $all_runs_ok = 1;
 
 for my $group (@groups) {
-	my @params = ("cabal", "-v", "--config-file", "$sandboxdir/config", "install", "--dry-run", "--force-reinstall", "--enable-tests");
+	my @params = ("cabal", "-v", "--config-file", "$sandboxdir/config", "install", "--dry-run", "--force-reinstall");
 
 	push @params, @flags;
 
@@ -274,14 +252,16 @@ for my $group (@groups) {
 	}
 	for my $pkg (sort keys %versions) {
 		next if (exists $comments{$pkg});
-		next if (exists $notest{$pkg});
 		next if (exists $obsolete{$pkg});
 		next if (($group{$pkg} || 'default') ne $group);
 		push @params, sprintf "%s", $pkg;
+		unless (exists $notest{$pkg}) {
+			push @params, "--constraint", sprintf "%s test", $pkg;
+		}
 	}
 
 	printf "Running cabal-install (group %s)...\n", $group;
-	# printf join(" ", @params)."\n";
+	#printf join(" ", @params)."\n";
 
 	my $out;
 	my $err;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/package-plan.git



More information about the Pkg-haskell-commits mailing list