From 336d83c699ee02817e2089bacd91303c4f021f84 Mon Sep 17 00:00:00 2001
From: Raymond Toy <rtoy@chromium.org>
Date: Sun, 3 Sep 2017 20:35:27 -0700
Subject: [PATCH] Fix #8: Set *default-pathname-defaults* for cmucl.

Set `*default-pathname-defaults*` for cmucl in `gclload1.lsp` so that
it has the full path to `gclload.lsp`.  This is needed so that the
tests can be loaded from the subdirectories.  Without this, each load
file in the subdirectory is set to #P"" and when it tries to load a
test file, it can't because the setting of
`*default-pathname-defaults*` isn't pointing to the subdirectory but
rather the main directory since #P"" means current directory, and
cmucl hasn't changed it's current directory.

This fix only applies to cmucl and no other lisps.
---
 gclload1.lsp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gclload1.lsp b/gclload1.lsp
index 22b1861b..1404afc0 100644
--- a/gclload1.lsp
+++ b/gclload1.lsp
@@ -4,7 +4,15 @@
             c:*suppress-compiler-notes*    t
             c:*suppress-compiler-messages* t)
 #+:armedbear (require 'pprint)
-#+cmu (setq ext:*gc-verbose* nil)
+#+cmu
+(progn
+  (setq ext:*gc-verbose* nil)
+  ;; Set *default-pathname-defaults* to include the full path to this
+  ;; file.  This is needed for the tests so that they'll be loaded
+  ;; correctly from the subdirectories.
+  (setf *default-pathname-defaults*
+	(make-pathname :name nil :type nil :defaults *load-truename*)))
+
 #+gcl (setq compiler:*suppress-compiler-notes* t
             compiler:*suppress-compiler-warnings* t
             compiler:*compile-verbose* nil
-- 
GitLab