Commit ecb342fd authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt
Browse files

testers.testVersion: ignore echoed store paths

Fixes the error mode where the test always passes if the store path of the binary is echoed by the test command.
parent e2855c66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@
      command ? "${package.meta.mainProgram or package.pname or package.name} --version",
      version ? package.version,
    }: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
      if output=$(${command} 2>&1); then
      if output=$(${command} 2>&1 | sed -e 's|${builtins.storeDir}/[^/ ]*/|{{storeDir}}/|g'); then
        if grep -Fw -- "${version}" - <<< "$output"; then
          touch $out
        else