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

tremor test: Run single tests without suite. #1283

Merged
merged 5 commits into from
Oct 27, 2021

Conversation

MordecaiMalignatus
Copy link
Contributor

@MordecaiMalignatus MordecaiMalignatus commented Oct 22, 2021

Pull request

Description

Implement the cargo test $PATH_TO_SPECIFIC_TEST functionality for tremor test. That meaning, that a single test can be run, rather than either having to narrow to a single test by tags, or having to run a whole suite when only one result is desired. tremor test bench ./tests/bench/bench_pipe_passthrough only runs that benchmark.

This is currently functional (it runs single tests when specified), but very ugly code that I still need to refactor, and a bunch of the meta work (docs, changelog etc) is not done yet.

Related

Closes #1139.
Docs: tremor-rs/tremor-www#129

Checklist

  • The RFC, if required, has been submitted and approved
  • Any user-facing impact of the changes is reflected in docs.tremor.rs
  • The code is tested
  • Use of unsafe code is reasoned about in a comment
  • Update CHANGELOG.md appropriately, recording any changes, bug fixes, or other observable changes in behavior
  • The performance impact of the change is measured (see below)

Performance

Not applicable, except to speed up single-test runs. No other behaviour is impacted.

@MordecaiMalignatus MordecaiMalignatus changed the title Test single command tremor test: Run single tests without suite. Oct 22, 2021
@Licenser
Copy link
Member

Hi @MordecaiMalignatus awesome thanks! It looks good at a first glance :) but it'll need some clippy love, the expects should become Result's and a DCO signoff is needed :)

@MordecaiMalignatus
Copy link
Contributor Author

MordecaiMalignatus commented Oct 25, 2021 via email

@coveralls
Copy link
Collaborator

coveralls commented Oct 25, 2021

Pull Request Test Coverage Report for Build 1384490644

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.009%) to 87.298%

Files with Coverage Reduction New Missed Lines %
tremor-script/src/ast/eq.rs 1 68.52%
tremor-script/src/ast.rs 1 75.54%
tremor-script/src/ast/visitors.rs 1 74.75%
tremor-script/src/tilde.rs 1 85.88%
Totals Coverage Status
Change from base Build 1380387893: 0.009%
Covered Lines: 18570
Relevant Lines: 21272

💛 - Coveralls

@Licenser
Copy link
Member

DCO signoff is basically a way for a contributor to say "Yes I made this contribution and was allowed to do so" it has to do with a bunch of very boring very legal stuff and lighter weight then a CLA (Contributor Agreement) that people would have to sign (yuck)

https://opensource.com/article/18/3/cla-vs-dco-whats-difference and https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin have some resources for details :)

the dco bot explains how to do it after the fact: https://github.com/tremor-rs/tremor-runtime/pull/1283/checks?check_run_id=3987618586

doing it when committing is basically adding -s (s for signoff)

On the freedom - go nuts as long as it comes out better then it went in we're happy :). This is not on the critical path (read: it doesn't block any other work) so there is no reason to keep a PR small ( aside of personal preference ;) )

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
@MordecaiMalignatus
Copy link
Contributor Author

MordecaiMalignatus commented Oct 26, 2021

Things done:

  • Clippy suggestions were applied (I love clippy so very much)
  • Signoff added
  • Extra refactorings spun out into a future patch, to keep patches small and avoid the "Ah yes several thousand lines diff, LGTM" haze.
  • Expects converted into explicit errors

This is done so far from my side. I'd like to give the testing subcommand/subsystem a bit of love after I've gotten a bit more familiar with it, I think I could make some improvement here :)

@MordecaiMalignatus MordecaiMalignatus marked this pull request as ready for review October 26, 2021 05:49
@MordecaiMalignatus MordecaiMalignatus force-pushed the test-single-command branch 2 times, most recently from 2c0377b to d674ca1 Compare October 26, 2021 06:46
Nobody saw the faulty rebase.

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
@MordecaiMalignatus
Copy link
Contributor Author

I'm not sure how to add automated tests for this patch, it seems rather hard to test. :(

MordecaiMalignatus added a commit to MordecaiMalignatus/tremor-www that referenced this pull request Oct 26, 2021
Concerning the change at tremor-rs/tremor-runtime#1283

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
@mfelsche
Copy link
Member

We don't have tests yet for stuff like this, so i think it is fine to not add one for this PR.

Copy link
Member

@darach darach left a comment

Choose a reason for hiding this comment

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

LGTM. Great work! Thank you for your contribution!

@Licenser Licenser enabled auto-merge (rebase) October 27, 2021 10:52
@Licenser Licenser disabled auto-merge October 27, 2021 10:58
@Licenser Licenser merged commit 671ca26 into tremor-rs:main Oct 27, 2021
Licenser pushed a commit to tremor-rs/tremor-www that referenced this pull request Oct 27, 2021
Concerning the change at tremor-rs/tremor-runtime#1283

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
@MordecaiMalignatus MordecaiMalignatus deleted the test-single-command branch October 27, 2021 12:20
skoech pushed a commit to tremor-rs/tremor-www that referenced this pull request Mar 23, 2022
Concerning the change at tremor-rs/tremor-runtime#1283

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Can't run a single test / bench
5 participants