diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-10-28 16:16:23 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-10-28 16:16:23 +0000 |
commit | f7947871a336f54af8bd193905b141d0495ae4d9 (patch) | |
tree | 12c7683868eb75181ed1b696c53e67ac3b43cd0e /pkgs | |
parent | 82baac23a73910bfd35d6711ff89d922e4ebc919 (diff) |
GNU Guile 1.9 with coverage analysis builds.
svn path=/nixpkgs/trunk/; revision=17994
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/interpreters/guile/1.9.nix | 13 | ||||
-rw-r--r-- | pkgs/development/interpreters/guile/disable-gc-sensitive-tests.patch | 15 | ||||
-rw-r--r-- | pkgs/development/interpreters/guile/gcov-file-name.patch | 42 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 | ||||
-rw-r--r-- | pkgs/top-level/guile-2-test.nix | 1 |
5 files changed, 75 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/guile/1.9.nix b/pkgs/development/interpreters/guile/1.9.nix index 75ec27e18ea5a..0290567c1fff3 100644 --- a/pkgs/development/interpreters/guile/1.9.nix +++ b/pkgs/development/interpreters/guile/1.9.nix @@ -1,7 +1,12 @@ { fetchurl, stdenv, libtool, readline, gmp, pkgconfig, boehmgc, libunistring -, gawk, makeWrapper }: +, gawk, makeWrapper, coverageAnalysis ? null }: -stdenv.mkDerivation rec { +# Do either a coverage analysis build or a standard build. +(if coverageAnalysis != null + then coverageAnalysis + else stdenv.mkDerivation) + +rec { name = "guile-1.9.4"; # This is an alpha release! src = fetchurl { url = "ftp://alpha.gnu.org/gnu/guile/${name}.tar.gz"; @@ -11,6 +16,10 @@ stdenv.mkDerivation rec { buildInputs = [ makeWrapper gawk readline libtool libunistring pkgconfig ]; propagatedBuildInputs = [ gmp boehmgc ]; + patches = + stdenv.lib.optionals (coverageAnalysis != null) + [ ./gcov-file-name.patch ./disable-gc-sensitive-tests.patch ]; + postInstall = '' wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" diff --git a/pkgs/development/interpreters/guile/disable-gc-sensitive-tests.patch b/pkgs/development/interpreters/guile/disable-gc-sensitive-tests.patch new file mode 100644 index 0000000000000..8a43e58f5f582 --- /dev/null +++ b/pkgs/development/interpreters/guile/disable-gc-sensitive-tests.patch @@ -0,0 +1,15 @@ +This patch disable GC-sensitive tests. This is particularly useful when +compiling with `-O0' (as is done with coverage analysis) since there may +be many false references held on the stack, leading to the failure of +such tests. + +--- a/test-suite/tests/threads.test ++++ b/test-suite/tests/threads.test +@@ -366,6 +366,7 @@ + (not (mutex-owner m)))) + + (pass-if "mutex with owner not retained (bug #27450)" ++ (throw 'unresolved) + (let ((g (make-guardian))) + (g (let ((m (make-mutex))) (lock-mutex m) m)) + diff --git a/pkgs/development/interpreters/guile/gcov-file-name.patch b/pkgs/development/interpreters/guile/gcov-file-name.patch new file mode 100644 index 0000000000000..f144296170ed9 --- /dev/null +++ b/pkgs/development/interpreters/guile/gcov-file-name.patch @@ -0,0 +1,42 @@ +This patch arranges so that we don't end up, with profiling builds, with a +file named `<stdout>.gcov' since that confuses lcov: + + <stdout>:cannot open source file + geninfo: ERROR: cannot read <stdout>.gcov! + +--- guile/libguile/c-tokenize.c 2009-09-13 13:05:15.000000000 +0200 ++++ guile/libguile/c-tokenize.c 2009-10-28 16:24:15.000000000 +0100 +@@ -1,5 +1,5 @@ + +-#line 3 "<stdout>" ++#line 3 "c-tokenize.c" + + #define YY_INT_ALIGNED short int + +@@ -616,7 +616,7 @@ int cookie_was_last = 0; + #define IS_COOKIE cookie_was_last = 1 + #define IS_NOT_COOKIE cookie_was_last = 0 + +-#line 620 "<stdout>" ++#line 620 "c-tokenize.c" + + #define INITIAL 0 + +@@ -799,7 +799,7 @@ YY_DECL + #line 65 "./c-tokenize.lex" + + +-#line 803 "<stdout>" ++#line 803 "c-tokenize.c" + + if ( !(yy_init) ) + { +@@ -1235,7 +1235,7 @@ YY_RULE_SETUP + #line 181 "./c-tokenize.lex" + ECHO; + YY_BREAK +-#line 1239 "<stdout>" ++#line 1239 "c-tokenize.c" + case YY_STATE_EOF(INITIAL): + yyterminate(); + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d68d8be36a8c6..1967252199fb4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2333,6 +2333,12 @@ let libunistring pkgconfig boehmgc; }; + guile_1_9_coverage = import ../development/interpreters/guile/1.9.nix { + inherit fetchurl stdenv readline libtool gmp gawk makeWrapper + libunistring pkgconfig boehmgc; + inherit (releaseTools) coverageAnalysis; + }; + io = builderDefsPackage (import ../development/interpreters/io) { inherit sqlite zlib gmp libffi cairo ncurses freetype mesa libpng libtiff libjpeg readline libsndfile libxml2 diff --git a/pkgs/top-level/guile-2-test.nix b/pkgs/top-level/guile-2-test.nix index 305e7ab9650ea..2f221f69c0971 100644 --- a/pkgs/top-level/guile-2-test.nix +++ b/pkgs/top-level/guile-2-test.nix @@ -54,6 +54,7 @@ in (mapTestOn { */ guile = linux; + guile_1_9_coverage = linux; autogen = linux; lsh = linux; |