colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
103 stars 46 forks source link

Stop using 'echo' in shell test #534

Closed cottsay closed 1 year ago

cottsay commented 1 year ago

On Linux, 'echo' is an executable. On Windows, 'echo' is a shell command. Even if we enable the shell while executing this test, the command acts differently on Windows and it is difficult to get it to print newlines as is required by this test.

In any case, we can just use the python executable to print the text instead, which is obviously available during testing.

I'm guessing that this isn't breaking in our windows CI because one of the tools installed in the Windows agents is providing the 'echo' binary on PATH. I found this bug while bootstrapping colcon in a minimal Windows environment.

codecov[bot] commented 1 year ago

Codecov Report

Base: 81.49% // Head: 81.49% // No change to project coverage :thumbsup:

Coverage data is based on head (f3e8058) compared to base (84fc2d8). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #534 +/- ## ======================================= Coverage 81.49% 81.49% ======================================= Files 58 58 Lines 3377 3377 Branches 656 656 ======================================= Hits 2752 2752 Misses 579 579 Partials 46 46 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=colcon). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=colcon)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.