bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)

If the child process exited with a non-zero code, don't strip the
last line of stdout anymore.

Add also a sanity check in accumulate_result().
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 2cfbdd1..e068b92 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -116,6 +116,8 @@
         elif ok == RESOURCE_DENIED:
             self.skipped.append(test)
             self.resource_denieds.append(test)
+        elif ok != INTERRUPTED:
+            raise ValueError("invalid test result: %r" % ok)
 
     def display_progress(self, test_index, test):
         if self.ns.quiet: