From ea718a264243f6ff81b5dc29aa338768e710f762 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Mon, 16 Mar 2015 00:55:55 +0100 Subject: autobench: test added Closes #37752. Signed-off-by: Xu Cheng --- Library/Formula/autobench.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/autobench.rb b/Library/Formula/autobench.rb index 5f6afcc0b..f60daf41d 100644 --- a/Library/Formula/autobench.rb +++ b/Library/Formula/autobench.rb @@ -1,11 +1,9 @@ -require 'formula' - class Autobench < Formula - homepage 'http://www.xenoclast.org/autobench/' - url 'http://www.xenoclast.org/autobench/downloads/autobench-2.1.2.tar.gz' - sha1 '8c342b50ce36c13d46dc995bc5f08acdead21553' + homepage "http://www.xenoclast.org/autobench/" + url "http://www.xenoclast.org/autobench/downloads/autobench-2.1.2.tar.gz" + sha256 "d8b4d30aaaf652df37dff18ee819d8f42751bc40272d288ee2a5d847eaf0423b" - depends_on 'httperf' + depends_on "httperf" def install system "make", "PREFIX=#{prefix}", @@ -14,4 +12,10 @@ class Autobench < Formula "CFLAGS=#{ENV.cflags}", "install" end + + test do + system "#{bin}/crfile", "-f", "#{testpath}/test", "-s", "42" + assert File.exist? "test" + assert_equal 42, File.size("test") + end end -- cgit v1.2.3