Skip to content

Commit

Permalink
Merge pull request #44825 from oxij/docheck/continues-in-a-big-way
Browse files Browse the repository at this point in the history
treewide: enable working, fix fixable, disable broken tests
  • Loading branch information
7c6f434c authored Aug 11, 2018
2 parents b9c8d68 + 35c9435 commit a68e5e9
Show file tree
Hide file tree
Showing 127 changed files with 596 additions and 221 deletions.
17 changes: 9 additions & 8 deletions pkgs/applications/audio/radiotray-ng/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# rt2rtng
, python2
# Testing
, gmock
, gtest
# Fixup
, wrapGAppsHook
, makeWrapper
Expand Down Expand Up @@ -58,11 +58,10 @@ stdenv.mkDerivation rec {
libxdg_basedir
lsb-release
wxGTK
] ++ stdenv.lib.optional doCheck gmock
++ gstInputs
] ++ gstInputs
++ pythonInputs;

prePatch = ''
postPatch = ''
for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do
substituteInPlace $x --replace /usr $out
done
Expand All @@ -74,14 +73,16 @@ stdenv.mkDerivation rec {
--replace radiotray-ng-notification radiotray-ng-on
'';

cmakeFlags = stdenv.lib.optional doCheck "-DBUILD_TESTS=ON";
cmakeFlags = [
"-DBUILD_TESTS=${if doCheck then "ON" else "OFF"}"
];

enableParallelBuilding = true;

# XXX: as of 0.2.2, tries to download gmock instead of checking for provided
doCheck = false;

checkInputs = [ gtest ];
checkPhase = "ctest";
# doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
doCheck = false; # fails to pick up supplied gtest, tries to download it instead

preFixup = ''
gappsWrapperArgs+=(--suffix PATH : ${stdenv.lib.makeBinPath [ dbus ]})
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/graphics/feh/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ stdenv.mkDerivation rec {

outputs = [ "out" "man" "doc" ];

nativeBuildInputs = [ makeWrapper xorg.libXt ]
++ optionals doCheck [ perlPackages.TestCommand perlPackages.TestHarness ];
nativeBuildInputs = [ makeWrapper xorg.libXt ];

buildInputs = [ xorg.libX11 xorg.libXinerama imlib2 libjpeg libpng curl libexif ];

Expand All @@ -36,8 +35,9 @@ stdenv.mkDerivation rec {
install -D -m 644 man/*.1 $out/share/man/man1
'';

checkPhase = ''
PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" make test
checkInputs = [ perlPackages.TestCommand perlPackages.TestHarness ];
preCheck = ''
export PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl"
'';

doCheck = true;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/ranger/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ python3Packages.buildPythonApplication rec {
# give image previews out of the box when building with w3m
substituteInPlace ranger/config/rc.conf \
--replace "set preview_images false" "set preview_images true" \
--replace "set preview_images false" "set preview_images true"
'';

meta = with stdenv.lib; {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/feedreaders/rsstail/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ stdenv.mkDerivation rec {
owner = "flok99";
};

buildInputs = [ libmrss ]
++ stdenv.lib.optional doCheck cppcheck;
buildInputs = [ libmrss ];
checkInputs = [ cppcheck ];

postPatch = ''
substituteInPlace Makefile --replace -liconv_hook ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ stdenv.mkDerivation rec {
];

nativeBuildInputs = [
check cmake pkgconfig
cmake pkgconfig
];

cmakeFlags = [
"-DENABLE_AUTOUPDATE=OFF"
] ++ lib.optional (doCheck) "-DENABLE_TESTS=ON";

doCheck = stdenv.isLinux;
"-DENABLE_TESTS=${if doCheck then "ON" else "OFF"}"
];

doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
checkInputs = [ check ];
checkPhase = ''
runHook preCheck
ctest -VV
Expand Down
5 changes: 1 addition & 4 deletions pkgs/applications/version-management/fossil/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ tcl ];

doCheck = stdenv.hostPlatform == stdenv.buildPlatform;

checkTarget = "test";

preCheck = stdenv.lib.optional doCheck ''
preCheck = ''
export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
'';
configureFlags = stdenv.lib.optional withJson "--json";
Expand Down
4 changes: 4 additions & 0 deletions pkgs/applications/version-management/mr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ stdenv.mkDerivation rec {
sha256 = "15i9bs2i25l7ibv530ghy8280kklcgm5kr6j86s7iwcqqckd0czp";
};

postPatch = ''
patchShebangs .
'';

buildInputs = [ perl ];

makeFlags = "PREFIX=$(out)";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ let

enableParallelBuilding = true;

checkInputs = [ python ];
doCheck = false; # fails 10 out of ~2300 tests

meta = with stdenv.lib; {
Expand Down
12 changes: 6 additions & 6 deletions pkgs/build-support/release/binary-tarball.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ stdenv.mkDerivation (
postPhases = "finalPhase";
}

// args //
// args //

{
name = name + (if src ? version then "-" + src.version else "");

postHook = ''
mkdir -p $out/nix-support
echo "$system" > $out/nix-support/system
Expand All @@ -43,7 +43,7 @@ stdenv.mkDerivation (
if test -e $origSrc/nix-support/hydra-release-name; then
releaseName=$(cat $origSrc/nix-support/hydra-release-name)
fi
installFlagsArray=(DESTDIR=$TMPDIR/inst)
# Prefix hackery because of a bug in stdenv (it tries to `mkdir
Expand All @@ -62,18 +62,18 @@ stdenv.mkDerivation (
tar cvfj $out/tarballs/''${releaseName:-binary-dist}.tar.bz2 -C $TMPDIR/inst .
'';


finalPhase =
''
for i in $out/tarballs/*; do
echo "file binary-dist $i" >> $out/nix-support/hydra-build-products
done
# Propagate the release name of the source tarball. This is
# to get nice package names in channels.
test -n "$releaseName" && (echo "$releaseName" >> $out/nix-support/hydra-release-name)
'';


meta = (if args ? meta then args.meta else {}) // {
description = "Build of a generic binary distribution";
Expand Down
10 changes: 8 additions & 2 deletions pkgs/desktops/gnome-3/core/gcr/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, intltool, gnupg, p11-kit, glib
, libgcrypt, libtasn1, dbus-glib, gtk, pango, gdk_pixbuf, atk
, gobjectIntrospection, makeWrapper, libxslt, vala, gnome3 }:
, gobjectIntrospection, makeWrapper, libxslt, vala, gnome3
, python2 }:

stdenv.mkDerivation rec {
name = "gcr-${version}";
Expand All @@ -15,6 +16,10 @@ stdenv.mkDerivation rec {
updateScript = gnome3.updateScript { packageName = "gcr"; attrPath = "gnome3.gcr"; };
};

postPatch = ''
patchShebangs .
'';

outputs = [ "out" "dev" ];

nativeBuildInputs = [ pkgconfig intltool gobjectIntrospection libxslt makeWrapper vala ];
Expand All @@ -27,7 +32,8 @@ stdenv.mkDerivation rec {

propagatedBuildInputs = [ glib gtk p11-kit ];

#doCheck = true;
checkInputs = [ python2 ];
doCheck = false; # fails 21 out of 603 tests, needs dbus daemon

#enableParallelBuilding = true; issues on hydra

Expand Down
8 changes: 4 additions & 4 deletions pkgs/desktops/gnome-3/core/gnome-keyring/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ stdenv.mkDerivation rec {
pango gcr gdk_pixbuf atk p11-kit
];

# In 3.20.1, tests do not support Python 3
checkInputs = [ dbus python2 ];

propagatedBuildInputs = [ glib libtasn1 libxslt ];

nativeBuildInputs = [
pkgconfig intltool docbook_xsl docbook_xml_dtd_42 wrapGAppsHook
] ++ stdenv.lib.optionals doCheck checkInputs;
];

configureFlags = [
"--with-pkcs11-config=$$out/etc/pkcs11/" # installation directories
Expand All @@ -41,6 +38,9 @@ stdenv.mkDerivation rec {
'';

doCheck = true;
# In 3.20.1, tests do not support Python 3
checkInputs = [ dbus python2 ];

checkPhase = ''
export HOME=$(mktemp -d)
dbus-run-session \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/cmdstan/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ stdenv.mkDerivation rec {

buildFlags = "build";
enableParallelBuilding = true;
nativeBuildInputs = stdenv.lib.optional doCheck python;

doCheck = true;
checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368
checkInputs = [ python ];
checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368

installPhase = ''
mkdir -p $out/opt $out/bin
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/glslang/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
fi
'';

doCheck = false; # fails 3 out of 3 tests (ctest)

meta = with stdenv.lib; {
inherit (src.meta) homepage;
description = "Khronos reference front-end for GLSL and ESSL";
Expand Down
11 changes: 9 additions & 2 deletions pkgs/development/compilers/vala/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, graphviz
{ stdenv, lib, fetchurl, pkgconfig, flex, bison, libxslt, autoconf, automake, graphviz
, glib, libiconv, libintl, libtool, expat
}:

Expand All @@ -7,13 +7,18 @@ let
let
atLeast = lib.versionAtLeast "${major}.${minor}";
in stdenv.mkDerivation rec {
name = "vala-${major}.${minor}";
name = "vala-${version}";
version = "${major}.${minor}";

src = fetchurl {
url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
inherit sha256;
};

postPatch = ''
patchShebangs tests
'';

outputs = [ "out" "devdoc" ];

nativeBuildInputs = [
Expand All @@ -26,6 +31,8 @@ let
] ++ lib.optional (atLeast "0.38") graphviz
++ extraBuildInputs;

doCheck = false; # fails, requires dbus daemon

meta = with stdenv.lib; {
description = "Compiler for GObject type system";
homepage = https://wiki.gnome.org/Projects/Vala;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/guile-modules/guile-cairo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ pkgconfig ];

buildInputs = [ guile cairo expat ]
++ stdenv.lib.optional doCheck guile-lib;
buildInputs = [ guile cairo expat ];
checkInputs = [ guile-lib ];

doCheck = true;

Expand Down
5 changes: 5 additions & 0 deletions pkgs/development/libraries/apr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ stdenv.mkDerivation rec {

patches = stdenv.lib.optionals stdenv.isDarwin [ ./is-this-a-compiler-bug.patch ];

# This test needs the net
postPatch = ''
rm test/testsock.*
'';

outputs = [ "out" "dev" ];
outputBin = "dev";

Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/clucene-core/2.x.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
$out/lib/libclucene-core.1.dylib
'';

doCheck = false; # fails with "Unable to find executable: /build/clucene-core-2.3.3.4/build/bin/cl_test"

meta = {
description = "Core library for full-featured text search engine";
longDescription = ''
Expand Down
10 changes: 5 additions & 5 deletions pkgs/development/libraries/ffmpeg/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,11 @@ stdenv.mkDerivation rec {
description = "A complete, cross-platform solution to record, convert and stream audio and video";
homepage = http://www.ffmpeg.org/;
longDescription = ''
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and machines
have created. It supports the most obscure ancient formats up to the cutting edge.
No matter if they were designed by some standards committee, the community or
a corporation.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and machines
have created. It supports the most obscure ancient formats up to the cutting edge.
No matter if they were designed by some standards committee, the community or
a corporation.
'';
license = licenses.gpl3;
platforms = platforms.all;
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/libraries/fftw/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchurl, stdenv, lib, precision ? "double" }:
{ fetchurl, stdenv, lib, precision ? "double", perl }:

with lib;

Expand Down Expand Up @@ -38,6 +38,8 @@ stdenv.mkDerivation rec {

enableParallelBuilding = true;

checkInputs = [ perl ];

meta = with stdenv.lib; {
description = "Fastest Fourier Transform in the West library";
homepage = http://www.fftw.org/;
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/libraries/gd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ stdenv.mkDerivation rec {

enableParallelBuilding = true;

doCheck = false; # fails 2 tests

meta = with stdenv.lib; {
homepage = https://libgd.github.io/;
description = "A dynamic image creation library";
Expand Down
3 changes: 2 additions & 1 deletion pkgs/development/libraries/glibmm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ glib libsigcxx ];

enableParallelBuilding = true;
#doCheck = true; # some tests need network

doCheck = false; # fails. one test needs the net, another /etc/fstab

meta = with stdenv.lib; {
description = "C++ interface to the GLib library";
Expand Down
5 changes: 4 additions & 1 deletion pkgs/development/libraries/glog/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
{ stdenv, fetchFromGitHub, autoreconfHook, perl }:

stdenv.mkDerivation rec {
name = "glog-${version}";
Expand All @@ -13,6 +13,9 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [ autoreconfHook ];

checkInputs = [ perl ];
doCheck = false; # fails with "Mangled symbols (28 out of 380) found in demangle.dm"

meta = with stdenv.lib; {
homepage = https://github.com/google/glog;
license = licenses.bsd3;
Expand Down
Loading

0 comments on commit a68e5e9

Please sign in to comment.