bash-test-utils: [RFK] cleanup stdout-vs.-file confusion

Now also early exits like on a SKIPALL use
the done_testing() function which decides
where output goes.

This solves the problem that some scripts with
require_* functions were not uploaded and their
output was just part of a logfile - depending on
the actual success that the require_* function
checked.
bash-test-utils: utils for env var handling

get_env FOO: get variable value for $FOO
has_env FOO 17: check whether $FOO equals 17
require_env_eq FOO 17: only continue if $FOO equals 17
require_env_not_eq FOO 17: only continue if $FOO does not equal 17
bash-test-utils: +get_largest_partition()
bash-test-utils: +get_largest_user_tempdir()

Find the largest partition on current system
and create a temp file there. Try again with
sudo if normal mktemp doesn't work.
bash-test-utils: fix get_largest_user_tempdir() function

Function worked just at the second run because sudo was called with "-n"
which results in an error, but asked for the password nevertheless. At
the second run the password is already stored and the function worked.

I have removed the "-n" and the now senseless if statement.
bash-test-utils: cwd at end to where we started
bash-test-utils: rename default test

Originally it said

  ok - autoreport

named after the original name of the library.
Now it says

  ok - survived

which is more related to the actual test.
bash-test-utils: +install_program()

Installs program (assumes deb/rpm packagename == program name, for now).
bash-test-utils: +print_and_diag()

Like diag() but additionally prints the lines out to STDOUT immediately.
bash-test-utils: + has_success/require_success

has_success ... checks for success
                usually the last command's error code
require_success ... runs has_success and does graceful exit if fails
bash-test-utils: diag_file() functions
bash-test-utils: fix local variable names

Once we use our own lib to implement other
lib functions it becomes evident that shell
scripting is about *global* variables.
Now prefixing function variables. First
the ones we need urgently but in fact we
need to fix this in every single function.
bash-test-utils: support tracking of benchmarks

SYNOPSIS:

In your test script:

 # ...
 append_benchmarkdata "NAME:bogomips" "VALUE:1234.5" "kernel:3.2.0-53-generic"
 # ...

which means you provide one data point by describing it
with key:value pairs (delimited by ":") where 2 keys are mandatory:

  NAME     - name of the benchmark
  VALUE    - actual measured value

plus any additional information as key:value pairs,
e.g. the environment, or the actual units of the VALUE, etc.

Only the first ":" counts as delimiter, so your values
can contain ":" and even whitespace.
bash-test-utils: install_program() uses new pkg/program mapping
bash-test-utils: +get_pkg_for_program(), +get_distro()

Guess distro (Debian, Ubuntu, ALinux).
install_program() now looks into a table
of package/program mappings to adapt
the necessary yum/apt install command.
bash-test-utils: unique key to recognize benchmark data
bash-test-utils: timestamp support

Cou can trigger adding automatic timestamps by setting

  GENERATE_TIMESTAMPS=1

in your test script. This will append a ttimestamp

line after each ok/notok line.

You can also generate your own timestamps by calling

  append_timestamp

A timestamp line looks like this:

  # Test-Timestamp: 1381502691
bash-test-utils: allow user-specific progam/package mapping for install_program()

install_program() installs a program but knows
about mapping to actual package names which might
be distro-specific, eg. g++ in Debian is just g++
but in ALinux the package is gcc-c++.

bash-test-utils has a default collection for most
common uses and we now extend this by providing
additional user-specific mapping that an actual
test program needs.
Merge pull request #7 from schwigon-aws/master

publish