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

Log from cmake/ctest steps isn't fully captured on OsX

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After some updates I've noticed that console isn't showing full log for cmake build and ctest run steps.

      "try {
      ...
      cmakeBuild buildDir: ..., cmakeArgs: cmake_params, generator: 'Xcode', installation: '(default)', sourceDir: source_dir, steps: [[args: '--config '+BuildConfiguration+' -- -j 4 -quiet', withCmake: true]]
      if (RunTests.toBoolean())

      { ctest arguments: '-C '+BuildConfiguration+' --output-on-failure', installation: '(default)', workingDir: ... }

      } finally {
      sh 'umount ${WORKSPACE}/mnt/ThirdParties || true'
      }"

      I'm attaching examples. In one case there were failing unittests, but 'sh' step is shown in the middle of ctest log. In other cases with successful unittests log is missing last steps and some additional info from ctest.

        Attachments

        1. log_race.png
          log_race.png
          8 kB
        2. log_race2.png
          log_race2.png
          6 kB
        3. log_race3.png
          log_race3.png
          5 kB

          Issue Links

            Activity

            nekto Marian Klymov created issue -
            Hide
            15knots Martin Weber added a comment -

            Could it be that ANY output written to STDERR is missing in the logs?

            Show
            15knots Martin Weber added a comment - Could it be that ANY output written to STDERR is missing in the logs?
            Hide
            nekto Marian Klymov added a comment -

            Output isn't fully showing even STDOUT. Maybe it has something to do with https://issues.jenkins-ci.org/browse/JENKINS-32191 ?

             

            Show
            nekto Marian Klymov added a comment - Output isn't fully showing even STDOUT. Maybe it has something to do with https://issues.jenkins-ci.org/browse/JENKINS-32191 ?  
            Hide
            15knots Martin Weber added a comment -

            Thanks for finding a related issue, I myself did not find one.

            The plugin does not do anything special to capture the build output. It just takes a TaskListener and a Launcher from the StepContext and passes the listener to the launcher. The listener is supposed to handle any build output.

            So I think this issue is related to JENKINS-32191, or at least to workflow plugin.

            Please note that JENKINS-32191 has been marked as resolved with <https://issues.jenkins-ci.org/browse/JENKINS-32191?focusedCommentId=350722&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-350722> but the reason to resolve it is just a guess. Have you tried with inserting a 'sleep 3' command into your script as a workaround?

             

            Show
            15knots Martin Weber added a comment - Thanks for finding a related issue, I myself did not find one. The plugin does not do anything special to capture the build output. It just takes a TaskListener and a Launcher from the StepContext and passes the listener to the launcher. The listener is supposed to handle any build output. So I think this issue is related to JENKINS-32191 , or at least to workflow plugin. Please note that JENKINS-32191 has been marked as resolved with < https://issues.jenkins-ci.org/browse/JENKINS-32191?focusedCommentId=350722&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-350722 > but the reason to resolve it is just a guess. Have you tried with inserting a 'sleep 3' command into your script as a workaround?  
            15knots Martin Weber made changes -
            Field Original Value New Value
            Labels cmake log cmake log pipeline
            15knots Martin Weber made changes -
            Link This issue relates to JENKINS-32191 [ JENKINS-32191 ]
            Hide
            nekto Marian Klymov added a comment -

            I've added sleep for 5 seconds in the end after sh 'umount...'

            Now log for ctest step is fully shown.

            But still 'sh' step starts in the middle of ctest output.

             

            Show
            nekto Marian Klymov added a comment - I've added sleep for 5 seconds in the end after sh 'umount...' Now log for ctest step is fully shown. But still 'sh' step starts in the middle of ctest output.  
            Hide
            nekto Marian Klymov added a comment -

            I've tried on another project - sleep hasn't helped there

             

            Show
            nekto Marian Klymov added a comment - I've tried on another project - sleep hasn't helped there  
            15knots Martin Weber made changes -
            Assignee Martin Weber [ 15knots ]
            Hide
            15knots Martin Weber added a comment - - edited

            I tried to reproduce this on a remote Linux agent by generating lots of output.

            Pipeline script:

            node('linux') {
                timestamps {
                    stage('all') {
               echo 'Hello World'
               sh label: 'ls', script: 'ls -lgGR /bin /lib /lib64 /opt /usr'
                    }
                }
            }
            

            Unfortunately, I could not reproduce the issue.

            Could you try to runs the script on an OSX agent to verify whether it is related to cmakebuilder or to pipeline?

            Show
            15knots Martin Weber added a comment - - edited I tried to reproduce this on a remote Linux agent by generating lots of output. Pipeline script: node( 'linux' ) { timestamps { stage( 'all' ) { echo 'Hello World' sh label: 'ls' , script: 'ls -lgGR /bin /lib /lib64 /opt /usr' } } } Unfortunately, I could not reproduce the issue. Could you try to runs the script on an OSX agent to verify whether it is related to cmakebuilder or to pipeline?

              People

              • Assignee:
                Unassigned
                Reporter:
                nekto Marian Klymov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: