forked from lix-project/lix
Merge pull request #5390 from NixOS/fix-isnewerthan-check
Fix the `isDaemonNewer` guard in the testsuite
This commit is contained in:
commit
130284b850
|
@ -126,7 +126,7 @@ isDaemonNewer () {
|
|||
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
|
||||
local requiredVersion="$1"
|
||||
local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3)
|
||||
return [[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''2.4''") -ge 0 ]]
|
||||
[[ $(nix eval --expr "builtins.compareVersions ''$daemonVersion'' ''$requiredVersion''") -ge 0 ]]
|
||||
}
|
||||
|
||||
requireDaemonNewerThan () {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
source common.sh
|
||||
|
||||
requireDaemonNewerThan "2.4pre20210727"
|
||||
# Using `--eval-store` with the daemon will eventually copy everything
|
||||
# to the build store, invalidating most of the tests here
|
||||
needLocalStore
|
||||
|
||||
eval_store=$TEST_ROOT/eval-store
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ source common.sh
|
|||
|
||||
# 27ce722638 required some incompatible changes to the nix file, so skip this
|
||||
# tests for the older versions
|
||||
requireDaemonNewerThan "2.4pre20210622"
|
||||
requireDaemonNewerThan "2.4pre20210712"
|
||||
|
||||
clearStore
|
||||
|
||||
|
|
Loading…
Reference in a new issue