modkit icon indicating copy to clipboard operation
modkit copied to clipboard

methylation_entropy test failure

Open verdurin opened this issue 10 months ago • 6 comments

Hello

I'm updating the build recipe for modkit in EasyBuild, and I see this test error with 0.4.4-rc1:

entropy::methylation_entropy::methylation_entropy_tests::test_alphabet_info - should panic ... FAILED

This is with Rust 1.79.

Here's the full error log from within EasyBuild:


failures:

---- entropy::methylation_entropy::methylation_entropy_tests::test_alphabet_info stdout ----
note: test did not panic as expected

failures:
    entropy::methylation_entropy::methylation_entropy_tests::test_alphabet_info

test result: FAILED. 79 passed; 1 failed; 3 ignored; 0 measured; 0 filtered out; finished in 0.06s

error: test failed, to rerun pass `--lib`
 (at easybuild/tools/run.py:695 in parse_cmd_output)
== 2025-02-24 18:40:58,038 build_log.py:267 INFO ... (took < 1 sec)
== 2025-02-24 18:40:58,040 config.py:707 DEBUG software install path as specified by 'installpath' and 'subdir_software': /apps/eb/el8/upstream/software
== 2025-02-24 18:40:58,040 filetools.py:2025 INFO Removing lock /apps/eb/el8/upstream/software/.locks/_apps_eb_el8_upstream_software_modkit_0.4.4-rc1-GCCcore-12.3.0.lock...
== 2025-02-24 18:40:58,043 filetools.py:385 INFO Path /apps/eb/el8/upstream/software/.locks/_apps_eb_el8_upstream_software_modkit_0.4.4-rc1-GCCcore-12.3.0.lock successfully removed.
== 2025-02-24 18:40:58,043 filetools.py:2029 INFO Lock removed: /apps/eb/el8/upstream/software/.locks/_apps_eb_el8_upstream_software_modkit_0.4.4-rc1-GCCcore-12.3.0.lock
== 2025-02-24 18:40:58,043 easyblock.py:4297 WARNING build failed (first 300 chars): cmd " cargo test --profile=release " exited with exit code 101 and output:
warning: function `check_against_expected_text_file` is never used
   --> tests/common/mod.rs:113:8
    |
113 | pub fn check_against_expected_text_file(output_fp: &str, expected_fp: &str) {
    |        ^^^^^^^^^^^^^^^^^^^^^^

verdurin avatar Feb 24 '25 18:02 verdurin

Hello @verdurin,

You get this failure because that particular test exercises a function with debug_asserts. Typical testing conditions use the dev profile whereas you're using the release profile, which will not trigger the assert. Could you run your tests in the dev profile?

ArtRand avatar Feb 24 '25 23:02 ArtRand

Thanks @ArtRand - there's no way of changing the Cargo test profile in EasyBuild currently, so I've raised an issue for that and may try to fix it myself.

verdurin avatar Feb 25 '25 16:02 verdurin

Hello @verdurin,

If changing the test profile in EasyBuild ends up being a dead end, I can disable the test in the release profile. I do tend to use dev-profile assertions to validate some logic, however. Let me know, I can push a branch if you need something to test.

ArtRand avatar Feb 25 '25 17:02 ArtRand

Such a test branch would be useful, if only because it will take a bit of time to add an extra customisation possibility to the Cargo support in EasyBuild.

verdurin avatar Feb 26 '25 09:02 verdurin

Hello @verdurin,

I've pushed a branch here: https://github.com/nanoporetech/modkit/tree/ar/gh383 and checked that it behaves as expected.

Try it at your convienence.

ArtRand avatar Feb 27 '25 15:02 ArtRand

Hi @ArtRand - thanks, I've just tried with a checkout of that branch and it builds successfully now, including the test step.

verdurin avatar Mar 18 '25 15:03 verdurin