Unverified Commit d93bb6f4 authored by Robert Hensing's avatar Robert Hensing Committed by Philip Taron
Browse files

tests.srcOnly: Use zlib instead of glibc

This makes the test more portable, as glibc does not evaluate on
all platforms.
Unfortunately the test fails on darwin for an unrelated reason.
__impureHostDeps values were duplicated.
parent af9b49ed
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -3,18 +3,18 @@
  srcOnly,
  hello,
  emptyDirectory,
  glibc,
  zlib,
  stdenv,
  testers,
}:

let
  emptySrc = srcOnly emptyDirectory;
  glibcSrc = srcOnly glibc;
  zlibSrc = srcOnly zlib;

  # It can be invoked in a number of ways. Let's make sure they're equivalent.
  glibcSrcDrvAttrs = srcOnly glibc.drvAttrs;
  # glibcSrcFreeform = # ???;
  zlibSrcDrvAttrs = srcOnly zlib.drvAttrs;
  # zlibSrcFreeform = # ???;
  helloSrc = srcOnly hello;
  helloSrcDrvAttrs = srcOnly hello.drvAttrs;

@@ -48,11 +48,11 @@ in
runCommand "srcOnly-tests"
  {
    moreTests = [
      (testers.testEqualDerivation "glibcSrcDrvAttrs == glibcSrc" glibcSrcDrvAttrs glibcSrc)
      (testers.testEqualDerivation "zlibSrcDrvAttrs == zlibSrc" zlibSrcDrvAttrs zlibSrc)
      # (testers.testEqualDerivation
      #   "glibcSrcFreeform == glibcSrc"
      #   glibcSrcFreeform
      #   glibcSrc)
      #   "zlibSrcFreeform == zlibSrc"
      #   zlibSrcFreeform
      #   zlibSrc)
      (testers.testEqualDerivation "helloSrcDrvAttrs == helloSrc" helloSrcDrvAttrs helloSrc)
      (testers.testEqualDerivation "helloDrvSimpleSrcFreeform == helloDrvSimpleSrc"
        helloDrvSimpleSrcFreeform
@@ -67,9 +67,9 @@ runCommand "srcOnly-tests"
      exit 1
    fi

    # Test that glibcSrc is not empty
    if [ -z "$(ls -A ${glibcSrc})" ]; then
      echo "glibcSrc is empty"
    # Test that zlibSrc is not empty
    if [ -z "$(ls -A ${zlibSrc})" ]; then
      echo "zlibSrc is empty"
      exit 1
    fi