summary refs log tree commit diff
path: root/pkgs/development/compilers/ispc/default.nix
diff options
context:
space:
mode:
authorAristid Breitkreuz <aristidb@gmail.com>2016-09-04 17:03:34 +0200
committerAristid Breitkreuz <aristidb@gmail.com>2016-09-04 17:03:49 +0200
commit2f33b0611955eb6384332c52460a375765c1a1a4 (patch)
treed704a94b6854d045a6cf15a3db0d18f8d6e1f7d7 /pkgs/development/compilers/ispc/default.nix
parentc083ab99b2b9753f3cafb79923318658969f507f (diff)
downloadnixlib-2f33b0611955eb6384332c52460a375765c1a1a4.tar
nixlib-2f33b0611955eb6384332c52460a375765c1a1a4.tar.gz
nixlib-2f33b0611955eb6384332c52460a375765c1a1a4.tar.bz2
nixlib-2f33b0611955eb6384332c52460a375765c1a1a4.tar.lz
nixlib-2f33b0611955eb6384332c52460a375765c1a1a4.tar.xz
nixlib-2f33b0611955eb6384332c52460a375765c1a1a4.tar.zst
nixlib-2f33b0611955eb6384332c52460a375765c1a1a4.zip
ispc: extend test suite
Diffstat (limited to 'pkgs/development/compilers/ispc/default.nix')
-rw-r--r--pkgs/development/compilers/ispc/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix
index f4539bb92993..08958a42b44f 100644
--- a/pkgs/development/compilers/ispc/default.nix
+++ b/pkgs/development/compilers/ispc/default.nix
@@ -1,4 +1,6 @@
-{stdenv, fetchFromGitHub, bash, which, m4, python, bison, flex, llvmPackages, clangWrapSelf}:
+{stdenv, fetchFromGitHub, bash, which, m4, python, bison, flex, llvmPackages, clangWrapSelf,
+testedTargets ? ["sse4" "host"]
+}:
 
 # TODO: patch LLVM so Skylake-EX works better (patch included in ispc github) - needed for LLVM 3.9?
 
@@ -6,6 +8,8 @@ stdenv.mkDerivation rec {
   version = "1.9.1";
   rev = "v${version}";
 
+  inherit testedTargets;
+
   name = "ispc-${version}";
 
   src = fetchFromGitHub {
@@ -44,8 +48,14 @@ stdenv.mkDerivation rec {
 
   checkPhase = ''
     export ISPC_HOME=$PWD
-    PATH=${llvmPackages.clang}/bin:$PATH python run_tests.py --non-interactive --verbose --file=test_output.log
-    fgrep -q "No new fails"  test_output.log || exit 1
+    for target in $testedTargets
+    do
+      echo "Testing target $target"
+      echo "================================"
+      echo
+      PATH=${llvmPackages.clang}/bin:$PATH python run_tests.py -t $target --non-interactive --verbose --file=test_output.log
+      fgrep -q "No new fails"  test_output.log || exit 1
+    done
   '';
 
   makeFlags = [