Page MenuHomePhabricator

Arcanist tries to parse phpunit output in the test plan as another test plan field
Closed, DuplicatePublic

Description

Root problem: include a phpunit output in a commit message

Reproduction steps

  1. Create a revision
  1. Add the following text through the web UI to Test plan: field
…
Test plan:
` ` `
$ phpunit
[…]
OK, but incomplete, skipped, or risky tests!
Tests: 181, Assertions: 328, Incomplete: 2.
` ` `
…
  1. Try arc diff.

Expected result

As it's enclosed in ` block, not to be parsed by Arcanist.

Actual result

Arcanist is more than happy to parse it.

[2016-12-31 03:29:41] EXCEPTION: (ArcanistDifferentialCommitMessageParserException) Field "testPlan" occurs twice in commit message! at [<arcanist>/src/differential/ArcanistDifferentialCommitMessage.php:54]
arcanist(head=master, ref.master=c243cbbd9fc7), phutil(head=master, ref.master=5ac2ca121489)
  #0 ArcanistDifferentialCommitMessage::pullDataFromConduit(ConduitClient) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1795]
  #1 ArcanistDiffWorkflow::getCommitMessageFromRevision(string) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:1527]
  #2 ArcanistDiffWorkflow::buildCommitMessage() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:469]
  #3 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

Event Timeline

dereckson updated the task description. (Show Details)Dec 31 2016, 3:29 AM
dereckson updated the task description. (Show Details)
dereckson updated the task description. (Show Details)
dereckson renamed this task from Arcanist tries to parse phpunit output in the test plan as to Arcanist tries to parse phpunit output in the test plan as another test plan field.
chad added a subscriber: chad.Dec 31 2016, 4:27 AM

Expected, though it's going to take me a while to find the dupe.

Maybe similar to T10312 as well... If we see a test plan, skip the next one?