Skip to content

Commit

Permalink
use another tracing crate for tests. enable --no-capture
Browse files Browse the repository at this point in the history
Signed-off-by: Soc Virnyl Estela <[email protected]>
  • Loading branch information
uncomfyhalomacro committed Nov 2, 2024
1 parent 5c8db7d commit 5111087
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
- name: Tests
run: |
export CC=clang
cargo test
cargo test -- --nocapture
78 changes: 50 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace.package]
authors = ["Soc Virnyl Estela"]
version = "5.1.6"
version = "5.1.7-dev"
edition = "2021"
license = "MPL-2.0"
repository = "https://github.com/openSUSE-Rust/roast"
Expand Down
2 changes: 1 addition & 1 deletion libroast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ rayon = "1.10.0"

[dev-dependencies]
terminfo = "0.9.0"
tracing-test = { version = "0.2", features = ["no-env-filter"] }
test-log = "^0.2"
sha3 = { version = "0.11.0-pre.4" }
hex-literal = "0.4.1"

Expand Down
7 changes: 1 addition & 6 deletions libroast/tests/shame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::{
PathBuf,
},
};
use test_log::test;
#[allow(unused_imports)]
use tracing::{
debug,
Expand All @@ -14,12 +15,10 @@ use tracing::{
warn,
Level,
};
use tracing_test::traced_test;
use walkdir::WalkDir;

const MANIFEST_DIR: &str = std::env!("CARGO_MANIFEST_DIR", "No such manifest dir");

#[traced_test]
#[test]
fn is_gz_tarball() -> io::Result<()>
{
Expand Down Expand Up @@ -51,7 +50,6 @@ fn is_gz_tarball() -> io::Result<()>
Ok(())
}

#[traced_test]
#[test]
fn is_xz_tarball() -> io::Result<()>
{
Expand Down Expand Up @@ -83,7 +81,6 @@ fn is_xz_tarball() -> io::Result<()>
Ok(())
}

#[traced_test]
#[test]
fn is_zst_tarball() -> io::Result<()>
{
Expand Down Expand Up @@ -115,7 +112,6 @@ fn is_zst_tarball() -> io::Result<()>
Ok(())
}

#[traced_test]
#[test]
fn is_bz2_tarball() -> io::Result<()>
{
Expand Down Expand Up @@ -147,7 +143,6 @@ fn is_bz2_tarball() -> io::Result<()>
Ok(())
}

#[traced_test]
#[test]
fn is_vanilla_tarball() -> io::Result<()>
{
Expand Down
2 changes: 1 addition & 1 deletion roast-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tracing = { version = "0.1", features = [
"release_max_level_debug",
] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
libroast = { path = "../libroast", version = "5.1.3-dev" }
libroast = { path = "../libroast", version = "5.1.7-dev" }
walkdir = "2.5.0"
tempfile = "3.12.0"

Expand Down

0 comments on commit 5111087

Please sign in to comment.