Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_tests.sh fail when running configure script with absolute path #137

Closed
jaydee-io opened this issue Feb 24, 2016 · 6 comments
Closed
Assignees

Comments

@jaydee-io
Copy link

When running the configure script with an absolute path, run_tests.sh fail.
See output.txt and test-suite.log for details.

$ tar -xf /tmp/packages/re2c-0.16.tar.gz -C /tmp/sources/re2c-0.16 --strip-components 1
$ cd /tmp/build/re2c-0.16
$ /tmp/sources/re2c-0.16/configure --prefix=/tmp/install --enable-docs
$ make -j8 bootstrap docs
$ make -j8 check

The same using a relative path leads to run_tests.sh success.

$ tar -xf /tmp/packages/re2c-0.16.tar.gz -C /tmp/sources/re2c-0.16 --strip-components 1
$ cd /tmp/build/re2c-0.16
$ ../../sources/re2c-0.16/configure --prefix=/tmp/install --enable-docs
$ make -j8 bootstrap docs
$ make -j8 check
@skvadrik skvadrik self-assigned this Feb 24, 2016
@skvadrik skvadrik modified the milestones: 0.16, 0.17 Feb 24, 2016
@skvadrik
Copy link
Owner

Confirmed, thanks for reporting.
Yet I'm not sure what is the simplest portable way to tell if a path is absolute/relative in bash.

@jaydee-io
Copy link
Author

I'm currently working to submit you a patch of run_tests.sh using readlink -f to convert to absolute path.

But first, I'm not sure if it's portable to Wine.
And under Mac OS X the default readline command doesn't support -foption. We need to use greadlink instead.

brew install coreutils
greadlink -f file.txt

@skvadrik
Copy link
Owner

Sadly, readlink is also non-POSIX (thanks for your effort anyway).

I think I've come up with a more portable fix: simply copy all test sources to test_blddir and keep using relative paths.

@jaydee-io
Copy link
Author

Yes, you're right.
Your fix is surely simpler and not concerned by portability issue.

skvadrik added a commit that referenced this issue Feb 24, 2016
This patch fixes bug #137 "run_tests.sh fail when running configure
script with absolute path".

The fix: copy all test files into temporary build directory (which
is addressed by a relative filepath) and keep messing with relative
filepaths.
@skvadrik
Copy link
Owner

Not-so-quick and dirty fix: 7875e6c

@jaydee-io
Copy link
Author

Commit 7875e6c fix the problem for me.
Thanks !

skvadrik added a commit that referenced this issue Mar 14, 2016
This patch fixes bug #137 "run_tests.sh fail when running configure
script with absolute path".

The fix: copy all test files into temporary build directory (which
is addressed by a relative filepath) and keep messing with relative
filepaths.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants