Skip to content

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

@fogti

Description

@fogti
Contributor

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)

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
A-testsuiteArea: The testsuite used to check the correctness of rustc
and removed
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
on Feb 5, 2021
added
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.
on Dec 17, 2023
added a commit that references this issue on Mar 4, 2025
f5bc2a9
added a commit that references this issue on Mar 4, 2025
a0e1ffa
added a commit that references this issue on Mar 4, 2025
692c2e8
added 3 commits that reference this issue on Mar 4, 2025
2568493
d15f55a
6dd3260
added a commit that references this issue on Mar 5, 2025
65da1ff
added a commit that references this issue on Mar 5, 2025
fbb6e27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @Enselic@nagisa@fogti

      Issue actions

        replace usages of 'wc' in test scripts with simpler ways · Issue #81791 · rust-lang/rust