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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 tests fail on Windows with GIX_TEST_IGNORE_ARCHIVES=1 #1358

Open
EliahKagan opened this issue May 7, 2024 · 0 comments
Open

16 tests fail on Windows with GIX_TEST_IGNORE_ARCHIVES=1 #1358

EliahKagan opened this issue May 7, 2024 · 0 comments
Labels
acknowledged an issue is accepted as shortcoming to be fixed C-Windows Windows-specific issues help wanted Extra attention is needed

Comments

@EliahKagan
Copy link
Contributor

EliahKagan commented May 7, 2024

Current behavior 馃槸

Running tests on Windows in a Git Bash environment (similar to the environment in which they run in Windows on CI, where bash is Git Bash), all tests are able to pass normally. However, this apparently relies on the use of generated archives.

When the tests are run with the environment variable GIX_TEST_IGNORE_ARCHIVES set to 1 rather than unset, 16 tests fail. The failing tests, as quoted from the end of the test run, are:

     Summary [ 875.860s] 2244 tests run: 2228 passed (30 slow, 17 leaky), 16 failed, 9 skipped
        FAIL [   8.804s] gix-glob::glob pattern::matching::compare_baseline_with_ours
        FAIL [   3.411s] gix-pathspec::pathspec parse::baseline
        FAIL [   0.015s] gix-pathspec::pathspec parse::valid::glob_negations_are_always_literal
        FAIL [   0.017s] gix-pathspec::pathspec parse::valid::whitespace_in_pathspec
        FAIL [   2.050s] gix-pathspec::pathspec search::files
        FAIL [   4.685s] gix-pathspec::pathspec search::prefixes_are_always_case_sensitive
        FAIL [ 180.967s] gix-ref-tests::refs packed::iter::performance
        FAIL [   5.502s] gix-submodule::submodule file::baseline::common_values_and_names_by_path
        FAIL [  25.197s] gix-submodule::submodule file::is_active_platform::pathspecs_matter_even_if_they_do_not_match
        FAIL [  17.391s] gix-submodule::submodule file::is_active_platform::submodules_with_active_config_are_considered_active_or_inactive
        FAIL [  11.325s] gix-submodule::submodule file::is_active_platform::submodules_with_active_config_override_pathspecs
        FAIL [  31.321s] gix-submodule::submodule file::is_active_platform::without_any_additional_settings_all_are_inactive_if_they_have_a_url
        FAIL [  37.674s] gix-submodule::submodule file::is_active_platform::without_submodule_in_index
        FAIL [  37.356s] gix::gix object::tree::diff::track_rewrites::copies_in_entire_tree_by_similarity_with_limit
        FAIL [   0.271s] gix::gix revision::spec::from_bytes::regex::find_youngest_matching_commit::regex_matches
        FAIL [   0.143s] gix::gix revision::spec::from_bytes::regex::with_known_revision::contained_string_matches_in_unanchored_regex_and_disambiguates_automatically
error: test run failed

The full output is available in this gist. It is similar, and affects the same tests, as in an older run shown in this other older gist, which was referenced in a discussion of these failures in the comments in #1345.

(As noted in comments there, the failure in compare_baseline_with_ours seems particularly interesting, since it involves an unexpected effect of .gitignore pattern matching that is different on Windows.)

Expected behavior 馃

All tests should pass, even when suppressing the use of generated archives by setting GIX_TEST_IGNORE_ARCHIVES=1. Differences between Windows and other platforms should be accounted for when intentional and desirable, or fixed otherwise.

Git behavior

Not fully applicable, since this is about a failure of multiple gitoxide tests when run in a certain way.

However, some discrepancies--intended or unintended--between gitoxide and Git may turn out to be related to some of the failures. So this section may be expanded in the future, or perhaps new issues will be split out from this one.

Steps to reproduce 馃暪

Clone the gitoxide repository on Windows. I used the current tip of the main branch, which at this time is 048e43e.

Run rustup update, and also ensure installed versions of crates that provide custom cargo commands are up to date (for example, by running cargo install-update -a). In particular, ensure the cargo-nextest crate is installed and up to date.

Optionally verify that the tests all pass when GIX_TEST_IGNORE_ARCHIVES is not set. This is beneficial because it checks that all needed dependencies are installed and working. To run the tests that way, run:

cargo nextest run --all --no-fail-fast

Then, in Git Bash, run:

GIX_TEST_IGNORE_ARCHIVES=1 cargo nextest run --all --no-fail-fast

The reason the tests must be run in Git Bash is that there is a separate issue where many test failures occur when they are run from a typical PowerShell environment.

Observe the failures, comparing the output to this gist.

@EliahKagan EliahKagan changed the title 14 tests fail on Windows with GIX_TEST_IGNORE_ARCHIVES=1 16 tests fail on Windows with GIX_TEST_IGNORE_ARCHIVES=1 May 7, 2024
@Byron Byron added help wanted Extra attention is needed acknowledged an issue is accepted as shortcoming to be fixed C-Windows Windows-specific issues labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged an issue is accepted as shortcoming to be fixed C-Windows Windows-specific issues help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants