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

Fix test race condition #540

Merged
merged 7 commits into from Jul 30, 2015
Merged

Fix test race condition #540

merged 7 commits into from Jul 30, 2015

Conversation

technoweenie
Copy link
Contributor

This attempts to fix the race condition regarding $HOME in the integration tests.

Now, an initial $TESTHOME is setup at $REMOTEDIR/home. It has the starting git config and OSX keychain (if needed). begin_test() resets $HOME to $TRASHDIR/home, which is unique per test script. Tests run sequentially in a single script.

I also ran into an issue where begin_test() was silently failing, causing the scripts to bail after the first test. So, I added something in shutdown() that ensures every test runs by grepping the file for all begin_test() calls.

@technoweenie
Copy link
Contributor Author

Also updated all the scripts to use #!/usr/bin/env bash. There are a few hold outs:

  • rpm/SPECS/git.spec
  • The Git pre-push hook that Git LFS installs uses #!/bin/sh. I'll change that in another pr.

There were a few that pass args to the shebang. I changed those to use the same standard shebang with an explicit set for the args.

@technoweenie
Copy link
Contributor Author

Feels better, but not a complete fix :(

@rubyist
Copy link
Contributor

rubyist commented Jul 30, 2015

Doh, this is my fault. #544

@technoweenie
Copy link
Contributor Author

With @sinbad's help, I was able to replicate the issue that he fixed in #520. We both confirmed that this PR doesn't undo those fixes.

technoweenie added a commit that referenced this pull request Jul 30, 2015
@technoweenie technoweenie merged commit bcf15d9 into master Jul 30, 2015
@technoweenie technoweenie deleted the fix-test-race-condition branch July 30, 2015 14:43
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