-
Notifications
You must be signed in to change notification settings - Fork 14
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
Conversation
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. |
cms-bot internal usage |
please test |
test parameters:
|
please test lets run tests with few packages checked out |
-1 Failed Tests: Build BuildI found compilation warning when building: See details on the summary page. |
I think the warning about possibly uninitialised memory are unrelated to these changes ?
and
|
@fwyzard , looks like some other issue. Normal PR tests build.log looks like this where you can find multiple |
please test lets rerun the tests |
-1 Failed Tests: Build BuildI found compilation warning when building: See details on the summary page. |
No idea why [a]
|
SCRAM/GMake/Makefile.rules
Outdated
@@ -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) |
There was a problem hiding this comment.
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
Ah... I'll try with >> .
|
6c44011
to
316db38
Compare
Pull request #98 was updated. |
please test |
+1 Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-10f3ab/36648/summary.html Comparison SummarySummary:
|
@@ -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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :-)
There was a problem hiding this comment.
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.
+externals |
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) |
When the output is not a terminal (e.g. a file or a pipe), the output is unchanged:
![image](https://private-user-images.githubusercontent.com/4069793/292210589-81375db9-84c5-4467-bbf6-0a81ac765fab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTk5OTEsIm5iZiI6MTczODg5OTY5MSwicGF0aCI6Ii80MDY5NzkzLzI5MjIxMDU4OS04MTM3NWRiOS04NGM1LTQ0NjctYmJmNi0wYTgxYWM3NjVmYWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDM0MTMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjVhZDA0MzBhM2Q1MDY2MGFhNjg3NjI3NzFjMjY0MTU0ZmQ0NzUzNWE5ZGM4Y2E5MzMwNDgxMTBmMjcwMzU3YyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.F0Cm9TCIzWmu_pzwxJSgQJ9RBamY6leMm_-uDYo5zVI)
When the output is a terminal, the "Pass", "Fail" and "Skip" messages are coloured:
![image](https://private-user-images.githubusercontent.com/4069793/292210435-462ef628-126e-44de-b433-e01e2d88a37c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTk5OTEsIm5iZiI6MTczODg5OTY5MSwicGF0aCI6Ii80MDY5NzkzLzI5MjIxMDQzNS00NjJlZjYyOC0xMjZlLTQ0ZGUtYjQzMy1lMDFlMmQ4OGEzN2MucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDM0MTMxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YTU5NzI1NjhkYjcyODJhODIwNDg5YzNmZWRlMTc3YzdlOTA1NmNiYjU4MjFhYWJhOGQyZGNjNGU5MjZkMWE1MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.0_wanopPPZU7ZL9S4ek9uuSh7-7mKyNVIe07UjfW9Ak)