Commit Graph

10 Commits

Author SHA1 Message Date
Andrew Gregory 29c0d8233b use tap.sh for bash tests
tap.sh is a reusable TAP library that handles test counting and provides
useful diagnostic messages on test failures.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28 13:06:28 +10:00
Andrew Gregory fda599df37 add vim modeline to test files
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-24 11:19:30 +10:00
Jason St. John 7bfaa358ea Replace "echo" command with "printf" in human_to_size_test.sh
Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15 11:02:27 +10:00
Jason St. John 230bd5c2fd Fix whitespace and other formatting issues
This commit:
-- replaces space-based indents with tabs per the coding standards
-- removes extraneous whitespace (e.g. extra spaces between function args)
-- adds missing braces for a one-line if statement

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
2013-11-15 11:02:27 +10:00
Andrew Gregory ea6aeef8ba Makefile.am: fix typo in LOG_DRIVER variable
Self-executing tests were not being run through the tap log driver.
This caused `make check` to ignore discrepancies between the expected
number of tests and the actual number of tests.

Also, fix some uncommented output from test scripts that could confuse
TAP parsers.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-11-15 11:02:27 +10:00
Andrew Gregory 9263cc5874 provide default values for test scripts
Our test scripts currently require that the first argument be the
library or binary to be tested.  This makes integrating them with
automake which doesn't have a mechanism for passing specific arguments
to individual tests.  Instead, provide a default built from paths in the
environment which can be provided to all test scripts by automake.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21 11:00:18 +10:00
Andrew Gregory d3726bbd26 convert test scripts to tap output
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-08-21 11:00:18 +10:00
Andrew Gregory 274c3890b0 make test/scripts/human_to_size.sh executable
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
2013-02-07 10:48:11 +10:00
Allan McRae 47711947dd Scripts testsuite output consistency
Signed-off-by: Allan McRae <allan@archlinux.org>
2012-06-25 23:39:52 -05:00
Dave Reisner b58489d29a scripts/library: add human_to_size
This is a bash wrapper around an awk function that parses human readable
sizes and returns their representative values in bytes, as a string. A
small test harness is added to validate the functionality.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
2012-06-25 23:39:12 -05:00