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

boards: make: quiet sha256sum from cargo #1991

Merged
merged 1 commit into from Jun 30, 2020
Merged

boards: make: quiet sha256sum from cargo #1991

merged 1 commit into from Jun 30, 2020

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Jun 29, 2020

Pull Request Overview

Return the sha256sum output to how it was without all of the cargo extra text.

Without this PR:

make
   Compiling kernel v0.1.0 (/Users/bradjc/git/tock/kernel)
   Compiling cortexm v0.1.0 (/Users/bradjc/git/tock/arch/cortex-m)
   Compiling capsules v0.1.0 (/Users/bradjc/git/tock/capsules)
   Compiling cortexm4 v0.1.0 (/Users/bradjc/git/tock/arch/cortex-m4)
   Compiling sam4l v0.1.0 (/Users/bradjc/git/tock/chips/sam4l)
   Compiling components v0.1.0 (/Users/bradjc/git/tock/boards/components)
   Compiling hail v0.1.0 (/Users/bradjc/git/tock/boards/hail)
    Finished release [optimized + debuginfo] target(s) in 22.37s
   text	   data	    bss	    dec	    hex	filename
 103936	   3196	  13184	 120316	  1d5fc	/Users/bradjc/git/tock/target/thumbv7em-none-eabi/release/hail
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
     Running `/Users/bradjc/git/tock/tools/sha256sum/target/debug/sha256sum /Users/bradjc/git/tock/target/thumbv7em-none-eabi/release/hail.bin`
83e84b8c50cbd7e97cef162133ad149c62d05fb7ac294df20914cba28fbaa834	/Users/bradjc/git/tock/target/thumbv7em-none-eabi/release/hail.bin

With this PR:

make
   Compiling hail v0.1.0 (/Users/bradjc/git/tock/boards/hail)
    Finished release [optimized + debuginfo] target(s) in 8.05s
   text	   data	    bss	    dec	    hex	filename
 103936	   3196	  13184	 120316	  1d5fc	/Users/bradjc/git/tock/target/thumbv7em-none-eabi/release/hail
83e84b8c50cbd7e97cef162133ad149c62d05fb7ac294df20914cba28fbaa834	/Users/bradjc/git/tock/target/thumbv7em-none-eabi/release/hail.bin

Also add the command to the V=1 printout.

Testing Strategy

Compiling the hail kernel.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

Copy link
Member

@ppannuto ppannuto left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit 185d299 into master Jun 30, 2020
@bors bors bot deleted the sha256sum-quiet branch June 30, 2020 00:57
Copy link
Contributor

@gendx gendx left a comment

Choose a reason for hiding this comment

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

I think this should be revised to use --quiet rather than 2> /dev/null.

@@ -164,7 +164,7 @@ endif
# present, if not use the custom shipped one
ifeq (, $(shell sha256sum --version 2>/dev/null))
# No system sha256sum available
SHA256SUM := $(CARGO) run --manifest-path $(TOCK_ROOT_DIRECTORY)tools/sha256sum/Cargo.toml --
SHA256SUM := $(CARGO) run --manifest-path $(TOCK_ROOT_DIRECTORY)tools/sha256sum/Cargo.toml -- 2>/dev/null
Copy link
Contributor

Choose a reason for hiding this comment

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

I only see this now, but throwing away all of the stderr output is overkill, and makes it harder to debug legitimate errors (i.e. failing to compile the sha256sum tool). Cargo supports a --quiet flag precisely for this use case (not printing the build steps, but still printing errors).

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

Successfully merging this pull request may close these issues.

None yet

4 participants