Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28869

Does not split test files string on newline if input is loaded from properties file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: mstestrunner-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.617
      MsTestRunner 1.1.2
      Environment Injector Plugin 1.91.3
    • Similar Issues:

      Description

      In my setup i extract path to all test projects using powershell.
      i create a string that contains all these paths each separated by a newline " \`n" with a slash '\' to force the filewriting to write the string to read on on newline.
      It does not work using " \`r`n".

      This data is the loaded into the enviroment using the Environment Injector Plugin and checking the EnvVariable it is a string containing newlines.

      The MsTestrunner states that testfiles should be a newline separated list, but only the first entry is separated correct, thus ignoring all other test files.

      The fix.
      Running the replacement macro on the full testfiles string fixes the problem.
      String macroReplacedTestFiles = Util.replaceMacro(testFiles, env);

      A fix has been issued to github as a pull request.

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Thomas Blitz
          Path:
          src/main/java/org/jenkinsci/plugins/MsTestBuilder.java
          http://jenkins-ci.org/commit/mstestrunner-plugin/06846d4c730bbbef37c311340cf0b681171fdd6a
          Log:
          Fix for Jenkins Issue JENKINS-28869

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Thomas Blitz Path: src/main/java/org/jenkinsci/plugins/MsTestBuilder.java http://jenkins-ci.org/commit/mstestrunner-plugin/06846d4c730bbbef37c311340cf0b681171fdd6a Log: Fix for Jenkins Issue JENKINS-28869
          Hide
          ido_ran Ido Ran added a comment -

          Fixed in 1.2.0

          Show
          ido_ran Ido Ran added a comment - Fixed in 1.2.0

            People

            Assignee:
            tlogik Thomas Blitz
            Reporter:
            tlogik Thomas Blitz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: