Commit f421e3f9 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Clean up of .asd's and test script.

parent 5cb74d76
;;; -*- Mode: Lisp -*-
(in-package :asdf)
#-asdf3
(error "ASDF-DEPENDENCY-GROVEL requires ASDF3.")
#-asdf3 (error "ASDF-DEPENDENCY-GROVEL requires ASDF3.")
(defclass grovel-handlers (module)
((%components :accessor %handler-components)))
((%components :accessor %handler-components)))
(defun handler-input-file-list (pathname parent)
(mapcar
......@@ -28,7 +25,7 @@
(setf (%handler-components c)
(handler-input-file-list (component-pathname c) c))))
(defsystem :asdf-dependency-grovel
(defsystem "asdf-dependency-grovel"
:description "Analyse the dependencies in an ASDF system"
:long-description "ASDF-DEPENDENCY-GROVEL will analyse the actual dependencies in an ASDF system.
Based on an analysis with file granularity ,
......@@ -37,16 +34,17 @@ based on which compilation can be parallelized.
Based on an analysis with form granularity,
it can output a summary from which you can untangle
the circularities in your build."
:author "Andreas Fuchs, Matthew Steele and Francois-Rene Rideau"
:version "1.108"
:depends-on (:asdf)
:depends-on ("asdf")
:components ((:file "package")
(:file "variables" :depends-on ("package"))
(:file "classes" :depends-on ("package" "variables"))
(:file "asdf-classes" :depends-on ("package"))
(:file "grovel" :depends-on ("package" "variables" "classes" "asdf-classes"))
(:file "asdf-ops" :depends-on ("package" "variables" "grovel"))
(:grovel-handlers "handlers" :pathname #p"handlers/"
(:grovel-handlers "handlers" :pathname "handlers/"
:depends-on ("grovel"))))
(defmethod perform :after ((op load-op) (c (eql (find-system :asdf-dependency-grovel))))
(defmethod perform :after ((op load-op) (c (eql (find-system "asdf-dependency-grovel"))))
(push :asdf-dependency-grovel *features*))
;;; Define the package of the test framework
(cl:require "asdf")
#-asdf3.1 (error "ASDF 3.1 required")
(cl:defpackage :asdf-dependency-grovel-tester
(:use :cl)
(:use :cl :asdf :uiop)
(:export #:test-result #:check-base-deps))
(cl:in-package :asdf-dependency-grovel-tester)
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :asdf))
(define-condition failed-component ()
((file :accessor failed-file :initarg :file)
......@@ -36,15 +37,16 @@
:file file :should dependency
:has depends-on)))))
(load "../asdf-dependency-grovel.asd")
(push *load-truename* asdf:*central-registry*)
(defparameter *adg-dir* (pathname-parent-directory-pathname *load-truename*))
(push *adg-dir* *central-registry*)
(push (subpathname *adg-dir* "tests/") *central-registry*)
;; (setf *break-on-signals* '(or error warning))
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:oos 'asdf:load-op :asdf-dependency-grovel))
(push #p"." asdf:*central-registry*)
(load-system "asdf-dependency-grovel")
(defun test-result ()
(asdf:oos 'asdf-dependency-grovel:dependency-op :test-serial)
(asdf:operate 'asdf-dependency-grovel:dependency-op :test-serial)
(let ((comps (asdf-dependency-grovel:read-component-file
"groveled-components.lisp" :test-serial-system))
(failed nil))
......
......@@ -3,7 +3,7 @@
SBCL="${1:-sbcl}"
cd `dirname $0`
$SBCL --load `pwd`/grovel-tests.lisp --eval '(sb-ext:quit :unix-status (asdf-dependency-grovel-tester:test-result))'
$SBCL --load `pwd`/grovel-tests.lisp --eval '(uiop:quit (asdf-dependency-grovel-tester:test-result))'
STATUS=$?
rm -rf asdf-dependency-grovel-tmp-*
#$SBCL --load `pwd`/grovel-tests.lisp --eval '(asdf-dependency-grovel-tester:check-base-deps)' --eval '(sb-ext:quit)'
......
;;; -*- lisp -*-
(asdf:defsystem :test-serial-system
(asdf:defsystem "test-serial-system"
:author "Andreas Fuchs, Matthew Steele and Francois-Rene Rideau"
:description "Test system for asdf-dependency-grovel"
:version "1"
:serial t
:components ((:file "package")
......
;; -*- Mode: Lisp -*-
(cl:in-package :cl-user)
;; load groveler, for the component type, etc.
(eval-when (:load-toplevel :execute)
(asdf:oos 'asdf:load-op :asdf-dependency-grovel))
(defpackage :asdf-dependency-grovel-test.system
(:use :cl :asdf :asdf-dependency-grovel))
(in-package :asdf-dependency-grovel-test.system)
(defsystem :test-serial
:components ((component-file :asdf-dependency-grovel-test/serial
:load-systems (:test-serial-system)
:merge-systems (:test-serial-system)
:output-file "groveled-components.lisp"
:base-asd-file "groveled-components.output.asd"
;; :cull-redundant t
:verbose t)))
(defsystem "test-serial"
:author "Andreas Fuchs, Matthew Steele and Francois-Rene Rideau"
:description "Test system for asdf-dependency-grovel"
:defsystem-depends-on ("asdf-dependency-grovel")
:version "1"
:components (("asdf-dependency-grovel::component-file" "asdf-dependency-grovel-test/serial"
:pathname ""
:load-systems (:test-serial-system)
:merge-systems (:test-serial-system)
:output-file "groveled-components.lisp"
:base-asd-file "groveled-components.output.asd"
;;:cull-redundant t
:verbose t)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment