glib.tests.withChecks: init
This will allow OfBorg to run the GLib tests, which it didn't do before. To do this correctly for the glib we're building, we need to override it rather than taking glib as an input. finalAttrs.finalPackage is not overrideable, so instead we need to use overrideAttrs. Since we can now consult finalAttrs.doCheck, there's no longer any need for a separate doCheck option, so I've removed it in favour of overrideAttrs.
This commit is contained in:
parent
2be1bcb3d2
commit
d65d8002c7
2 changed files with 4 additions and 5 deletions
|
@ -5,7 +5,6 @@
|
|||
, buildPackages
|
||||
|
||||
# this is just for tests (not in the closure of any regular package)
|
||||
, doCheck ? config.doCheckByDefault or false
|
||||
, coreutils, dbus, libxml2, tzdata
|
||||
, desktop-file-utils, shared-mime-info
|
||||
, darwin, fetchpatch
|
||||
|
@ -213,7 +212,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
|
||||
checkInputs = [ tzdata desktop-file-utils shared-mime-info ];
|
||||
|
||||
preCheck = optionalString doCheck ''
|
||||
preCheck = optionalString finalAttrs.doCheck or config.doCheckByDefault or false ''
|
||||
export LD_LIBRARY_PATH="$NIX_BUILD_TOP/glib-${finalAttrs.version}/glib/.libs''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
|
||||
export TZDIR="${tzdata}/share/zoneinfo"
|
||||
export XDG_CACHE_HOME="$TMP"
|
||||
|
@ -225,8 +224,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
echo "PATH=$PATH"
|
||||
'';
|
||||
|
||||
inherit doCheck;
|
||||
|
||||
separateDebugInfo = stdenv.isLinux;
|
||||
|
||||
passthru = rec {
|
||||
|
@ -237,6 +234,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
getSchemaPath = pkg: makeSchemaPath pkg pkg.name;
|
||||
getSchemaDataDirPath = pkg: makeSchemaDataDirPath pkg pkg.name;
|
||||
|
||||
tests.withChecks = finalAttrs.finalPackage.overrideAttrs (_: { doCheck = true; });
|
||||
|
||||
inherit flattenInclude;
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = "glib";
|
||||
|
|
|
@ -18525,7 +18525,7 @@ with pkgs;
|
|||
gtkimageview = callPackage ../development/libraries/gtkimageview { };
|
||||
|
||||
glib = callPackage ../development/libraries/glib (let
|
||||
glib-untested = glib.override { doCheck = false; };
|
||||
glib-untested = glib.overrideAttrs (_: { doCheck = false; });
|
||||
in {
|
||||
# break dependency cycles
|
||||
# these things are only used for tests, they don't get into the closure
|
||||
|
|
Loading…
Reference in a new issue