From 86ecc65926c1e6c3f32ea54fc733f438fa2fb422 Mon Sep 17 00:00:00 2001 From: Josh Tilles Date: Fri, 11 Apr 2014 14:25:21 -0400 Subject: [PATCH] ghc: fix running of optional testsuite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `brew install ghc --tests` emits a bunch of warnings and subsequently fails because staging the "testsuite" resource makes its files available in a `testsuite` subdirectory—*not* in the current directory, which is where the formula *expects* them to be. Closes Homebrew/homebrew#28330. Signed-off-by: Adam Vandenberg --- Formula/ghc.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Formula/ghc.rb b/Formula/ghc.rb index 2e2dadd4f6..bf1caf64a3 100644 --- a/Formula/ghc.rb +++ b/Formula/ghc.rb @@ -128,11 +128,13 @@ class Ghc < Formula if build.include? "tests" resource("testsuite").stage do - (buildpath+"Ghcsource/config").install Dir["config/*"] - (buildpath+"Ghcsource/driver").install Dir["driver/*"] - (buildpath+"Ghcsource/mk").install Dir["mk/*"] - (buildpath+"Ghcsource/tests").install Dir["tests/*"] - (buildpath+"Ghcsource/timeout").install Dir["timeout/*"] + cd "testsuite" do + (buildpath+"Ghcsource/config").install Dir["config/*"] + (buildpath+"Ghcsource/driver").install Dir["driver/*"] + (buildpath+"Ghcsource/mk").install Dir["mk/*"] + (buildpath+"Ghcsource/tests").install Dir["tests/*"] + (buildpath+"Ghcsource/timeout").install Dir["timeout/*"] + end cd (buildpath+"Ghcsource/tests") do system "make", "CLEANUP=1", "THREADS=#{ENV.make_jobs}", "fast" end