diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2016-09-14 23:14:57 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2016-09-23 16:53:07 +0200 |
commit | f65c62e53af27d3d73b362270084093586d97983 (patch) | |
tree | 96f252c86008d47211600299661ab9dee0870ad6 /tests/hello-git.scm | |
parent | 5ef0701f54482b83c433beb578715eb0d5321a74 (diff) | |
download | cuirass-f65c62e53af27d3d73b362270084093586d97983.tar cuirass-f65c62e53af27d3d73b362270084093586d97983.tar.gz |
tests: Track Cuirass' git.
* guix.scm: New file; specify Guix package.
* guix/ci.scm: New file; expose to Guix.
* build-aux/pre-inst-env.in: Add it to GUIX_PACKAGE_PATH.
* bin/evaluate.in (main): Lookup proc using name specified by #:proc.
* tests/guix-track-git.scm: New file.
* tests/hello-git.scm: Test it.
Signed-off-by: Mathieu Lirzin <mthl@gnu.org>
Diffstat (limited to 'tests/hello-git.scm')
-rw-r--r-- | tests/hello-git.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/hello-git.scm b/tests/hello-git.scm new file mode 100644 index 0000000..f6df99c --- /dev/null +++ b/tests/hello-git.scm @@ -0,0 +1,53 @@ +;;; hello-git.scm -- job specification test for hello git repository +;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> +;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> +;;; +;;; This file is part of Cuirass. +;;; +;;; Cuirass is free software: you can redistribute it and/or modify +;;; it under the terms of the GNU General Public License as published by +;;; the Free Software Foundation, either version 3 of the License, or +;;; (at your option) any later version. +;;; +;;; Cuirass is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>. + +(use-modules (srfi srfi-1)) + +(define (local-file file) + ;; In the common case jobs will be defined relative to the repository. + ;; However for testing purpose use local gnu-system.scm instead. + (string-append (dirname (current-filename)) "/" file)) + +(define (url->file-name url) + (string-trim + (string-map (lambda (c) (if (memq c (string->list ":/")) #\- c)) url) + #\-)) + +(define vc + ;; where your version-control checkouts live + (string-append (getenv "HOME") "/src")) +(define guix-checkout (string-append vc "/guix")) + +;; building GNU hello from git is too much work +;; (define hello-checkout (string-append vc "/hello")) +;; (define hello-git "http://git.savannah.gnu.org/r/hello.git") +;; ... so let's track cuirass' git +(define cuirass-checkout (string-append vc "/cuirass")) +(define cuirass-git "https://notabug.org/mthl/cuirass") +;;(define cuirass-git "https://gitlab.com/janneke/cuirass.git") + +(list + `((#:name . ,(url->file-name cuirass-checkout)) + (#:url . ,cuirass-git) + (#:branch . "master") + (#:no-compile? . #t) + (#:load-path . ,guix-checkout) + (#:proc . guix-jobs) + (#:file . ,(local-file "guix-track-git.scm")) + (#:arguments (name . "cuirass") (url . ,cuirass-git)))) |