Sort systems and targets for more deterministic behaviour

As the ordering from Guix seems to be non-deterministic.
This commit is contained in:
Christopher Baines 2023-07-21 12:10:55 +01:00
parent ef73305250
commit 348fe36b55
1 changed files with 11 additions and 4 deletions

View File

@ -383,7 +383,12 @@ WHERE job_id = $1")
(define (all-inferior-system-tests inf store guix-source guix-commit)
(define inf-systems
(inferior-guix-systems inf))
;; The order shouldn't matter here, but bugs in Guix can lead to different
;; results depending on the order, so sort the systems to try and provide
;; deterministic behaviour
(sort
(inferior-guix-systems inf)
string<?))
(define extract
`(lambda (store)
@ -683,9 +688,11 @@ WHERE job_id = $1")
'(defined? 'targets
(resolve-module '(guix platform)))
inf)
(inferior-eval
'((@ (guix platform) targets))
inf))
(sort
(inferior-eval
'((@ (guix platform) targets))
inf)
string<?))
(else
'("arm-linux-gnueabihf"