Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581392 - dev-util/bats - Bash Automated Testing System
Summary: dev-util/bats - Bash Automated Testing System
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Espen H
URL: https://github.com/sstephenson/bats
Whiteboard:
Keywords:
Depends on:
Blocks: 581118
  Show dependency tree
 
Reported: 2016-04-27 20:25 UTC by Espen H
Modified: 2016-05-01 02:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bats-0.4.0.ebuild (bats-0.4.0.ebuild,516 bytes, text/plain)
2016-04-27 20:25 UTC, Espen H
Details
bats-0.4.0.ebuild-1 (bats-0.4.0.ebuild,487 bytes, text/plain)
2016-04-28 19:08 UTC, Espen H
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Espen H 2016-04-27 20:25:38 UTC
Created attachment 432342 [details]
bats-0.4.0.ebuild

Hi!

Please find attached bats-0.4.0.ebuild for being added into the gentoo portage tree. I volunteer to proxy maintain this package.

I was not sure where to file this, so feel free to correct my suggestion of dev-util/bats.

---

From https://github.com/sstephenson/bats#bats-bash-automated-testing-system:

Bats is a TAP-compliant testing framework for Bash. It provides a simple way to verify that the UNIX programs you write behave as expected.

A Bats test file is a Bash script with special syntax for defining test cases. Under the hood, each test case is just a function with a description.

Bats is most useful when testing software written in Bash, but you can use it to test any UNIX program.

Test cases consist of standard shell commands. Bats makes use of Bash's errexit (set -e) option when running test cases. If every command in the test case exits with a 0 status code (success), the test passes. In this way, each line is an assertion of truth.
Comment 1 Tomáš Mózes 2016-04-28 04:22:31 UTC
Good job, works perfectly.

You can omit DOCS=( README.md ) as it is contained in the defaults.
Comment 2 Espen H 2016-04-28 19:08:30 UTC
Created attachment 432452 [details]
bats-0.4.0.ebuild-1

Hi Tomáš,

Thanks for the suggestion. I have updated the ebuild with a new version.
Comment 3 Sam Jorna (wraeth) gentoo-dev 2016-04-30 14:35:38 UTC
bats
Comment 4 Sam Jorna (wraeth) gentoo-dev 2016-04-30 14:37:58 UTC
Thanks for your contribution!

Apologies for the spurious comment before - used the wrong argument! :D

There were a couple of further minor adjustments to the ebuild that I made as I
committed it:

 - The DEPEND and RDEPEND variables don't need to be defined if they are null,
   so they were removed.
 - I tested this locally under an x86 environment so also KEYWORDED for ~x86.

Otherwise, good job, and welcome to the Proxy Maintainers!


commit f592cbb685e350a15592bdc24a70d484b1e3726f
Author: Sam Jorna <wraeth@gentoo.org>
Date:   Sat Apr 30 21:57:33 2016 +1000

    dev-util/bats: new package
    
    Bats is a TAP-compliant testing framework for Bash. It provides a simple
    way to verify that the UNIX programs you write behave as expected.
    
    This has been added in order to support app-admin/yadm in bug 581118.
    Maintainer assigned to  Espen H per request under Proxy Maintainers.
    
    Gentoo-bug: 581392
    Package-Manager: portage-2.2.28
Comment 5 Sam Jorna (wraeth) gentoo-dev 2016-05-01 02:11:46 UTC
Just to let you know, I had a missing "|| die" pointed out to me that I have fixed for you in commit https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59340b7