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

clamav: Fix check failure of clamscan no tests #326533

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

KoviRobi
Copy link
Contributor

Clamav wasn't building due to failing tests.

It seems like clamav uses pytest as a test runner preferentially, then falls back to unittest. For some reason unittest isn't discovering the tests inside clamav/unit_test/clamscan, and instead exitting with sys.exit(_NO_TESTS_EXITCODE).

I have checked actual clamscan tests are being run using nix develop .#clamscan, genericBuild, checkPhase then manually running ctest -V.

Fixes #325510

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

It seems like clamav uses `pytest` as a test runner preferentially, then
falls back to `unittest`. For some reason `unittest` isn't discovering
the tests inside clamav/unit_test/clamscan, and instead exitting with
`sys.exit(_NO_TESTS_EXITCODE)`.

I have checked actual `clamscan` tests are being run using
`nix develop .#clamscan`, `genericBuild`, `checkPhase` then manually
running `ctest -V`.

Fixes NixOS#325510
@khaneliman
Copy link
Contributor

Result of nixpkgs-review pr 326533 run on x86_64-linux 1

3 packages built:
  • clamav
  • clamtk
  • clamtk.man

Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for figuring that out!

KoviRobi pushed a commit to KoviRobi/nixos-config that referenced this pull request Jul 13, 2024
Flake lock file updates:

• Updated input 'NixOS-WSL':
    'github:nix-community/NixOS-WSL/269411cfed6aab694e46f719277c972de96177bb' (2024-06-24)
  → 'github:nix-community/NixOS-WSL/30ebd0beb2ed26e09bcd245d757504029f807cce' (2024-07-08)
• Updated input 'home-manager':
    'github:nix-community/home-manager/58268b4d7745f6747be18033e6f10011466ce8d4' (2024-07-03)
  → 'github:nix-community/home-manager/90ae324e2c56af10f20549ab72014804a3064c7f' (2024-07-11)
• Updated input 'nix-index-database':
    'github:nix-community/nix-index-database/2917972ed34ce292309b3a4976286f8b5c08db27' (2024-07-01)
  → 'github:nix-community/nix-index-database/685e40e1348007d2cf76747a201bab43d86b38cb' (2024-07-07)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/0aeab749216e4c073cece5d34bc01b79e717c3e0' (2024-07-02)
  → 'github:KoviRobi/nixpkgs/3cd585c4caade13403f9dc8d0ec8ca0d85a4b63c' (2024-07-12)

The latter is 16e401f01842c5bb2499e78c1fe227f939c0c474 with
NixOS/nixpkgs#326533 picked on top
@khaneliman khaneliman requested review from drupol and wegank July 15, 2024 15:37
@drupol drupol merged commit a996966 into NixOS:master Jul 15, 2024
29 of 30 checks passed
@KoviRobi KoviRobi deleted the clamav-fix-clamscan-no-tests branch July 15, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: clamav
5 participants