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))
|
derivation-file-names->derivation-ids))
|
||||||
|
|
||||||
(define (valid-systems conn)
|
(define (valid-systems conn)
|
||||||
(map car
|
;; TODO, use the database, but make it quick!
|
||||||
(exec-query
|
'("aarch64-linux"
|
||||||
conn
|
"armhf-linux"
|
||||||
"SELECT DISTINCT system FROM derivations ORDER BY 1")))
|
"i686-linux"
|
||||||
|
"mips64el-linux"
|
||||||
|
"x86_64-linux"))
|
||||||
|
|
||||||
(define (count-derivations conn)
|
(define (count-derivations conn)
|
||||||
(first
|
(first
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"test-model-derivation"
|
"test-model-derivation"
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(test-equal "valid-systems"
|
(test-equal "valid-systems"
|
||||||
'()
|
'("aarch64-linux" "armhf-linux" "i686-linux" "mips64el-linux" "x86_64-linux")
|
||||||
(valid-systems conn))
|
(valid-systems conn))
|
||||||
|
|
||||||
(test-equal "count-derivations"
|
(test-equal "count-derivations"
|
||||||
|
|
Loading…
Reference in New Issue