civodul pushed a commit to branch master
in repository guix.

commit a1ec7540be9b30593f5e83e36a0e83b1bcf337f1
Author: Ludovic Courtès <l...@gnu.org>
Date:   Mon Mar 26 23:11:16 2018 +0200

    cuirass: Factorize hydra-to-cuirass CI job translation.
    
    * build-aux/cuirass/gnu-system.scm: Move code to...
    * build-aux/cuirass/hydra-to-cuirass.scm: ... here, and include it.
    * Makefile.am (EXTRA_DIST): Add 'build-aux/cuirass/hydra-to-cuirass.scm'
    and 'build-aux/cuirass/gnu-system.scm'.
---
 Makefile.am                                        |  2 ++
 build-aux/cuirass/gnu-system.scm                   | 28 ++--------------------
 .../{gnu-system.scm => hydra-to-cuirass.scm}       |  6 ++---
 3 files changed, 6 insertions(+), 30 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 908115e..e630797 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -468,6 +468,8 @@ EXTRA_DIST =                                                
\
   build-aux/hydra/gnu-system.scm                       \
   build-aux/hydra/guix.scm                             \
   build-aux/hydra/guix-modular.scm                     \
+  build-aux/cuirass/gnu-system.scm                     \
+  build-aux/cuirass/hydra-to-cuirass.scm               \
   build-aux/check-available-binaries.scm               \
   build-aux/check-final-inputs-self-contained.scm      \
   build-aux/compile-as-derivation.scm                  \
diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-system.scm
index f545ba0..0eb834c 100644
--- a/build-aux/cuirass/gnu-system.scm
+++ b/build-aux/cuirass/gnu-system.scm
@@ -21,29 +21,5 @@
 ;;; tool.
 ;;;
 
-(include-from-path "build-aux/hydra/gnu-system.scm")
-
-(use-modules ((guix licenses)
-              #:select (license? license-name license-uri license-comment)))
-
-(define (cuirass-jobs store arguments)
-  "Return Cuirass jobs."
-  (map hydra-job->cuirass-job (hydra-jobs store arguments)))
-
-(define (hydra-job->cuirass-job hydra-job)
-  (let ((name (car hydra-job))
-        (job ((cdr hydra-job))))
-    (lambda _ (acons #:job-name (symbol->string name)
-                     (map symbol-alist-entry->keyword-alist-entry job)))))
-
-(define (symbol-alist-entry->keyword-alist-entry entry)
-  (cons (symbol->keyword (car entry)) (entry->sexp-entry (cdr entry))))
-
-(define (entry->sexp-entry o)
-  (match o
-    ((? license?) `((name . (license-name o))
-                    (uri . ,(license-uri o))
-                    (comment . ,(license-comment o))))
-    ((lst ...)
-     (map entry->sexp-entry lst))
-    (_ o)))
+(include "../hydra/gnu-system.scm")
+(include "hydra-to-cuirass.scm")
diff --git a/build-aux/cuirass/gnu-system.scm 
b/build-aux/cuirass/hydra-to-cuirass.scm
similarity index 92%
copy from build-aux/cuirass/gnu-system.scm
copy to build-aux/cuirass/hydra-to-cuirass.scm
index f545ba0..75c77ea 100644
--- a/build-aux/cuirass/gnu-system.scm
+++ b/build-aux/cuirass/hydra-to-cuirass.scm
@@ -17,12 +17,10 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;;
-;;; This file defines build jobs for the Cuirass continuation integration
-;;; tool.
+;;; This file defines the conversion of Hydra build jobs to Cuirass build
+;;; jobs.  It is meant to be included in other files.
 ;;;
 
-(include-from-path "build-aux/hydra/gnu-system.scm")
-
 (use-modules ((guix licenses)
               #:select (license? license-name license-uri license-comment)))
 

Reply via email to