bash_test: handle race condition.
Other tests may delete Bash files (e.g. `shcmd.sh`) while tests are ongoing so ensure this doesn't cause a test failure.
This commit is contained in:
parent
bc9d3afd6e
commit
3f6d31dee1
@ -2,6 +2,7 @@ require "testing_env"
|
||||
|
||||
class BashTests < Homebrew::TestCase
|
||||
def assert_valid_bash_syntax(file)
|
||||
return unless file.exist?
|
||||
output = Utils.popen_read("/bin/bash -n #{file} 2>&1")
|
||||
assert $?.success?, output
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user