-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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 simtest code coverage without --config flags #16134
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash -e | ||
# Copyright (c) Mysten Labs, Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# verify that git repo is clean | ||
if [[ -n $(git status -s) ]]; then | ||
echo "Working directory is not clean. Please commit all changes before running this script." | ||
exit 1 | ||
fi | ||
|
||
# apply git patch | ||
git apply ./scripts/simtest/config-patch | ||
|
||
MSIM_WATCHDOG_TIMEOUT_MS=60000 MSIM_TEST_SEED=1 cargo llvm-cov --ignore-run-fail --lcov --output-path lcov-simtest.info nextest --cargo-profile simulator | ||
|
||
# remove the patch | ||
git checkout .cargo/config Cargo.toml Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/.cargo/config b/.cargo/config | ||
index 7369a2afce..5254870044 100644 | ||
--- a/.cargo/config | ||
+++ b/.cargo/config | ||
@@ -20,11 +20,11 @@ move-clippy = [ | ||
"-Aclippy::upper_case_acronyms", | ||
"-Aclippy::type_complexity", | ||
# Remove after https://github.com/rust-lang/rust-clippy/pull/11792 is released. | ||
"-Aclippy::map_identity", | ||
"-Aclippy::new_without_default", | ||
"-Aclippy::box_default", | ||
"-Aclippy::manual_slice_size_calculation", | ||
] | ||
|
||
[build] | ||
-rustflags = ["-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"] | ||
+rustflags = ["-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes", "--cfg", "msim"] | ||
diff --git a/Cargo.toml b/Cargo.toml | ||
index 3b1ca4591c..e4ff4d61d2 100644 | ||
--- a/Cargo.toml | ||
+++ b/Cargo.toml | ||
@@ -672,10 +672,14 @@ semver = "1.0.16" | ||
spinners = "4.1.0" | ||
include_dir = "0.7.3" | ||
|
||
|
||
# Using the workspace-hack via this patch directive means that it only applies | ||
# while building within this workspace. If another workspace imports a crate | ||
# from here via a git dependency, it will not have the workspace-hack applied | ||
# to it. | ||
[patch.crates-io.workspace-hack] | ||
path = "crates/workspace-hack" | ||
+ | ||
+[patch.crates-io] | ||
+tokio = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "1a52783d6600ecc22e15253a982f77881bd47c77" } | ||
+futures-timer = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "1a52783d6600ecc22e15253a982f77881bd47c77" } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mystenmark, why do we need this? This workflow is going to be run on
ubuntu-ghcloud
GH runner. So there should never be the case when repo is not cleanThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone could run the script locally (e.g. to test it) and it could clobber local files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mystenmark
Is what I was afraid of when this script gets run. I feel like these are two different cases here