Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eric Schulte
asdf
Commits
cd16a497
Commit
cd16a497
authored
15 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
http://common-lisp.net/project/asdf/asdf
parents
3a1b88bb
9fcec4c2
Branches
Branches containing commit
Tags
1.700
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test-missing-lisp-file.asd
+5
-0
5 additions, 0 deletions
test/test-missing-lisp-file.asd
test/test-missing-lisp-file.script
+49
-0
49 additions, 0 deletions
test/test-missing-lisp-file.script
with
54 additions
and
0 deletions
test/test-missing-lisp-file.asd
0 → 100644
+
5
−
0
View file @
cd16a497
;;; -*- Lisp -*-
(
asdf:defsystem
test-missing-lisp-file
:components
((
:file
"file2"
:in-order-to
((
compile-op
(
load-op
"fileMissing"
))))
(
:file
"fileMissing"
)))
This diff is collapsed.
Click to expand it.
test/test-missing-lisp-file.script
0 → 100644
+
49
−
0
View file @
cd16a497
;;; -*- Lisp -*-
;;;---------------------------------------------------------------------------
;;; This is supposed to verify that if a lisp file is lost, then any attempt to
;;; make the system will fail. I.e., we verify that we won't just load a stale
;;; fasl when the source file is lost.
;;;---------------------------------------------------------------------------
(load "script-support")
(load-asdf)
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(let ((missing-name (namestring
(make-pathname :name "fileMissing"
:type "lisp"
:defaults
*default-pathname-defaults*)))
(template-file (namestring
(make-pathname :name "file1"
:type "lisp"
:defaults
*default-pathname-defaults*))))
(asdf::run-shell-command
(format nil "cp ~a ~a" template-file missing-name))
(unless (probe-file missing-name)
(format t "File copy failed.~%"))
(asdf:operate 'asdf:load-op 'test-missing-lisp-file)
;; test that it compiled
(let* ((file1 (asdf:compile-file-pathname* "file2"))
(file2 (asdf:compile-file-pathname* "fileMissing"))
(file1-date (file-write-date file1)))
(assert file1-date)
(assert (file-write-date file2))
;; and loaded
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
;; now remove the lisp file we created, and wait for an error
(sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
(asdf::run-shell-command (format nil "rm -f ~A" missing-name))
;; we shouldn't be able to find the input-file for the compile-op, and that
;; should be an error.
(multiple-value-bind (retval err)
(ignore-errors
(asdf:operate 'asdf:load-op 'test-missing-lisp-file))
(assert err)))))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment