Author: raskin
Date: Sat Sep  3 10:21:55 2011
New Revision: 28993
URL: https://svn.nixos.org/websvn/nix/?rev=28993&sc=1

Log:
Attempting to fix tests a bit..

Modified:
   nixpkgs/trunk/pkgs/applications/version-management/veracity/default.nix

Modified: 
nixpkgs/trunk/pkgs/applications/version-management/veracity/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/applications/version-management/veracity/default.nix     
Fri Sep  2 21:49:13 2011        (r28992)
+++ nixpkgs/trunk/pkgs/applications/version-management/veracity/default.nix     
Sat Sep  3 10:21:55 2011        (r28993)
@@ -2,6 +2,7 @@
   , cmake, curl, patch, zlib, icu, sqlite, libuuid
   , readline, openssl, spidermonkey_1_8_0rc1
   , nspr, nss
+  , unzip, glibcLocales
   , runTests ? false
   , ...}:
 builderDefsPackage
@@ -20,16 +21,17 @@
   inherit (s) name;
   inherit buildInputs;
 
-  phaseNames = ["prepare_sgneeds" "dump0" "prepareMakefiles" "doMake" "doTest" 
"doDeploy"];
+  phaseNames = ["prepare_sgneeds" "dump0" "prepareMakefiles" "fixPaths" 
"doMake" "doTest" "doDeploy"];
 
   dump0 = (a.doDump "0");
 
   runTests = a.stdenv.lib.attrByPath ["runTests"] false a;
 
   doTest = a.fullDepEntry (if runTests then ''
-    sed -e "s@/bin/bash@${a.stdenv.shell}@" -i $(find .. -type f)
     mkdir pseudo-home
     export HOME=$PWD/pseudo-home
+    export LC_ALL=en_US.UTF-8
+    ${if a.stdenv.isLinux then "export 
LOCALE_ARCHIVE=${a.glibcLocales}/lib/locale-archive;" else ""}
     make test || true
   '' else "") ["doMake" "minInit"];
 
@@ -73,6 +75,13 @@
     cmake -G "Unix Makefiles" -D SGNEEDS_DIR="$SGNEEDS_DIR" -D 
VVTHIRDPARTY="$VVTHIRDPARTY" -D 
SPIDERMONKEY_INCDIR="${a.spidermonkey_1_8_0rc1}/include" -D 
SPIDERMONKEY_LIB="${a.spidermonkey_1_8_0rc1}/lib/libjs.so" ../veracity*
   '' ["minInit" "addInputs" "doUnpack"];
 
+  fixPaths = a.fullDepEntry ''
+    sed -e "s@/bin/bash@${a.stdenv.shell}@" -i $(find .. -type f)
+    sed -e 's@/bin/ln@#{a.coreutils}/bin/ln@g' -i ../veracity/src/js_tests/*.js
+    sed -e 's@/usr/bin/gdb@#{a.gdb}/bin/gdb@g' -i 
../veracity/testsuite/c_test.sh
+    sed -e 's@"/bin/@"@g' -i ../veracity/testsuite/u*.c
+  '' ["minInit"];
+
   doDeploy = a.fullDepEntry ''
     ensureDir "$out/bin" "$out/share/veracity/"
     cp -r .. "$out/share/veracity/build-dir"
_______________________________________________
nix-commits mailing list
nix-comm...@cs.uu.nl
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to