dmadisetti / steam-tui

Rust TUI client for steamcmd
MIT License
858 stars 17 forks source link

`nix build` fails with 2 test errors #45

Closed zeerooth closed 2 years ago

zeerooth commented 2 years ago

Full log: nix log /nix/store/fmgcz5rhwnvg5svyx9icww1slj34mnzc-steam-tui-dev.drv --extra-experimental-features nix-command

@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/4zpqdkwjwdf1y9rp95kzlnrwllidcxnr-wd2mckabynwimgkqwmkvjkjgg34ha8al-source
source root is wd2mckabynwimgkqwmkvjkjgg34ha8al-source
Executing cargoSetupPostUnpackHook
unpacking source archive /nix/store/w3b82kii9ynw2wmj5p69ksyllvrdrc3g-cargo-vendor-dir
Finished cargoSetupPostUnpackHook
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Executing cargoSetupPostPatchHook
Validating consistency between /build/wd2mckabynwimgkqwmkvjkjgg34ha8al-source//Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
Finished cargoSetupPostPatchHook
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Executing cargoBuildHook
++ env CC_x86_64-unknown-linux-gnu=/nix/store/6mx62f4mdv5y1awi7y2mp23a76gg0ba7-gcc-wrapper-11.3.0/bin/cc CXX_x86_64-unknown-linux-gnu=/nix/store/6mx62f4mdv5y1awi7y2mp23a76gg0ba7-gcc-wrapper-11.3.0/bin/c++ CC_>
   Compiling autocfg v1.1.0
   Compiling libc v0.2.126
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.40
   Compiling once_cell v1.12.0
   Compiling unicode-ident v1.0.1
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling memchr v2.5.0
   Compiling log v0.4.17
   Compiling scopeguard v1.1.0
   Compiling cc v1.0.73
   Compiling futures-core v0.3.21
   Compiling crossbeam-utils v0.8.10
   Compiling bitflags v1.3.2
   Compiling pkg-config v0.3.25
   Compiling pin-project-lite v0.2.9
   Compiling bytes v1.1.0
   Compiling futures-sink v0.3.21
   Compiling itoa v1.0.2
   Compiling serde_derive v1.0.138
   Compiling rayon-core v1.9.3
   Compiling adler v1.0.2
   Compiling smallvec v1.9.0
   Compiling futures-task v0.3.21
   Compiling serde v1.0.138
   Compiling crc32fast v1.3.2
   Compiling fnv v1.0.7
   Compiling adler32 v1.2.0
   Compiling foreign-types-shared v0.1.1
   Compiling openssl v0.10.40
   Compiling parking_lot_core v0.9.3
   Compiling signal-hook v0.3.14
   Compiling futures-util v0.3.21
   Compiling tinyvec_macros v0.1.0
   Compiling futures-channel v0.3.21
   Compiling native-tls v0.2.10
   Compiling matches v0.1.9
   Compiling either v1.7.0
   Compiling httparse v1.7.1
   Compiling slab v0.4.6
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.21
   Compiling hashbrown v0.12.1
   Compiling failure_derive v0.1.8
   Compiling unicode-xid v0.2.3
   Compiling gimli v0.26.1
   Compiling unicode-width v0.1.9
   Compiling percent-encoding v2.1.0
   Compiling weezl v0.1.6
   Compiling try-lock v0.2.3
   Compiling openssl-probe v0.1.5
   Compiling half v1.8.2
   Compiling rustc-demangle v0.1.21
   Compiling numtoa v0.1.0
   Compiling tower-service v0.3.2
   Compiling color_quant v1.1.0
   Compiling unicode-bidi v0.3.8
   Compiling ryu v1.0.10
   Compiling serde_json v1.0.82
   Compiling encoding_rs v0.8.31
   Compiling lebe v0.5.1
   Compiling httpdate v1.0.2
   Compiling bit_field v0.10.1
   Compiling scoped_threadpool v0.1.9
   Compiling cassowary v0.3.0
   Compiling unicode-segmentation v1.9.0
   Compiling byteorder v1.4.3
   Compiling bytemuck v1.10.0
   Compiling lazy_static v1.4.0
   Compiling ipnet v2.5.0
   Compiling regex-syntax v0.6.26
   Compiling mime v0.3.16
   Compiling base64 v0.13.0
   Compiling port_scanner v0.1.5
   Compiling tracing-core v0.1.28
   Compiling thread_local v1.1.4
   Compiling lock_api v0.4.7
   Compiling memoffset v0.6.5
   Compiling crossbeam-epoch v0.9.9
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling indexmap v1.9.1
   Compiling rayon v1.5.3
   Compiling num-iter v0.1.43
   Compiling num-rational v0.4.1
   Compiling miniz_oxide v0.5.3
   Compiling http v0.2.8
   Compiling foreign-types v0.3.2
   Compiling deflate v1.0.0
   Compiling inflate v0.4.5
   Compiling tinyvec v1.6.0
   Compiling getopts v0.2.21
   Compiling form_urlencoded v1.0.1
   Compiling openssl-sys v0.9.74
   Compiling backtrace v0.3.65
   Compiling gif v0.11.4
   Compiling addr2line v0.17.0
   Compiling fuzzy-matcher v0.3.7
   Compiling tracing v0.1.35
   Compiling http-body v0.4.5
   Compiling unicode-normalization v0.1.21
   Compiling want v0.3.0
   Compiling object v0.28.4
   Compiling aho-corasick v0.7.18
   Compiling num_cpus v1.13.1
   Compiling mio v0.8.4
   Compiling socket2 v0.4.4
   Compiling signal-hook-registry v1.4.0
   Compiling getrandom v0.2.7
   Compiling termion v1.5.6
   Compiling dirs-sys-next v0.1.2
   Compiling atty v0.2.14
   Compiling crossbeam-channel v0.5.5
   Compiling flate2 v1.0.24
   Compiling png v0.17.5
   Compiling threadpool v1.8.1
   Compiling idna v0.2.3
   Compiling tokio v1.19.2
   Compiling regex v1.5.6
   Compiling nanorand v0.7.0
   Compiling dirs-next v2.0.0
   Compiling pretty-bytes v0.2.2
   Compiling spin v0.9.3
   Compiling parking_lot v0.12.1
   Compiling url v2.2.2
   Compiling signal-hook-mio v0.2.3
   Compiling shellexpand v2.1.0
   Compiling crossbeam-deque v0.8.1
   Compiling tokio-util v0.7.3
   Compiling crossterm v0.23.2
   Compiling synstructure v0.12.6
   Compiling h2 v0.3.13
   Compiling openssl-macros v0.1.0
   Compiling pin-project-internal v1.0.11
   Compiling hyper v0.14.19
   Compiling jpeg-decoder v0.2.6
   Compiling failure v0.1.8
   Compiling tiff v0.7.2
   Compiling pin-project v1.0.11
   Compiling flume v0.10.13
   Compiling tokio-native-tls v0.3.0
   Compiling exr v1.4.2
   Compiling hyper-tls v0.5.0
   Compiling tui v0.18.0
   Compiling serde_urlencoded v0.7.1
   Compiling image v0.24.2
   Compiling reqwest v0.11.11
   Compiling tui-image-rgba-updated v0.2.2
   Compiling steam-tui v0.2.1 (/build/wd2mckabynwimgkqwmkvjkjgg34ha8al-source)
    Finished release [optimized] target(s) in 1m 55s
Executing cargoInstallPostBuildHook
Finished cargoInstallPostBuildHook
Finished cargoBuildHook
buildPhase completed in 1 minutes 55 seconds
@nix { "action": "setPhase", "phase": "checkPhase" }
running tests
Executing cargoCheckHook
++ cargo test -j 8 --release --target x86_64-unknown-linux-gnu --frozen -- --test-threads=8
   Compiling steam-tui v0.2.1 (/build/wd2mckabynwimgkqwmkvjkjgg34ha8al-source)
    Finished release [optimized] target(s) in 3.91s
     Running unittests src/lib.rs (target/x86_64-unknown-linux-gnu/release/deps/steam_tui-b76d212d596bab28)

running 9 tests
test util::parser::tests::test_parse_data ... ok
test util::parser::tests::test_parse_update ... ok
test util::parser::tests::test_parse_update_basic ... ok
test client::tests::test_implicit_line_ending ... FAILED
test client::tests::test_polluted_data ... FAILED
test util::parser::tests::test_parse_update_fail ... ok
test util::parser::tests::test_parse_update_continue ... ok
test util::parser::tests::test_parse_update_sucess ... ok
test client::tests::test_blank_login ... ok

failures:

---- client::tests::test_implicit_line_ending stdout ----
thread 'client::tests::test_implicit_line_ending' panicked at 'Channel dies: RecvError', src/client.rs:584:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- client::tests::test_polluted_data stdout ----
thread 'client::tests::test_polluted_data' panicked at 'Channel dies: RecvError', src/client.rs:569:14

failures:
    client::tests::test_implicit_line_ending
    client::tests::test_polluted_data

test result: FAILED. 7 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

error: test failed, to rerun pass '--lib'

cargo test on the same installation works without problems

dmadisetti commented 2 years ago

Yeah, I've noticed this too, thanks for opening the issue. Not sure what's up- I primarily use nix for nix develop- but it would be nice to have this as a functioning flake

dmadisetti commented 2 years ago

steamcmd has FHS assumptions and is not pure. Fought with it a little, but easier just to disable the failing tests.

Fixed by https://github.com/dmadisetti/steam-tui/commit/a648d3a5a4d3def8b3ef190a7fb9fab31ed969b5

zeerooth commented 2 years ago

Even though it's not the purest solution, I can confirm it works now, thanks!