Commit 7ee04bd1 authored by Daniel Kochmański's avatar Daniel Kochmański Committed by Francois-Rene Rideau

bundle: add regression test for prebuilt systems

parent 6475bce3
;;; -*- Lisp -*-
(DBG "Regression test: Test if dependencies on prebuilt libraries work.
Should load from ecl-prebuilt-systems/")
#+(and ecl (not ecl-bytecmp))
(progn
(chdir (subpathname *test-directory* "ecl-prebuilt-systems/"))
(load "readme.lisp"))
(in-package #:cl-user)
(print `(:asdf-version ,(asdf:asdf-version)))
(asdf:defsystem #:hellow
:serial t
:depends-on (#:asdf)
:components ((:file "hello")))
;;;
;;; DESCRIPTION:
;;;
;;; This file builds a standalone executable with a dependency on
;;; ASDF.
;;;
;;;
;;; USE:
;;;
;;; Launch a copy of ECL and load this file in it
;;;
;;; (load "readme.lisp")
;;;
(require 'asdf)
(format t "
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; BUILDING A STANDALONE EXECUTABLE
;;;
")
;;
;; * Combine files in a standalone executable. We reuse the files
;; from the previous example
;;
(defconstant +standalone-exe+ (compile-file-pathname "hellow" :type :program))
(push (make-pathname :name nil :type nil :version nil
:defaults *load-truename*)
asdf:*central-registry*)
(asdf:make-build :hellow
:type :program
:move-here "./"
:prologue-code "printf(\"Good morning sunshine!\");"
:epilogue-code '(progn
(format t "~%Good bye sunshine.~%")
(ext:quit 0)))
;;
;; * Test the program
;;
(format t "
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; TESTING A STANDALONE EXECUTABLE
;;;
")
(uiop:run-program (format nil "./~A" +standalone-exe+) :output *standard-output*)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; CLEAN UP
;;;
(delete-file +standalone-exe+)
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