Formats output of Solana's cargo test-bpf/test-sbf command

Related tags

Cryptography solfmt
Overview

solfmt

Formats output of Solana's cargo test-bpf/test-sbf command.

fmt-logs

Installation

cargo install solfmt

Usage

  1. Run the your test command as usual (cargo test-sbf -- --test-threads=1)
  2. Pipe stderr into stdout (2>&1)
  3. Pipe the result to solfmt (| sofmt)
cargo test-sbf -- --test-threads=1 2>&1 | solfmt
  1. Enjoy more readable logs

Preserving Colorful Build Output

Since we're piping the output of cargo test-sbf into solfmt it doesn't print in colors by default.

We can fix that by setting the CARGO_TERM_COLOR env var appropriately.

CARGO_TERM_COLOR=always cargo test-sbf -- --nocapture --test-threads=1 2>&1 | solfmt

Since this is a lot to type you should add a reusable function to your bashrc.

The below defined in my dotfiles allows to focus on a simple test as well by providing it as an argument.

function cg-tsbf() {
  clear; 
  CARGO_TERM_COLOR=always cargo test-sbf $1 -- --nocapture --test-threads=1 2>&1 | solfmt
}

LICENSE

MIT

You might also like...
Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

Fast way to test a Substrate Runtime via RPC (eg. PolkadotJS UI).

runstrate Fast way to test a Substrate Runtime via RPC (eg. PolkadotJS UI). Build & Run git clone https://github.com/arturgontijo/runstrate cd runstra

Cardano Command Line Interface (CLI) (Deprecated)

Deprecated Note: This repository implements supports for Cardano Byron, and will not be updated to works on Cardano Shelley and further. cardano-cli T

Trustworthy encrypted command line authenticator app compatible with multiple backups.
Trustworthy encrypted command line authenticator app compatible with multiple backups.

cotp - command line totp authenticator I believe that security is of paramount importance, especially in this digital world. I created cotp because I

Rust command line program for Bitcoin brainwallet

brainwallet Rust command line program for Bitcoin brainwallet as implemented at https://www.bitaddress.org. To run it, first install Rust, e.g. from h

The rust implementation of the Defluencer command line interface.

Defluencer CLI IPFS daemon must be running before using the CLI. Command: ipfs daemon --enable-pubsub-experiment --enable-namesys-pubsub For more info

A command-line tool to export FoundationDB stored protocol buffers to ClickhouseDB

fdb-ch-proto-export A command-line tool to export FoundationDB stored Protocol buffers to ClickhouseDB. Installation N/A Usage fdb-ch [command] fdb-c

Easily and securely share files from the command line. A fully featured Firefox Send client.

Notice: the default Send host is provided by @timvisee (info). Please consider to donate and help keep it running. ffsend Easily and securely share fi

The fallen leaves tell a story... of a colorful file tree visualizer for the command-line.
The fallen leaves tell a story... of a colorful file tree visualizer for the command-line.

Erdtree A bLazInGlY fAsT, simplified version of the ancient tree command which displays a colorful depth indented listing of files with their memory s

Comments
  • chore: improve signer privilege escalated case handling

    chore: improve signer privilege escalated case handling

    Log signer privilege escalated has no program log source which wasn't handled properly before.

    The regex was updated to handle that case as well as log this particular message in bold, meaning it is high importance, to make it stand out from the medium importance lines.

    The previously high importance logs are not very high.

    opened by thlorenz 0
Owner
Thorsten Lorenz
Open sourcerer with focus on TypeScript/JavaScript, Rust and Flutter/Dart. Thanks for your support! 🙏 ❤️
Thorsten Lorenz
A cryptographically verifiable code review system for the cargo (Rust) package manager.

A cryptographically verifiable code review system for the cargo (Rust) package manager.

crev - Code REView system 1.8k Jan 2, 2023
✈️A private, authenticated, permissioned cargo registry

chartered a little dig at creating a private cargo repository with authenticated downloads, the plan is to have git connect to a git server we setup t

Jordan Doyle 121 Dec 26, 2022
Audit Cargo.lock files for dependencies with security vulnerabilities

RustSec Crates ?? ??️ ?? The RustSec Advisory Database is a repository of security advisories filed against Rust crates published via crates.io. The a

RustSec 1.2k Dec 30, 2022
A cargo subcommand for displaying when Rust dependencies are out of date

cargo-outdated Linux: A cargo subcommand for displaying when Rust dependencies are out of date About cargo-outdated is for displaying when dependencie

Kevin K. 911 Dec 30, 2022
A minimal esp-hal application template for use with cargo-generate

{{ project-name }} A minimalist template for use with cargo-generate to create no_std applications targeting Espressif's line of SoCs and modules. At

esp-rs 35 Dec 29, 2022
cargo-generate template for Criterion benchmarks

Criterion Benchmark Template This is a cargo-generate template for quickly creating benchmarks using the Criterion benchmarking framework. Usage $ car

Lily Mara 4 Jan 19, 2023
A simple test on interacting between languages with JS and Rust.

NODE-JS-RUST-FFI A simple test on interacting between languages with JS and Rust. How to run Requirements nodejs rustc + cargo Compile First compile t

Eder Lima 3 Aug 25, 2022
An API and test-app that exposes zcash functionality for app consumption

Zingolib This repo provides both a library for zingoproxyclient and zingo-mobile, as well as an included cli application to interact with zcashd via l

ZingoLabs 5 Dec 15, 2022
Parser and test runner for testing compatable common Ethereum full node tests against Polygon Zero's EVM.

EVM Test Parses and runs compatible common Ethereum tests from ethereum/tests against Polygon Zero's EVM. Note: This repo is currently very early in d

Mir Protocol 3 Nov 4, 2022
Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.

stress4844 Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844 blobs. ca

Paradigm 50 Jan 4, 2023