Hi Michele,

On Tue, 6 May 2014 17:39:32 +0200 Michele La Monaca 
<[email protected]> wrote:

>> Thanks a lot.  As I understand it, $PWD and `pwd` don't produce the same
>> value on your system.  Is it right?
>
> Right. The attached script produces this output on my system:
>
> /tmp
> /tmp
>
> /tmp
> /tmp/tmp
>
>
>> Getting the current work directory is surprisingly hard (maybe not that
>> surprising).  There's $PWD, the pwd shell builtin and the pwd executable
>> file (usually /bin/pwd or /usr/bin/pwd).  Sometimes they don't produce
>> consistent results when the current work directory is a symlink or the
>> path to it contains a symlink.  That's probably why this test breaks on
>> your system.
>
> Anyway $TEST_DIR and hence `pwd` (builtin or not) seems to work
> properly on all systems, so it looks a safer choice.
>
>> Does the path to the directory where you built and tested CHICKEN
>> contain a symlink?
>
> No.
>
>> What shell are you using?
>
> On Solaris 10 /bin/sh is a bourne shell (thus it has a builtin pwd
> much like the korn shell).

Many thanks.  Attached is your patch signed-off (tested on Linux).

Best wishes.
Mario
-- 
http://parenteses.org/mario
>From 633d0c6bd49d7c4501136abe3f9e1b1bdf538e10 Mon Sep 17 00:00:00 2001
From: Michele La Monaca <[email protected]>
Date: Tue, 6 May 2014 13:17:57 +0200
Subject: [PATCH] fix private repository tests for Solaris

Signed-off-by: Mario Domenech Goulart <[email protected]>
---
 tests/runtests.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/runtests.sh b/tests/runtests.sh
index d2ffe72..2dbeedd 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -398,10 +398,10 @@ $compile -e embedded3.c embedded4.scm
 echo "======================================== private repository test ..."
 mkdir -p tmp
 $compile private-repository-test.scm -private-repository -o tmp/xxx
-tmp/xxx $PWD/tmp
-PATH=$PWD/tmp:$PATH xxx $PWD/tmp
+tmp/xxx ${TEST_DIR}/tmp
+PATH=${TEST_DIR}/tmp:$PATH xxx ${TEST_DIR}/tmp
 # this may crash, if the PATH contains a non-matching libchicken.dll on Windows:
-#PATH=$PATH:$PWD/tmp xxx $PWD/tmp
+#PATH=$PATH:${TEST_DIR}/tmp xxx ${TEST_DIR}/tmp
 rm -fr rev-app rev-app-2 reverser/*.import.* reverser/*.so
 
 echo "======================================== reinstall tests"
-- 
1.7.10.4

_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to