From dcd7ef66d0e419db4d97f1ebb624ec3c55e1fe4e Mon Sep 17 00:00:00 2001 From: Nathan LeClaire Date: Wed, 28 Feb 2018 18:48:52 -0800 Subject: [PATCH] Add support for Go 1.10 (cached) output Summary: In Go 1.10 the output for tests was changed to have also a "(cached)" mode in addition to the normal timing info printed. This is on by default. This adds support for parsing these lines instead of erroring out on the regex. Test Plan: Have a unit test included, and will continue to poke at it locally. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D19161 --- .../parser/ArcanistGoTestResultParser.php | 7 +++++-- .../ArcanistGoTestResultParserTestCase.php | 21 +++++++++++++++++++ .../testresults/go.nonverbose-go1.10 | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 src/unit/parser/__tests__/testresults/go.nonverbose-go1.10 diff --git a/src/unit/parser/ArcanistGoTestResultParser.php b/src/unit/parser/ArcanistGoTestResultParser.php index ce6451f5..92a9c9ae 100644 --- a/src/unit/parser/ArcanistGoTestResultParser.php +++ b/src/unit/parser/ArcanistGoTestResultParser.php @@ -68,7 +68,7 @@ final class ArcanistGoTestResultParser extends ArcanistTestResultParser { if (strncmp($line, 'ok', 2) === 0) { $meta = array(); preg_match( - '/^ok[\s\t]+(?P\w.*)[\s\t]+(?P