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

run MG tests from new repo #1428

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

plebhash
Copy link
Collaborator

@plebhash plebhash commented Jan 31, 2025

part of #1387, more specifically #1387 (comment)

most adaptations consisted of:

  • execution of llvm-cov was completely removed
  • relative paths had to be fixed

note: during #1298 we forgot to delete one MG test, so I'm doing it here

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.99%. Comparing base (f7b068a) to head (839241b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1428      +/-   ##
==========================================
+ Coverage   19.34%   19.99%   +0.64%     
==========================================
  Files         144      137       -7     
  Lines       10963    10608     -355     
==========================================
  Hits         2121     2121              
+ Misses       8842     8487     -355     
Flag Coverage Δ
binary_codec_sv2-coverage 0.00% <ø> (ø)
binary_serde_sv2-coverage 3.57% <ø> (ø)
binary_sv2-coverage 5.36% <ø> (ø)
bip32_derivation-coverage 0.00% <ø> (ø)
buffer_sv2-coverage 38.01% <ø> (+12.98%) ⬆️
codec_sv2-coverage 0.01% <ø> (ø)
common_messages_sv2-coverage 0.13% <ø> (ø)
const_sv2-coverage 0.00% <ø> (ø)
error_handling-coverage 0.00% <ø> (ø)
framing_sv2-coverage 0.28% <ø> (ø)
jd_client-coverage 0.42% <ø> (ø)
jd_server-coverage 9.02% <ø> (ø)
job_declaration_sv2-coverage 0.00% <ø> (ø)
key-utils-coverage 3.63% <ø> (+1.23%) ⬆️
mining-coverage 2.43% <ø> (ø)
mining_device-coverage 0.00% <ø> (ø)
mining_proxy_sv2-coverage 0.82% <ø> (ø)
noise_sv2-coverage 4.46% <ø> (ø)
protocols 24.81% <ø> (ø)
roles 6.43% <ø> (ø)
roles_logic_sv2-coverage 9.08% <ø> (ø)
sv2_ffi-coverage 0.00% <ø> (ø)
template_distribution_sv2-coverage 0.00% <ø> (ø)
translator_sv2-coverage 9.53% <ø> (ø)
utils 36.58% <ø> (+11.45%) ⬆️
v1-coverage 2.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plebhash plebhash force-pushed the mg-tests-from-new-repo branch 4 times, most recently from 9094877 to 7cf0cec Compare February 4, 2025 18:01
Copy link
Contributor

@Shourya742 Shourya742 left a comment

Choose a reason for hiding this comment

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

LGTM, minor nits, we also an INTEROPERABILITY-TESTS.md, should we modify this in the same PR?

@@ -9,7 +9,7 @@
"frame_builders": [
{
"type": "automatic",
"message_id": "test/message-generator/messages/common_messages.json::setup_connection_job_declarator_with_no_async_flag"
"message_id": "../../test/message-generator/messages/common_messages.json::setup_connection_job_declarator_with_no_async_flag"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need to change the relative path... to me it looks like we are still doing the same stuff, only extra step added is cloning the message generator.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I understand the confusion, but unfortunately there's no easy answer for this.

it all started from the fact that most tests launch roles via cargo llvm-cov, which:

  • has no proper documentation on why or how it's used
  • breaks the paths when we use MG from the new repo

the best solution I could come up with was:

  • replace cargo llvm-cov with cargo run
  • adjust some relative paths on the JSON files

that allowed all tests to continue their execution in the same way as before

utils/Cargo.toml Outdated Show resolved Hide resolved
.gitignore Show resolved Hide resolved
@plebhash plebhash force-pushed the mg-tests-from-new-repo branch 3 times, most recently from 6f91825 to 956fd31 Compare February 7, 2025 22:07
@plebhash
Copy link
Collaborator Author

plebhash commented Feb 7, 2025

we also an INTEROPERABILITY-TESTS.md, should we modify this in the same PR?

that's a good catch, thanks for pointing it out

I rebased the new repo to make sure this file is not removed from the git history there:
https://github.com/stratum-mining/stratum-message-generator/blob/main/INTEROPERABILITY-TESTS.md

also rebasing here to make sure we delete it from this repo

@plebhash plebhash force-pushed the mg-tests-from-new-repo branch from 956fd31 to 839241b Compare February 7, 2025 22:08
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.

2 participants