commit:     901ad79e4457102cf93580864f86ca30bbd0a401
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 20 07:55:48 2019 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 07:55:48 2019 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=901ad79e

tests: copy q for install test for Darwin

On Darwin, resolving the path of a hardlink, resolves to the first entry
for it, e.g. not necessarily the path the executable was called at.
Since this makes the test fail, simply copy the binary, to make sure it
always works.

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 tests/init.sh        | 1 +
 tests/install/dotest | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/init.sh b/tests/init.sh
index 5c9ec3d..93f1100 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -35,6 +35,7 @@ export PORTAGE_CONFIGROOT="${ab}/not/a/real/path"
 # Always use UTC for timestamps to keep tests stable. #551806
 export TZ='UTC 0'
 
+# create symlinks for applets
 q -i -q
 
 tret=0

diff --git a/tests/install/dotest b/tests/install/dotest
index 1c790d1..b312f1b 100755
--- a/tests/install/dotest
+++ b/tests/install/dotest
@@ -11,8 +11,8 @@ applets=$(q -Ch | \
 )
 rm -f ${applets}
 
-if ! ln -f `which q` ; then
-       skip "could not 'ln -f'"
+if ! cp `which q` . ; then
+       skip "could not copy q"
 fi
 ./q -i || die "./q -i"
 

Reply via email to