From f4443bb9ef7b92608b96e4221a18bcf679496ea9 Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sun, 4 Sep 2016 15:56:07 +0200 Subject: [PATCH] ispc: detect test failures, restrict platforms --- pkgs/development/compilers/ispc/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix index c71f39749c3..f4539bb9299 100644 --- a/pkgs/development/compilers/ispc/default.nix +++ b/pkgs/development/compilers/ispc/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchFromGitHub, which, m4, python, bison, flex, llvmPackages, clangWrapSelf}: +{stdenv, fetchFromGitHub, bash, which, m4, python, bison, flex, llvmPackages, clangWrapSelf}: # TODO: patch LLVM so Skylake-EX works better (patch included in ispc github) - needed for LLVM 3.9? @@ -31,6 +31,12 @@ stdenv.mkDerivation rec { postPatch = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile"; + # TODO: this correctly catches errors early, but also some things that are just weird and don't seem to be real + # errors + #configurePhase = '' + # makeFlagsArray=( SHELL="${bash}/bin/bash -o pipefail" ) + #''; + installPhase = '' mkdir -p $out/bin cp ispc $out/bin @@ -38,7 +44,8 @@ stdenv.mkDerivation rec { checkPhase = '' export ISPC_HOME=$PWD - PATH=${llvmPackages.clang}/bin:$PATH python run_tests.py --non-interactive + 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 ''; makeFlags = [ @@ -51,7 +58,7 @@ stdenv.mkDerivation rec { homepage = https://ispc.github.io/ ; description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language"; license = licenses.bsd3; - platforms = platforms.unix; + platforms = ["x86_64-linux"]; # TODO: buildable on more platforms? maintainers = [ maintainers.aristid ]; }; }