summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-20 13:36:36 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-20 13:37:45 +0200
commit72cd8ec0b1465ddf5465bc2d75b3ca343aad99dd (patch)
tree28c38807687c46598d47dbff1284599d84144648
parentd05c6da05d99275176c8d0e2c9d4aadecefbee9c (diff)
tests: Make #:references-graphs gexp test more tolerant.
* tests/gexp.scm ("gexp->derivation #:references-graphs"): Use 'lset=' instead of 'equal?' since the order in which references are listed in not guaranteed.
-rw-r--r--tests/gexp.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 740d74620ee..0749811ea86 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -511,7 +511,7 @@
511 511
512(test-assertm "gexp->derivation #:references-graphs" 512(test-assertm "gexp->derivation #:references-graphs"
513 (mlet* %store-monad 513 (mlet* %store-monad
514 ((one (text-file "one" "hello, world")) 514 ((one (text-file "one" (random-text)))
515 (two (gexp->derivation "two" 515 (two (gexp->derivation "two"
516 #~(symlink #$one #$output:chbouib))) 516 #~(symlink #$one #$output:chbouib)))
517 (drv (gexp->derivation "ref-graphs" 517 (drv (gexp->derivation "ref-graphs"
@@ -544,12 +544,14 @@
544 (g-guile -> (derivation->output-path drv))) 544 (g-guile -> (derivation->output-path drv)))
545 (return (and ok? 545 (return (and ok?
546 (equal? (call-with-input-file g-one read) (list one)) 546 (equal? (call-with-input-file g-one read) (list one))
547 (equal? (call-with-input-file g-two read) 547 (lset= string=?
548 (list one (derivation->output-path two "chbouib"))) 548 (call-with-input-file g-two read)
549 (list one (derivation->output-path two "chbouib")))
549 550
550 ;; Note: %BOOTSTRAP-GUILE depends on the bootstrap Bash. 551 ;; Note: %BOOTSTRAP-GUILE depends on the bootstrap Bash.
551 (equal? (call-with-input-file g-guile read) 552 (lset= string=?
552 (list (derivation->output-path guile-drv) bash)))))) 553 (call-with-input-file g-guile read)
554 (list (derivation->output-path guile-drv) bash))))))
553 555
554(test-assertm "gexp->derivation #:allowed-references" 556(test-assertm "gexp->derivation #:allowed-references"
555 (mlet %store-monad ((drv (gexp->derivation "allowed-refs" 557 (mlet %store-monad ((drv (gexp->derivation "allowed-refs"