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

Cargo not running integration tests on cargo test if version number is big, i.e. 5123.0.0 #13895

Open
simple0x47 opened this issue May 9, 2024 · 1 comment
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.

Comments

@simple0x47
Copy link

Problem

I was surprised to find out that the integration tests located within the tests sub-folder were not being executed when the version was as big as specified in the title, but when a 'normal' value was used, everything ran as expected.

Steps

  1. Create a test within tests.
  2. Set the version of the crate to a big number, i.e. 5123.0.0.
  3. Run cargo test.
  4. Observe that the tests within tests do not get executed.

Possible Solution(s)

No response

Notes

It looks like a boundary issues, so the mistake may be on my part for exceeding an existing limit within Cargo's code.

Version

cargo 1.78.0 (54d8815d0 2024-03-26)
release: 1.78.0
commit-hash: 54d8815d04fa3816edc207bbc4dd36bf18014dbc
commit-date: 2024-03-26
host: aarch64-apple-darwin
libgit2: 1.7.2 (sys:0.18.2 vendored)
libcurl: 8.4.0 (sys:0.4.72+curl-8.6.0 system ssl:(SecureTransport) LibreSSL/3.3.6)
ssl: OpenSSL 1.1.1w  11 Sep 2023
os: Mac OS 14.3.1 [64-bit]
@simple0x47 simple0x47 added C-bug Category: bug S-triage Status: This issue is waiting on initial triage. labels May 9, 2024
@weihanglo
Copy link
Member

I cannot reproduce with the following commands:

cargo new foo --lib
cd foo
echo "[package]" > Cargo.toml
echo "name = 'foo'" >> Cargo.toml
echo "version = '5123.0.0'" >> Cargo.toml
mkdir -p tests
touch tests/bar.rs
cargo +stable t

And got this output:

    Creating library `foo` package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
   Compiling foo v5123.0.0 (/home/user/repos/foo)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.28s
     Running unittests src/lib.rs (target/debug/deps/foo-f82fbcf55ac84707)

running 1 test
test tests::it_works ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

     Running tests/bar.rs (target/debug/deps/bar-70708f1a8f83e042)

running 0 tests

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

   Doc-tests foo

running 0 tests

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

Would you mind sharing a minimal reproducible example of it, and also the console output you've got from Cargo that had this issue?

@weihanglo weihanglo added S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request. and removed S-triage Status: This issue is waiting on initial triage. labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-needs-info Status: Needs more info, such as a reproduction or more background for a feature request.
Projects
None yet
Development

No branches or pull requests

2 participants