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

OSX: Fix readlink & ASTImportTest.sh issues. #9715

Merged
merged 1 commit into from
Sep 1, 2020
Merged

Conversation

aarlt
Copy link
Member

@aarlt aarlt commented Sep 1, 2020

Fix #9711 and #9712. Also see #9710.

This is probably not the cleanest solution.

  • scripts/splitSources.py - system exception hook will print message and will result code 3. This will be treated as a critical error by scripts/ASTImportTest.sh. If an UnicodeDecodeError exception occurs, the script will result code 2, scripts/ASTImportTest.sh will ignore this, but will print stdout of the python script. The semantic of result code 0 and 1 are the same as before: 0 means that there was code extracted from a multi-source file and 1 means that the file was not a multi-source file. Also regarding splitSources.py can't handle invalid UTF-8 sequences #9710: splitting of multi-source files containing invalid utf-8 sequences is still not implemented.

  • scripts/ASTImportTest.sh - use of greadlink on osx ASTImportTests.sh broken on OS X (readlink: illegal option -- f) #9712. fix that it silently ignores errors by adding result code handling for scripts/splitSources.py ASTImportTest.sh silently ignores errors #9711.

  • scripts/test_antlr_grammar.sh - use of greadlink on osx.

@aarlt aarlt requested a review from cameel September 1, 2020 02:54
@chriseth chriseth merged commit ea38ff0 into develop Sep 1, 2020
@chriseth chriseth deleted the macosx-readlink branch September 1, 2020 10:26
REPO_ROOT=$(readlink -f "$(dirname "$0")"/..)
READLINK=readlink
if [[ "$OSTYPE" == "darwin"* ]]; then
READLINK=greadlink
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What packages is this contained in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@axic greadlink is part of coreutils, installable via brew install coreutils.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can that be added to the dependencies list in the documentation? Or well, into the some developer docs which explains how to run all the tests.

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

Successfully merging this pull request may close these issues.

ASTImportTest.sh silently ignores errors
3 participants