Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the Pass/Fail/Skip messages in color if the output is a terminal #98

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Dec 21, 2023

When the output is not a terminal (e.g. a file or a pipe), the output is unchanged:
image

When the output is a terminal, the "Pass", "Fail" and "Skip" messages are coloured:
image

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @fwyzard (Andrea Bocci) for branch scramv3.

@iarspider, @smuzaffar, @cmsbuild, @aandvalenzuela can you please review it and eventually sign? Thanks.
@rappoccio, @antoniovilela, @sextonkennedy you are the release manager for this.
cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 21, 2023

cms-bot internal usage

@fwyzard
Copy link
Contributor Author

fwyzard commented Dec 21, 2023

please test

@smuzaffar
Copy link
Contributor

test parameters:

  • addpkg = FWCore

@smuzaffar
Copy link
Contributor

please test

lets run tests with few packages checked out

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-10f3ab/36630/summary.html
COMMIT: 6c44011
CMSSW: CMSSW_14_0_X_2023-12-21-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw-config/98/36630/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation warning when building: See details on the summary page.

@fwyzard
Copy link
Contributor Author

fwyzard commented Dec 21, 2023

I think the warning about possibly uninitialised memory are unrelated to these changes ?

/cvmfs/cms-ib.cern.ch/sw/x86_64/nweek-02816/el8_amd64_gcc12/external/boost/1.80.0-9d4e0dc8cf1f8fc8a67cf53ae917955e/include/boost/graph/detail/adj_list_edge_iterator.hpp:80:13: warning: 'MEM[(struct stored_edge_property * const &)&ei + 48]' may be used uninitialized [-Wmaybe-uninitialized]

and

/data/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/el8_amd64_gcc12/external/gcc/12.3.1-40d504be6370b5a30e3947a6e575ca28/include/c++/12.3.1/bits/stl_pair.h:535:11: warning: 'modRow' may be used uninitialized [-Wmaybe-uninitialized]

@smuzaffar
Copy link
Contributor

@fwyzard , looks like some other issue. Normal PR tests build.log looks like this where you can find multiple scram build stages but the build log for this PR looks truncated

@smuzaffar
Copy link
Contributor

please test

lets rerun the tests

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-10f3ab/36638/summary.html
COMMIT: 6c44011
CMSSW: CMSSW_14_0_X_2023-12-21-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw-config/98/36638/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation warning when building: See details on the summary page.

@smuzaffar
Copy link
Contributor

No idea why build.log gets truncated while running https://github.com/cms-sw/cms-bot/blob/master/pr_testing/test_multiple_prs.sh#L1014

[a]

Copying tmp/el8_amd64_gcc12/src/RecoPPS/Local/src/RecoPPSLocal/libRecoPPSLocal.so to productstore area:
Leaving library rule at RecoPPS/Local
>> Leaving Package RecoPPS/Local
>> Package RecoPPS/Local built
>> Subsystem RecoPPS built
gmake[1]: Entering directory '/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_14_0_X_2023-12-21-1100'
tail: build.log: file truncated
>> Entering Package CalibPPS/ESProducers
>> Leaving Package CalibPPS/ESProducers
>> Package CalibPPS/ESProducers built

@@ -19,6 +19,16 @@ TARGETDIR:= $(subst /,_,$(THISDIR))
.DEFAULT_GOAL := all
.PHONY: FORCE_TARGET
##############################################################################
ifeq ($(shell [ -t 1 ] > /proc/$${PPID}/fd/1 && echo terminal || echo pipe),terminal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fwyzard , I think writing to /proc/$${PPID}/fd/1 is causing the log file truncation

@fwyzard
Copy link
Contributor Author

fwyzard commented Dec 21, 2023 via email

@cmsbuild
Copy link
Contributor

Pull request #98 was updated.

@fwyzard
Copy link
Contributor Author

fwyzard commented Dec 21, 2023

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-10f3ab/36648/summary.html
COMMIT: 316db38
CMSSW: CMSSW_14_0_X_2023-12-21-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw-config/98/36648/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

@@ -19,6 +19,16 @@ TARGETDIR:= $(subst /,_,$(THISDIR))
.DEFAULT_GOAL := all
.PHONY: FORCE_TARGET
##############################################################################
ifeq ($(shell [ -t 1 ] >> /proc/$${PPID}/fd/1 && echo terminal || echo pipe),terminal)
Copy link
Contributor

@smuzaffar smuzaffar Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fwyzard , build and tests look good now. By the way, what is the purpose of >> /proc/$${PPID}/fd/1 ?

ifeq ($(shell [ -t 1 ] && echo terminal),terminal)

should work too ... right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore my comment, yes looks like your change does the rigth thing :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trick is to make the shell use the same stdout as the parent process, that is make itself.
Otherwise the check applies to the process spawned by make, which is always attached to a pipe and not to a terminal.

@smuzaffar
Copy link
Contributor

+externals

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next scramv3 IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @rappoccio, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants