Fix missing printed errors from run-parallel

These errors were captured, but not printed.

Fix the lint error that was not being displayed.

Change-Id: I56da5c3a044b8a8e41695883ce780aca6245ad04
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44780
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/reader/wgsl/parser_impl_function_header_test.cc b/src/reader/wgsl/parser_impl_function_header_test.cc
index 7884613..9ab7319 100644
--- a/src/reader/wgsl/parser_impl_function_header_test.cc
+++ b/src/reader/wgsl/parser_impl_function_header_test.cc
@@ -43,7 +43,7 @@
   EXPECT_EQ(f->name, "main");
   EXPECT_EQ(f->params.size(), 0u);
   EXPECT_TRUE(f->return_type->Is<type::F32>());
-  ASSERT_TRUE(f->return_type_decorations.size() == 1u);
+  ASSERT_EQ(f->return_type_decorations.size(), 1u);
   auto* loc = f->return_type_decorations[0]->As<ast::LocationDecoration>();
   ASSERT_TRUE(loc != nullptr);
   EXPECT_EQ(loc->value(), 1u);
diff --git a/tools/run-parallel/main.go b/tools/run-parallel/main.go
index 4fd3e48..98bc59b 100644
--- a/tools/run-parallel/main.go
+++ b/tools/run-parallel/main.go
@@ -74,7 +74,11 @@
 	}
 
 	taskIndices := make(chan int, 64)
-	results := make([]string, len(perInstanceValues))
+	type result struct {
+		msg     string
+		success bool
+	}
+	results := make([]result, len(perInstanceValues))
 
 	numCPU := runtime.NumCPU()
 	wg := sync.WaitGroup{}
@@ -89,7 +93,7 @@
 				}
 				success, out := invoke(exe, taskArgs)
 				if !success || !*onlyPrintFailures {
-					results[idx] = out
+					results[idx] = result{out, success}
 				}
 			}
 		}()
@@ -102,12 +106,16 @@
 
 	wg.Wait()
 
-	for _, output := range results {
-		if output != "" {
-			fmt.Println(output)
+	success := true
+	for _, result := range results {
+		if result.msg != "" {
+			fmt.Println(result.msg)
 		}
+		success = success && result.success
 	}
-
+	if !success {
+		os.Exit(1)
+	}
 	return nil
 }
 
@@ -116,7 +124,10 @@
 	out, err := cmd.CombinedOutput()
 	str := string(out)
 	if err != nil {
-		return false, "\n" + err.Error()
+		if str != "" {
+			return false, str
+		}
+		return false, err.Error()
 	}
 	return true, str
 }