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

improve test suite portability #609

Closed
wants to merge 10 commits into from

Conversation

rolandwalker
Copy link
Contributor

Tested under dash/shellcheck/os x; hopefully will also pass Travis.

This PR gets make test within 1 failure of passing under OS X. (There is a dependency on GNU sed within test/stage/split-chunk-test.)

Copy link
Owner

@jonas jonas left a comment

Choose a reason for hiding this comment

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

Looks good, worst case the GNU sed command in the stage/split-chunk test can be replaced by a cat or file copy.

@@ -356,6 +356,10 @@ test_require()
diff-highlight)
diff_highlight_path="$(git --exec-path)/../../share/git-core/contrib/diff-highlight/diff-highlight"
if [ ! -e "$diff_highlight_path" ]; then
# alt path
diff_highlight_path="$(git --exec-path)/../../share/git/contrib/diff-highlight/diff-highlight"
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@@ -299,7 +299,7 @@ show_test_results()
failed="$(grep FAIL < .test-result | wc -l)"
count="$(sed -n '/\(FAIL\|OK\)/p' < .test-result | wc -l)"

printf "Failed %d out of %d test(s)%s\n" $failed $count
printf "Failed %d out of %d test(s)\n" "$failed" "$count"
Copy link
Owner

Choose a reason for hiding this comment

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

Great catch.

@jonas
Copy link
Owner

jonas commented Jun 23, 2017

Thanks, manually squashed and merged. Also fixed show_results.sh to work with POSIX shell.

@rolandwalker rolandwalker deleted the libtest-nits-posix-mac branch June 23, 2017 12:46
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.

2 participants