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

Comments

@jaydee-io
Copy link

commented Feb 24, 2016

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

This comment has been minimized.

Copy link
Owner

commented Feb 24, 2016

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

This comment has been minimized.

Copy link
Author

commented Feb 24, 2016

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

This comment has been minimized.

Copy link
Owner

commented Feb 24, 2016

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

This comment has been minimized.

Copy link
Author

commented Feb 24, 2016

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

run_tests.sh: don't crash on absolute filepaths in test names.
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

This comment has been minimized.

Copy link
Owner

commented Feb 24, 2016

Not-so-quick and dirty fix: 7875e6c

@jaydee-io

This comment has been minimized.

Copy link
Author

commented Feb 25, 2016

Commit 7875e6c fix the problem for me.
Thanks !

@skvadrik skvadrik closed this Feb 25, 2016

skvadrik added a commit that referenced this issue Mar 14, 2016

run_tests.sh: don't crash on absolute filepaths in test names.
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
Projects
None yet
2 participants
You can’t perform that action at this time.