git-annex: write custom test
The automatic test-suite, whilst being very thorough, routinely times out on our CI system and causes issues in other builds consequently. This commit adds a custom test instead, which shouldn't time out. Closes Homebrew/homebrew#48787. Closes Homebrew/homebrew#48808. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
This commit is contained in:
parent
3c05d5ab4f
commit
573da62d0a
1 changed files with 19 additions and 1 deletions
|
@ -41,6 +41,24 @@ class GitAnnex < Formula
|
|||
test do
|
||||
# make sure git can find git-annex
|
||||
ENV.prepend_path "PATH", bin
|
||||
system "git", "annex", "test"
|
||||
# We don't want this here or it gets "caught" by git-annex.
|
||||
rm_r "Library/Python/2.7/lib/python/site-packages/homebrew.pth"
|
||||
|
||||
system "git", "init"
|
||||
system "git", "annex", "init"
|
||||
(testpath/"Hello.txt").write "Hello!"
|
||||
assert !File.symlink?("Hello.txt")
|
||||
assert_match "add Hello.txt ok", shell_output("git annex add .")
|
||||
system "git", "commit", "-a", "-m", "Initial Commit"
|
||||
assert File.symlink?("Hello.txt")
|
||||
|
||||
# The steps below are necessary to ensure the directory cleanly deletes.
|
||||
# git-annex guards files in a way that isn't entirely friendly of automatically
|
||||
# wiping temporary directories in the way `brew test` does at end of execution.
|
||||
system "git", "rm", "Hello.txt", "-f"
|
||||
system "git", "commit", "-a", "-m", "Farewell!"
|
||||
system "git", "annex", "unused"
|
||||
assert_match "dropunused 1 ok", shell_output("git annex dropunused 1 --force")
|
||||
system "git", "annex", "uninit"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue