Merge pull request #5390 from NixOS/fix-isnewerthan-check
Fix the `isDaemonNewer` guard in the testsuite
This commit is contained in:
commit
130284b850
3 changed files with 5 additions and 3 deletions
|
@ -126,7 +126,7 @@ isDaemonNewer () {
|
||||||
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
|
[[ -n "${NIX_DAEMON_PACKAGE:-}" ]] || return 0
|
||||||
local requiredVersion="$1"
|
local requiredVersion="$1"
|
||||||
local daemonVersion=$($NIX_DAEMON_PACKAGE/bin/nix-daemon --version | cut -d' ' -f3)
|
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 () {
|
requireDaemonNewerThan () {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
source common.sh
|
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
|
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
|
# 27ce722638 required some incompatible changes to the nix file, so skip this
|
||||||
# tests for the older versions
|
# tests for the older versions
|
||||||
requireDaemonNewerThan "2.4pre20210622"
|
requireDaemonNewerThan "2.4pre20210712"
|
||||||
|
|
||||||
clearStore
|
clearStore
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue