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.
			
			
This commit is contained in:
		
							parent
							
								
									d05c6da05d
								
							
						
					
					
						commit
						72cd8ec0b1
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
					@ -511,7 +511,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(test-assertm "gexp->derivation #:references-graphs"
 | 
					(test-assertm "gexp->derivation #:references-graphs"
 | 
				
			||||||
  (mlet* %store-monad
 | 
					  (mlet* %store-monad
 | 
				
			||||||
      ((one (text-file "one" "hello, world"))
 | 
					      ((one (text-file "one" (random-text)))
 | 
				
			||||||
       (two (gexp->derivation "two"
 | 
					       (two (gexp->derivation "two"
 | 
				
			||||||
                              #~(symlink #$one #$output:chbouib)))
 | 
					                              #~(symlink #$one #$output:chbouib)))
 | 
				
			||||||
       (drv (gexp->derivation "ref-graphs"
 | 
					       (drv (gexp->derivation "ref-graphs"
 | 
				
			||||||
| 
						 | 
					@ -544,11 +544,13 @@
 | 
				
			||||||
       (g-guile -> (derivation->output-path drv)))
 | 
					       (g-guile -> (derivation->output-path drv)))
 | 
				
			||||||
    (return (and ok?
 | 
					    (return (and ok?
 | 
				
			||||||
                 (equal? (call-with-input-file g-one read) (list one))
 | 
					                 (equal? (call-with-input-file g-one read) (list one))
 | 
				
			||||||
                 (equal? (call-with-input-file g-two read)
 | 
					                 (lset= string=?
 | 
				
			||||||
 | 
					                        (call-with-input-file g-two read)
 | 
				
			||||||
                        (list one (derivation->output-path two "chbouib")))
 | 
					                        (list one (derivation->output-path two "chbouib")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                 ;; Note: %BOOTSTRAP-GUILE depends on the bootstrap Bash.
 | 
					                 ;; Note: %BOOTSTRAP-GUILE depends on the bootstrap Bash.
 | 
				
			||||||
                 (equal? (call-with-input-file g-guile read)
 | 
					                 (lset= string=?
 | 
				
			||||||
 | 
					                        (call-with-input-file g-guile read)
 | 
				
			||||||
                        (list (derivation->output-path guile-drv) bash))))))
 | 
					                        (list (derivation->output-path guile-drv) bash))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(test-assertm "gexp->derivation #:allowed-references"
 | 
					(test-assertm "gexp->derivation #:allowed-references"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue