Make valid-systems quicker
In the future, it would be good to pull this from the database again, but in some way which is really quick.
This commit is contained in:
parent
ffcf937c6a
commit
e070c20030
|
@ -59,10 +59,12 @@
|
|||
derivation-file-names->derivation-ids))
|
||||
|
||||
(define (valid-systems conn)
|
||||
(map car
|
||||
(exec-query
|
||||
conn
|
||||
"SELECT DISTINCT system FROM derivations ORDER BY 1")))
|
||||
;; TODO, use the database, but make it quick!
|
||||
'("aarch64-linux"
|
||||
"armhf-linux"
|
||||
"i686-linux"
|
||||
"mips64el-linux"
|
||||
"x86_64-linux"))
|
||||
|
||||
(define (count-derivations conn)
|
||||
(first
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"test-model-derivation"
|
||||
(lambda (conn)
|
||||
(test-equal "valid-systems"
|
||||
'()
|
||||
'("aarch64-linux" "armhf-linux" "i686-linux" "mips64el-linux" "x86_64-linux")
|
||||
(valid-systems conn))
|
||||
|
||||
(test-equal "count-derivations"
|
||||
|
|
Loading…
Reference in New Issue