Commit c28d8580 authored by Robert Goldman's avatar Robert Goldman

Merge branch 'split-launch-program' into 'master'

Split launch-program.lisp off of run-program.lisp

run-program.lisp was way too big. Even split in two, each part is a mindful.

See merge request !56
parents 7a18e15b ff089b82
......@@ -78,7 +78,7 @@ SCL ?= scl
XCL ?= xcl
header_lisp := header.lisp
driver_lisp := uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
driver_lisp := uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/launch-program.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp
defsystem_lisp := upgrade.lisp cache.lisp component.lisp system.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp output-translations.lisp source-registry.lisp package-inferred-system.lisp backward-interface.lisp backward-internals.lisp interface.lisp user.lisp footer.lisp
all_lisp := $(header_lisp) $(driver_lisp) $(defsystem_lisp)
......
......@@ -4,7 +4,7 @@
set here=%~dp0
set header_lisp=header.lisp
set driver_lisp=uiop\package.lisp + uiop\common-lisp.lisp + uiop\utility.lisp + uiop\os.lisp + uiop\pathname.lisp + uiop\filesystem.lisp + uiop\stream.lisp + uiop\image.lisp + uiop\lisp-build.lisp + uiop\run-program.lisp + uiop\configuration.lisp + uiop\backward-driver.lisp + uiop\driver.lisp
set driver_lisp=uiop\package.lisp + uiop\common-lisp.lisp + uiop\utility.lisp + uiop\os.lisp + uiop\pathname.lisp + uiop\filesystem.lisp + uiop\stream.lisp + uiop\image.lisp + uiop\lisp-build.lisp + uiop\launch-program.lisp + uiop\run-program.lisp + uiop\configuration.lisp + uiop\backward-driver.lisp + uiop\driver.lisp
set defsystem_lisp=upgrade.lisp + cache.lisp + component.lisp + system.lisp + find-system.lisp + find-component.lisp + operation.lisp + action.lisp + lisp-action.lisp + plan.lisp + operate.lisp + parse-defsystem.lisp + bundle.lisp + concatenate-source.lisp + output-translations.lisp + source-registry.lisp + package-inferred-system.lisp + backward-interface.lisp + backward-internals.lisp + interface.lisp + user.lisp + footer.lisp
%~d0
......
......@@ -5,7 +5,7 @@
here="$(dirname $0)"
header_lisp="header.lisp"
driver_lisp="uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp"
driver_lisp="uiop/package.lisp uiop/common-lisp.lisp uiop/utility.lisp uiop/os.lisp uiop/pathname.lisp uiop/filesystem.lisp uiop/stream.lisp uiop/image.lisp uiop/lisp-build.lisp uiop/launch-program.lisp uiop/run-program.lisp uiop/configuration.lisp uiop/backward-driver.lisp uiop/driver.lisp"
defsystem_lisp="upgrade.lisp cache.lisp component.lisp system.lisp find-system.lisp find-component.lisp operation.lisp action.lisp lisp-action.lisp plan.lisp operate.lisp parse-defsystem.lisp bundle.lisp concatenate-source.lisp output-translations.lisp source-registry.lisp package-inferred-system.lisp backward-interface.lisp backward-internals.lisp interface.lisp user.lisp footer.lisp"
all () {
......
......@@ -542,18 +542,21 @@
(new-test-suite "%process-status / terminate-process")
(defun process-status (process-info)
(uiop/launch-program::%process-status process-info))
(define-test
":exited (we slept; repeated query)"
(let* ((process-info (launch-program "./sleeper.sh 12 1"))
(status (uiop/run-program::%process-status process-info)))
(status (process-status process-info)))
(handle-result "running?" (equal :running status))
(sleep 2)
(multiple-value-bind (status exit-code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "exited?" (equal :exited status))
(handle-result "proper exit status?" (equal 12 exit-code)))
(multiple-value-bind (status exit-code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "exited? (no. 2)" (equal :exited status))
(handle-result "proper exit status? (no. 2)" (equal 12 exit-code)))
(wait-process process-info)))
......@@ -565,14 +568,14 @@
(let* ((process-info (launch-program "./killer.sh")))
(sleep 1)
(multiple-value-bind (status code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "exited or signaled?"
(member status '(:exited :signaled)))
(handle-result "signal/exit code as expected?"
(or (and (eq status :exited) (eql code 143))
(and (eq status :signaled) (eql code 15)))))
(multiple-value-bind (status code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "exited or signaled? (no. 2)"
(member status '(:exited :signaled)))
(handle-result "signal/exit code as expected? (no. 2)"
......@@ -585,11 +588,11 @@
(let* ((process-info (launch-program "./killercontainer.sh")))
(sleep 1)
(multiple-value-bind (status code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "exited?" (eq status :exited))
(handle-result "proper exit status?" (eql code (+ 128 15))))
(multiple-value-bind (status code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "exited (no. 2)?" (eq status :exited))
(handle-result "proper exit status? (no. 2)?" (eql code (+ 128 15))))
(wait-process process-info)))
......@@ -599,16 +602,16 @@
#+(and lispworks (not lispworks7+))
(skip-test "Known to fail")
(let* ((process-info (launch-program "./sleeper.sh 12 2"))
(status (uiop/run-program::%process-status process-info)))
(status (process-status process-info)))
(handle-result "running?" (equal :running status))
(my-terminate-process process-info :urgent t)
(sleep 1)
(multiple-value-bind (status code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "signaled?" (eq status :signaled))
(handle-result "signal as expected?" (member code '(9 15))))
(multiple-value-bind (status code)
(uiop/run-program::%process-status process-info)
(process-status process-info)
(handle-result "signaled (no. 2)?" (eq status :signaled))
(handle-result "signal as expected (no. 2)?" (member code '(9 15))))
(wait-process process-info)))
......
......@@ -12,7 +12,8 @@
(:use-reexport
:uiop/package :uiop/utility
:uiop/os :uiop/pathname :uiop/filesystem :uiop/stream :uiop/image
:uiop/run-program :uiop/lisp-build :uiop/configuration :uiop/backward-driver))
:uiop/launch-program :uiop/run-program
:uiop/lisp-build :uiop/configuration :uiop/backward-driver))
;; Provide both lowercase and uppercase, to satisfy more people.
(provide "uiop") (provide "UIOP")
This diff is collapsed.
This diff is collapsed.
......@@ -43,7 +43,8 @@ you already have a matching UIOP loaded."
(:file "stream" :depends-on ("filesystem"))
(:file "image" :depends-on ("stream"))
(:file "lisp-build" :depends-on ("image"))
(:file "run-program" :depends-on ("stream"))
(:file "launch-program" :depends-on ("stream"))
(:file "run-program" :depends-on ("launch-program"))
(:file "configuration" :depends-on ("image"))
(:file "backward-driver" :depends-on ("lisp-build" "run-program" "configuration"))
(:file "driver" :depends-on ("backward-driver"))))
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