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

replace usages of 'wc' in test scripts with simpler ways #81791

Open
fogti opened this issue Feb 5, 2021 · 0 comments
Open

replace usages of 'wc' in test scripts with simpler ways #81791

fogti opened this issue Feb 5, 2021 · 0 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@fogti
Copy link
Contributor

fogti commented Feb 5, 2021

if [ "$$(wc -c $(TMPDIR)/out.log | cut -d' ' -f 1)" = "0" ]; then \

see also: #53642 (comment)
As noted above, the snip [ $(wc -c file | cut -d' ' -f1) == 0 ] should be replaced with ! [ -s file ] which should make such scripts more portable.
other locations of this are easily found with: https://github.com/rust-lang/rust/search?q=wc (only the = "0" or -eq 0 or such usages are interesting)

@nagisa nagisa added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc and removed T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 5, 2021
@Enselic Enselic added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

3 participants