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

CMake: Simplify run_test.sh and avoid array handling magic #3776

Merged
merged 2 commits into from Jan 12, 2017

Conversation

tamiko
Copy link
Member

@tamiko tamiko commented Jan 12, 2017

In reference to #3775

for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ;
done
echo " "
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@tjhei Simply restructuring the shell script and removing this arcane magic is also an option.

# same. Create a diff file "diff${variant}" for each variant file that
# is found (including the main comparison file).
# Pick up main comparison file and all variants. A valid variant name is
# of the form [...].output.[STRING]
Copy link
Member

Choose a reason for hiding this comment

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

You don't enforce the "." after output though, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I probably don't enforce it. Judging from the snippet below, we pick up everything that matches "${COMPARISON_FILE}"*.

Copy link
Member Author

Choose a reason for hiding this comment

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

Now, I also remember the reason. The old variant was

for files in "${COMPARISON_FILE}" "${COMPARISON_FILE}".*; ...

This produces at least a warning if the second expression doesn't match anything.

Copy link
Member

Choose a reason for hiding this comment

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

fair enough.

Copy link
Member

@tjhei tjhei left a comment

Choose a reason for hiding this comment

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

Looks much nicer!

@tjhei tjhei merged commit 5325e5c into dealii:master Jan 12, 2017
@tamiko tamiko deleted the fix_spaces_testsuite branch January 15, 2017 10:56
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.

None yet

2 participants