mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
[GH-ISSUE #138] cargo test fails
#58
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KSXGitHub on GitHub (Mar 23, 2021).
Original GitHub issue: https://github.com/bootandy/dust/issues/138
I cloned this repo to my machine and run
cargo test, it gives the following errors:Commit:
1b3d0b2724.OS: Arch Linux
Rust: 1.50.0
Is
cargo testthe correct way to testdust? If not, then it should be documented.@bootandy commented on GitHub (Mar 27, 2021):
cargo test should work. The build last ran on CI on Jan 16.
I'll try running it on my local machine and see what happens.
It's the integration tests that are failing. Do you have any environment variables tweaking the width of your terminal?
Perhaps it is this issue: https://github.com/bootandy/dust/issues/132
Can you share your $TERM environment variable?
@KSXGitHub commented on GitHub (Mar 27, 2021):
xterm-256color.
I don't think there is.
I ran
cargo teston a maximized Tilix windows.@ibotty commented on GitHub (Jun 17, 2021):
The tests also fail on my system in tmux in gnome-terminal (
TERM=screen-256color) as well as on gnome-terminal alone (TERM=xterm-256color).It also happens with 80x24-sized terminal (
tput cols= 80).@baile320 commented on GitHub (Jul 8, 2021):
Not sure if this helps, and I can't test on windows or mac, but I'm testing on Manjaro and getting these results:
"output":
"main_output()":
so it seems like the output i'm getting is actually similar to the the #[cfg(target_os = "macos")] fn main_output().
I also checked out and ran
cargo teston commit id1b3d0b2(2021-01-16) ande15cf0c(2020-11-25) and the tests still failed... mysterious!@bootandy commented on GitHub (Jul 9, 2021):
That's interesting - thanks.
I need to rethink how the integration tests are done as they clearly cause problems.
@alerque commented on GitHub (Aug 5, 2021):
I just tried adding a
check()function to the Arch Linux packaging and it fell pretty flat, failing 6 out of 9 tests. I'll be keeping that out of the packaging until this gets sorted out so that the tests are expected to be passing on different platforms.cc @grawlinson
@bootandy commented on GitHub (Aug 5, 2021):
This might well be down to the filesystem type.
I am using
ext4What filesystem is this failing on ?
Can someone with a machine that has test failures tell me what there filesystem is
( For example run:
sudo file -sL /dev/nv*andsudo file -sL /dev/sd*)@alerque commented on GitHub (Aug 5, 2021):
BTRFS for me.
@KSXGitHub commented on GitHub (Aug 5, 2021):
@bootandy I recently added integration tests to
pdu. I do not compare the CLI's output to a constant string, instead, I compare it against library's output (pduis both a binary crate and a library crate). To test the graph itself, I construct fake filesystem tree and compare its graph against a constant string. You may want to do something similar to this.@bootandy commented on GitHub (Aug 5, 2021):
Does this branch result in the tests passing?
https://github.com/bootandy/dust/compare/fix_tests
Thanks,
@alerque commented on GitHub (Aug 5, 2021):
No, but it is a lot closer! In my case it brings the test score up from "3 passed, 6 failed" to "8 passed 1 failed".
The straggler is:
@bootandy commented on GitHub (Aug 6, 2021):
Thanks for the suggestion, but I think I'd rather keep the tests running against a real filesystem. I know this gives more failures but it makes the tests more realistic.
@bootandy commented on GitHub (Aug 6, 2021):
I've now merged a fix that hopefully will stop the tests failing .
@alerque commented on GitHub (Aug 6, 2021):
I can confirm the master branch HEAD currently passes tests for me on the same system setup I was using earlier.