From cd8a00e9c6b2c7bb33b9a88fdb8630d8c541993b Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 30 Sep 2024 10:46:06 +0200 Subject: [PATCH] Fix spec runner - we only want the last line for json parsing --- bin/specs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/specs b/bin/specs index 53b3db61f..e2aec48eb 100755 --- a/bin/specs +++ b/bin/specs @@ -7,6 +7,7 @@ gemfile do gem "open3" gem "tty-spinner" gem "pastel" + gem "debug" end COLOR = Pastel.new @@ -54,7 +55,8 @@ Sync do |parent| stdin, stdout, wait = Open3.popen2({ "CI" => "1" }, "bundle exec rspec #{test} --format json --order random") stdin.close - results[test] = JSON.parse(stdout.read) + output = stdout.read.lines.last + results[test] = JSON.parse(output) stdout.close time = print_time(results[test].dig("summary", "duration").round(3))