659e2de97e
Closes #40329. Signed-off-by: Izaak Beekman <zbeekman@gmail.com>
48 lines
1.3 KiB
Ruby
48 lines
1.3 KiB
Ruby
class Allure < Formula
|
|
desc "Flexible lightweight test report tool"
|
|
homepage "https://github.com/allure-framework/allure2"
|
|
url "https://dl.bintray.com/qameta/maven/io/qameta/allure/allure-commandline/2.12.1/allure-commandline-2.12.1.zip"
|
|
sha256 "b88cc0e6c5ab66e8845bb3236ea0c76ff44af44a596ef3b68d382b19d9736c1f"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on :java => "1.8+"
|
|
|
|
def install
|
|
# Remove all windows files
|
|
rm_f Dir["bin/*.bat"]
|
|
|
|
prefix.install_metafiles
|
|
libexec.install Dir["*"]
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
end
|
|
|
|
test do
|
|
(testpath/"allure-results/allure-result.json").write <<~EOS
|
|
{
|
|
"uuid": "allure",
|
|
"name": "testReportGeneration",
|
|
"fullName": "org.homebrew.AllureFormula.testReportGeneration",
|
|
"status": "passed",
|
|
"stage": "finished",
|
|
"start": 1494857300486,
|
|
"stop": 1494857300492,
|
|
"labels": [
|
|
{
|
|
"name": "package",
|
|
"value": "org.homebrew"
|
|
},
|
|
{
|
|
"name": "testClass",
|
|
"value": "AllureFormula"
|
|
},
|
|
{
|
|
"name": "testMethod",
|
|
"value": "testReportGeneration"
|
|
}
|
|
]
|
|
}
|
|
EOS
|
|
system "#{bin}/allure", "generate", "#{testpath}/allure-results", "-o", "#{testpath}/allure-report"
|
|
end
|
|
end
|