Update test result status for Solaris 11.
(cherry picked from commit 729a0a5f984c44c50eb2e4197f9f3d70bb759a78)
Implement parallel acceptance testing.

The implementation is based on generating a custom Makefile from
within testall, and then invoking a sub make command to execute the
tests in parallel. Since not all tests can run in parallel for various
reasons, tests that reside in a /serial/ or /unsafe/ directory will be
carried out serially.

Care has also been taken to ensure that timed tests will not hog the
make job slots, but unfortunately it has to occupy at least one slot,
which means that if your make -j flag contains exactly the number of
cores you have, one core will be mostly idle as long as any timed
tests are running. The recommended workaround is to raise the number
of jobs a bit above your core count (which is recommended practice
regardless).

The way the makefile is constructed is so that each parallel test has
its own rule, all the timed and serial tests each have one group rule,
and the serial rule is made to depend on all the other rules, so that
it runs last, and in isolation.

Note that for the sub make invokation to communicate with the job
server correctly, the testall script has to be run with a '+' prefix
from within the Makefile, hence it was removed from the TESTS variable
and executed manually instead.

testall was also changed so that it supports carrying out tests while
only writing to the workdir. This is necessary so that each invokation
will not overwrite each other's logs.

The parallel test harness of automake was considered (see
http://www.gnu.org/software/automake/manual/automake.html#Parallel-Test-Harness)
as an alternative, but was disqualified for a number of reasons. The
two main obstacles were:

- The list of tests has to be generated in configure, and cannot be
  easily regenerated on every run, which means that if you add a test
  it will not be picked up unless you reconfigure the project.

- Timed tests would be problematic because they have to run together
  in order to be efficient. If they don't, each test will wait its
  entire wait period before allowing the next test to run. Automake
  however, requires each test to be executed by a separate rule.
(cherry picked from commit 43fcc82068749cd19c5b4d7877653dadc6f42a73)

Conflicts:

	tests/acceptance/testall
Introduce soft failures.

The intention is to have a kind of fail state that is appropriate for
using in test cases that document bugs. There is a subtle, yet
important different between a suppressed and a soft failure. A
suppressed failure counts as a real failure in the XML output, and
will be reported as a failure in graphs. Soft failures OTOH, will be
reported as skipped in the XML output, but will still run and will
block the build if they pass unexpectedly.
(cherry picked from commit 9d19709beafa9f596bf200bad3d01494246425e0)
Make sure all relevant variables are inherited by sub invokations.

This fixes parallel test runs in sub projects.
(cherry picked from commit 8c781e2eb38d289e9639116eadecfd6e4d436106)
Make sure serial tests are run, even if parallel ones fail.

This moves the serial tests out of the makefile, since make would
refuse to run them if any parallel tests had failed.
(cherry picked from commit 63c9746452a757fd97e394c3541eddcd5f37279d)
Catch errors resulting from miscalculating the number of test results.

This will save us if we make a mistake in testall which leaves out
some test results.
(cherry picked from commit b004bb6c83b2a0500c7b4128c17af60f8442716b)
Add missing variable export in testall sub invocation.

Symptom is that you specified --gainroot, but it would still complain
about it being missing.
(cherry picked from commit 11b49c0ee8e5465208ce4034b95aafe05aafeda8)
Fix incorrect test count calculation on Solaris 11.

`wc -l` on Solaris returns a number with some padded spaces around it,
which sh doesn't like when comparing numbers later on, so the result
is wrong. This caused the script to return success, when it should
have returned failure.
(cherry picked from commit bf37d8b07db6114276c63fdf442b4d649ebbe5ae)