Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
15
Issues
15
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
asdf
asdf
Commits
f4d73c7e
Commit
f4d73c7e
authored
Feb 05, 2010
by
Francois-Rene Rideau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test infrastructure, fix test scripts. Pass again on CCL.
parent
2f60807e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
48 deletions
+55
-48
test/run-tests.sh
test/run-tests.sh
+2
-2
test/script-support.lisp
test/script-support.lisp
+8
-8
test/test-force.script
test/test-force.script
+15
-10
test/test-static-and-serial.script
test/test-static-and-serial.script
+7
-8
test/test1.script
test/test1.script
+23
-20
No files found.
test/run-tests.sh
View file @
f4d73c7e
...
...
@@ -6,13 +6,13 @@
# - quit with exit status >0 if an unhandled error occurs
export
CL_SOURCE_REGISTRY
=
"
$PWD
"
export
DEBUG_ASDF_TEST
=
unset
DEBUG_ASDF_TEST
while
getopts
"duh"
OPTION
do
case
$OPTION
in
d
)
DEBUG_ASDF_TEST
=
1
export
DEBUG_ASDF_TEST
=
t
;;
u
)
usage
...
...
test/script-support.lisp
View file @
f4d73c7e
...
...
@@ -34,11 +34,11 @@
"Unless the environment variable DEBUG_ASDF_TEST
is bound, write a message and exit on an error. If
*asdf-test-debug* is true, enter the debugger."
(
handler-
case
(
progn
(
funcall
thunk
)
(
leave-lisp
"~&Script succeeded~%"
0
)
)
(
error
(
c
)
(
format
*error-output*
"~a"
c
)
(
if
(
ignore-errors
(
funcall
(
find-symbol
"GETENV"
:asdf
)
"DEBUG_ASDF_TEST"
))
(
brea
k
)
(
leave-lisp
"~&Script failed~%"
1
))
)))
(
handler-
bind
(
(
error
(
lambda
(
c
)
(
format
*error-output*
"~a"
c
)
(
if
(
ignore-errors
(
funcall
(
find-symbol
"GETENV"
:asdf
)
"DEBUG_ASDF_TEST"
)
)
(
break
)
(
leave-lisp
"~&Script failed~%"
1
)))
))
(
funcall
thun
k
)
(
leave-lisp
"~&Script succeeded~%"
0
)))
test/test-force.script
View file @
f4d73c7e
;;; -*- Lisp -*-
(load "script-support")
(load (compile-file-pathname "../asdf"))
(quit-on-error
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:operate 'asdf:load-op 'test-force)
(defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
;; unforced, date should stay same
(sleep 1)
(asdf:operate 'asdf:load-op 'test-force)
(assert (= (file-write-date (asdf:compile-file-pathname* "file1")) file1-date))
(let* ((file1 (asdf:compile-file-pathname* (truename "file1.lisp")))
(file1-date (file-write-date file1)))
(assert file1)
(assert file1-date)
;; unforced, date should stay same
(sleep 1)
(asdf:operate 'asdf:load-op 'test-force)
(assert (equal (file-write-date file1) file1-date))
;; forced, it should be later
(sleep 1)
(asdf:operate 'asdf:load-op 'test-force :force t)
(assert (> (file-write-date (asdf:compile-file-pathname* "file1")) file1-date
)))
;; forced, it should be later
(sleep 1)
(asdf:operate 'asdf:load-op 'test-force :force t)
(assert (> (file-write-date file1) file1-date)
)))
test/test-static-and-serial.script
View file @
f4d73c7e
...
...
@@ -5,12 +5,11 @@
(setf asdf:*central-registry* '(*default-pathname-defaults*))
(asdf:operate 'asdf:load-op 'static-and-serial)
(defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
(let* ((file1 (asdf:compile-file-pathname* (truename "file1.lisp")))
(file1-date (file-write-date file1))
(asdf::*defined-systems* (make-hash-table :test 'equal))) ;; cheat
;; cheat
(setf asdf::*defined-systems* (make-hash-table :test 'equal))
;; date should stay same
(sleep 1)
(asdf:operate 'asdf:load-op 'static-and-serial)
(assert (= (file-write-date (asdf:compile-file-pathname* "file1")) file1-date)))
;; date should stay same
(sleep 1)
(asdf:operate 'asdf:load-op 'static-and-serial)
(assert (= (file-write-date file1) file1-date))))
test/test1.script
View file @
f4d73c7e
...
...
@@ -7,30 +7,33 @@
(asdf:operate 'asdf:load-op 'test1)
;; test that it compiled
(defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))
(let* ((file1 (asdf:compile-file-pathname* (truename "file1.lisp")))
(file2 (asdf:compile-file-pathname* (truename "file2.lisp")))
(file1-date (file-write-date file1)))
(assert (and file1-date (file-write-date (asdf:compile-file-pathname* "file2"))))
(format t "~&test1 1: ~S ~S~%" file1 file1-date)
(assert file1-date)
(assert (file-write-date file2))
;; and loaded
(assert (eval (intern (symbol-name '#
:*file1*) :test-package)))
;; and loaded
(assert (symbol-value (find-symbol (symbol-name
:*file1*) :test-package)))
;; now remove one output file and check that the other is _not_
;; recompiled
(sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
;; now remove one output file and check that the other is _not_
;; recompiled
(sleep 1) ; mtime has 1-second granularity, so pause here for fast machines
(asdf::run-shell-command "rm -f ~A"
(namestring (asdf:compile-file-pathname* "file2")))
(asdf:operate 'asdf:load-op 'test1)
(assert (= file1-date (file-write-date (asdf:compile-file-pathname* "file1"))))
(assert (file-write-date (asdf:compile-file-pathname* "file2")))
(asdf::run-shell-command "rm -f ~A" (namestring file2))
(asdf:operate 'asdf:load-op 'test1)
(assert (= file1-date (file-write-date file1)))
(assert (file-write-date file2))
;; now touch file1 and check that file2 _is_ also recompiled
;; now touch file1 and check that file2 _is_ also recompiled
;; 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
;; 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
(let ((before (file-write-date (asdf:compile-file-pathname* "file2")
)))
(asdf::run-shell-command "touch file1.lisp")
(sleep 1)
(asdf:operate 'asdf:load-op 'test1)
(assert (> (file-write-date (asdf:compile-file-pathname* "file2")) before
))))
(let ((before (file-write-date file2
)))
(asdf::run-shell-command "touch file1.lisp")
(sleep 1)
(asdf:operate 'asdf:load-op 'test1)
(assert (> (file-write-date file2) before)
))))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment