3
0
Fork 0
forked from mirrors/nixpkgs

ispc: detect test failures, restrict platforms

This commit is contained in:
Aristid Breitkreuz 2016-09-04 15:56:07 +02:00
parent 2933cc96e5
commit f4443bb9ef

View file

@ -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 ];
};
}