Hard error on JSON truncation
Fix testall always succeeding, even when there are failed tests.

We trap EXIT, so make sure we keep the return code.
Merge pull request #2011 from worr/bug/json-truncation

Hard error on JSON truncation
Revert "Fix testall always succeeding, even when there are failed tests."

This reverts commit 0013fd83bb8c494dd0ca42c75c0384e4d2f6bc5a.

Apparently relying on the $? variable inside a trap handler doesn't
work in all shells (Solaris).

New fix will follow.
Fix testall returning success even when there are failures.

The trap handler hides the exit code, so don't use it unless we have
to.