diff options
author | Munyoki Kilyungi | 2024-12-23 10:17:05 +0300 |
---|---|---|
committer | Munyoki Kilyungi | 2025-01-06 22:24:58 +0300 |
commit | 8490d297750afe38a93d84b1d86a27ec321a0160 (patch) | |
tree | ed7631ecd2da71008b8d5731a0abac09b8ae3181 | |
parent | 3586eea2686d192a1ccd0b0455769fde4c490fee (diff) | |
download | gn-machines-8490d297750afe38a93d84b1d86a27ec321a0160.tar.gz |
Create a tmpdir for genenetwork2 tests.
-rw-r--r-- | genenetwork-development.scm | 18 |
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") |