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
Container Registry
Model registry
Operate
Environments
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Didier Verna
asdf
Commits
950d4eeb
Commit
950d4eeb
authored
12 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
Fix test1 -- had to touch test1.asd, too.
parent
cca259c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test1.script
+19
-19
19 additions, 19 deletions
test/test1.script
with
19 additions
and
19 deletions
test/test1.script
+
19
−
19
View file @
950d4eeb
...
@@ -2,44 +2,44 @@
...
@@ -2,44 +2,44 @@
(load "script-support.lisp")
(load "script-support.lisp")
(load-asdf)
(load-asdf)
(touch-file "test1.asd" :offset -3600) ;; touch test1.asd an hour ago.
(touch-file "file1.lisp" :offset -3500)
(touch-file "file2.lisp" :offset -3400)
(quit-on-error
(quit-on-error
(DBG "loading test1")
(touch-file "file1.lisp" :offset -600) ;; touch file1.lisp 10 minutes ago.
(touch-file "file2.lisp" :offset -300) ;; touch file2.lisp 5 minutes ago.
(asdf:load-system 'test1 :force t)
(let* ((file1 (asdf:compile-file-pathname* "file1"))
(let* ((file1 (asdf:compile-file-pathname* "file1"))
(file2 (asdf:compile-file-pathname* "file2"))
(file2 (asdf:compile-file-pathname* "file2"))
(
file1-
date (file-write-date
file1
))
(date (file-write-date
"test1.asd"
))
(
file2-date
(file-write-date file
1
)))
(
then
(file-write-date file
2
)))
(DBG "
test that it compiled" file1 file1-date
)
(DBG "
loading test1"
)
(as
sert file1-date
)
(as
df:load-system 'test1
)
(
assert file2-date
)
(
DBG "test that it compiled" date then
)
(
touch-file file1 :timestamp (- file1-date 200
))
(
assert (probe-file file1
))
(
touch-file file2 :timestamp (- file1-date 100
))
(
assert (probe-file file2
))
(DBG "and loaded")
(DBG "and loaded")
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
(assert (symbol-value (find-symbol (symbol-name :*file1*) :test-package)))
(DBG "now remove file2 that depends-on file1"
file1-date (- file1-date 120)
)
(DBG "now remove file2 that depends-on file1"
date
)
(touch-file file1 :timestamp (
- file1-
date
1
50))
;; move file1.fasl two minutes ago.
(touch-file file1 :timestamp (
+
date 50
0
))
(assert-equal (
- file1-
date
1
50) (file-write-date file1))
(assert-equal (
+
date 5
0
0) (file-write-date file1))
(asdf::delete-file-if-exists file2)
(asdf::delete-file-if-exists file2)
(DBG "load again")
(DBG "load again")
(asdf:clear-system 'test1)
(asdf:clear-system 'test1)
(asdf:load-system 'test1)
(asdf:load-system 'test1)
(DBG "check that file1 is _not_ recompiled, but file2 is" (file-write-date file1))
(DBG "check that file1 is _not_ recompiled, but file2 is" (file-write-date file1))
(assert-equal (
- file1-
date
1
50) (file-write-date file1))
(assert-equal (
+
date 5
0
0) (file-write-date file1))
(assert (<=
file2-date
(file-write-date file2)))
(assert (<=
then
(file-write-date file2)))
(DBG "now touch file1 and check that file2 _is_ also recompiled")
(DBG "now touch file1 and check that file2 _is_ also recompiled")
;; XXX run-shell-command loses if *default-pathname-defaults* is not the
;; XXX run-shell-command loses if *default-pathname-defaults* is not the
;; unix cwd. this is not a problem for run-tests.sh, but can be in general
;; unix cwd. this is not a problem for run-tests.sh, but can be in general
(let ((before (file-write-date file2)))
(let ((before (file-write-date file2)))
(touch-file "file1.lisp" :
offset -60
) ;; touch file1 a minute ago.
(touch-file "file1.lisp" :
timestamp (+ date 3000)
) ;; touch file1 a minute ago.
(touch-file file2 :timestamp (
- before 1
0)) ;; touch file2.fasl
ten seconds
before.
(touch-file file2 :timestamp (
+ date 200
0)) ;; touch file2.fasl
some time
before.
(asdf:clear-system 'test1)
(asdf:clear-system 'test1)
(asdf:clear-system 'test1)
(asdf:operate 'asdf:load-op 'test1)
(asdf:operate 'asdf:load-op 'test1)
(DBG :foo (file-write-date file2) before)
(DBG :foo (file-write-date file2) before)
(assert (>= (file-write-date file2) before)))))
(assert (>= (file-write-date file2) before)))))
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