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

Add rustic-test-failure to compilation-error-regexp-alist #574

Closed
wants to merge 1 commit into from
Closed

Add rustic-test-failure to compilation-error-regexp-alist #574

wants to merge 1 commit into from

Conversation

neosimsim
Copy link

Add regexp to compilation-error-regexp-alist to match test failures for rustic-cargo-test-mode.
This make test output like

---- fail stdout ----
thread 'fail' panicked at src/main.rs:20:5:
assertion `left == right` failed
  left: 1
 right: 2

navigatable.

Closes #573

@neosimsim
Copy link
Author

Please note that I'm not so sure about the error type / level. Mabe 0 or 1 would be more suitable.

@@ -143,9 +143,23 @@ stored in this variable.")
map)
"Local keymap for `rustic-cargo-test-mode' buffers.")

(defvar rustic-test-failure
(let ((test "---- [^\n]+ ----\nthread [^\n]+ panicked at ")

Choose a reason for hiding this comment

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

I'm not sure about including the initial ---- blah --- bit, because tests that print to stdout will have their output below that but before the panic, e.g.:

---- entity::models::entity::insert_or_update_all_entity_types stdout ----
[lib/rs/spec-test/src/lib.rs:31:9] "TEST_ENVIRONMENT already set" = "TEST_ENVIRONMENT already set"
thread 'module::models::some_model::insert' panicked at lib/rs/lib-data/tests/lib-data-test/entity/models/entity.rs:89:53:
called `Result::unwrap()` on an `Err` value: EntityDbError(SqlxStoreError(Unexpected(Unexpected("failed to deserialize model: invalid type: null, expected string or map"))))

Copy link
Author

Choose a reason for hiding this comment

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

Good point. But I'm not so sure that my approach is correct, anyway. I believe you're right in #573 that rustic-compilation-panic is not correct.

@neosimsim
Copy link
Author

The more I think about it, the more I feel this was the wrong approach and rustic-compilation-panic needs to be fixed. #575

@neosimsim neosimsim closed this Aug 13, 2024
@neosimsim
Copy link
Author

Closed in favor of #575.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compilation-error-regexp does not always match test outputs
2 participants