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:
Christopher Baines 2020-01-05 11:17:56 +00:00
parent ffcf937c6a
commit e070c20030
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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"