aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/testball.rb
diff options
context:
space:
mode:
authorJack Nagel2012-03-18 13:58:13 -0500
committerJack Nagel2012-04-01 12:39:59 -0500
commitb36f59dd3c8a3bf95eeb715e3fdd05bce2ccdc75 (patch)
treeba3f6961363bfd11839976ce295b7967a275f208 /Library/Homebrew/test/testball.rb
parentbe829c72c3255e0d1682a1e796b91cb644109372 (diff)
downloadhomebrew-b36f59dd3c8a3bf95eeb715e3fdd05bce2ccdc75.tar.bz2
New fails_with infrastructure
- Formulae can now declare failures on any compiler. - FailsWithLLVM and associated formula elements have been moved to compat. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/test/testball.rb')
-rw-r--r--Library/Homebrew/test/testball.rb82
1 files changed, 82 insertions, 0 deletions
diff --git a/Library/Homebrew/test/testball.rb b/Library/Homebrew/test/testball.rb
index aae18115c..a77d7709c 100644
--- a/Library/Homebrew/test/testball.rb
+++ b/Library/Homebrew/test/testball.rb
@@ -39,3 +39,85 @@ class ConfigureFails <Formula
system "./configure"
end
end
+
+class TestAllCompilerFailures < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "compilerfailures"
+ end
+
+ fails_with :clang
+ fails_with :llvm
+ fails_with :gcc
+end
+
+class TestNoCompilerFailures < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "nocompilerfailures"
+ end
+
+ fails_with(:clang) { build 42 }
+ fails_with(:llvm) { build 42 }
+ fails_with(:gcc) { build 42 }
+end
+
+class TestLLVMFailure < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "llvmfailure"
+ end
+
+ fails_with :llvm
+end
+
+class TestMixedCompilerFailures < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "mixedcompilerfailures"
+ end
+
+ fails_with(:clang) { build MacOS.clang_build_version }
+ fails_with(:llvm) { build 42 }
+ fails_with(:gcc) { build 5666 }
+end
+
+class TestMoreMixedCompilerFailures < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "moremixedcompilerfailures"
+ end
+
+ fails_with(:clang) { build 42 }
+ fails_with(:llvm) { build 2336 }
+ fails_with(:gcc) { build 5666 }
+end
+
+class TestEvenMoreMixedCompilerFailures < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "evenmoremixedcompilerfailures"
+ end
+
+ fails_with :clang
+ fails_with(:llvm) { build 2336 }
+ fails_with(:gcc) { build 5648 }
+end
+
+class TestBlockWithoutBuildCompilerFailure < Formula
+ def initialize name=nil
+ @url="file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
+ @homepage = 'http://example.com/'
+ super "blockwithoutbuildcompilerfailure"
+ end
+
+ fails_with :clang do
+ cause "failure"
+ end
+end