about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--genenetwork-development.scm18
1 files changed, 16 insertions, 2 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm
index 9225eb3..7d3a14b 100644
--- a/genenetwork-development.scm
+++ b/genenetwork-development.scm
@@ -192,7 +192,8 @@ executed."
     (with-imported-modules '((guix build utils))
       (with-packages (list bash coreutils git-minimal nss-certs)
         #~(begin
-            (use-modules (guix build utils))
+            (use-modules (guix build utils)
+                         (srfi srfi-26))
 
             (define (hline)
               "Print a horizontal line 50 '=' characters long."
@@ -205,6 +206,13 @@ executed."
               (invoke "git" "log" "--max-count" "1")
               (hline))
 
+            (define (call-with-temporary-directory proc)
+              (let ((tmp-dir (mkdtemp "/tmp/gn.XXXXXX")))
+                (dynamic-wind
+                  (const #t)
+                  (cut proc tmp-dir)
+                  (cut delete-file-recursively tmp-dir))))
+
             (invoke "git" "clone" "--depth" "1" #$gn3-repository)
             (with-directory-excursion "genenetwork3"
               (show-head-commit))
@@ -230,7 +238,13 @@ executed."
             (setenv "HOME" "/tmp")
             (setenv "SQL_URI" "mysql://webqtlout:webqtlout@localhost/db_webqtl?unix_socket=/run/mysqld/mysqld.sock")
             (chdir "genenetwork2")
-            (apply invoke '#$test-command))))))
+            ;; XXXX: FIXME: R/Qtl tests fail because files are generated in
+            ;; the "/tmp" directory.  Currently, "/tmp" is mapped by gn2/gn3
+            ;; so tests will fail because of permission issues.
+            (call-with-temporary-directory
+             (lambda (tmp-dir)
+               (setenv "TMPDIR" tmp-dir)
+               (apply invoke '#$test-command))))))))
 
 (define %xapian-directory
   "/export/data/genenetwork-xapian")