>From a3cea67616c7d50092e20374ebc47176c7fee660 Mon Sep 17 00:00:00 2001 From: Moritz Heidkamp Date: Sat, 25 May 2013 17:31:12 +0200 Subject: [PATCH 3/3] Make tests work from symlinked paths The private repository path tests didn't work when run from inside a path containing symlinks because runtests.sh didn't expand symlinks while the -private-repository mechanism does. This lead the test assertion which compares the two paths to fail. --- tests/private-repository-test.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/private-repository-test.scm b/tests/private-repository-test.scm index 9ad524c..6a4f5c7 100644 --- a/tests/private-repository-test.scm +++ b/tests/private-repository-test.scm @@ -1,10 +1,15 @@ ;;;; private-repository-test.scm -(use files) +(use files posix) -(define repo (normalize-pathname (repository-path))) -(define dir (normalize-pathname (car (command-line-arguments)))) +(define read-symbolic-link* + (cond-expand + ((and windows (not cygwin)) (lambda (x) x)) + (else read-symbolic-link))) + +(define repo (normalize-pathname (read-symbolic-link* (repository-path) #t))) +(define dir (normalize-pathname (read-symbolic-link* (car (command-line-arguments)) #t))) (print (list dir repo)) -- 1.8.2.3