Skip to content

Commit

Permalink
Fix simtest (MystenLabs#4688)
Browse files Browse the repository at this point in the history
* Automate using a local mysten-sim checkout via LOCAL_MSIM_PATH

* Update mysten-sim pointer
  • Loading branch information
mystenmark authored Sep 16, 2022
1 parent 68140e8 commit 658e140
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/sui-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ syn = "1"
workspace-hack = { path = "../workspace-hack"}

[target.'cfg(msim)'.dependencies]
msim-macros = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "979cac9493d71aa14310c16f10230a4ea6b819b1", package = "msim-macros" }
msim-macros = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "e0355e2836fd3a6df7952b6aaca2c178d6055197", package = "msim-macros" }
2 changes: 1 addition & 1 deletion crates/sui-simulator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ edition = "2021"
workspace-hack = { path = "../workspace-hack"}

[target.'cfg(msim)'.dependencies]
msim = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "979cac9493d71aa14310c16f10230a4ea6b819b1", package = "msim" }
msim = { git = "https://github.com/MystenLabs/mysten-sim.git", rev = "e0355e2836fd3a6df7952b6aaca2c178d6055197", package = "msim" }
20 changes: 18 additions & 2 deletions scripts/simtest/cargo-simtest
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ else
echo "Using MSIM_TEST_SEED=$MSIM_TEST_SEED from the environment"
fi

cargo_patch_args=(
--config 'patch.crates-io.hyper.git = "https://github.com/mystenmark/hyper-madsim-fork.git"'
--config 'patch.crates-io.hyper.rev = "2b2eca1e983376294c84c93385ebe848ccf9a99f"'
)

if [ -n "$LOCAL_MSIM_PATH" ]; then
cargo_patch_args+=(
--config "patch.crates-io.tokio.path = \"$LOCAL_MSIM_PATH/msim-tokio\""
--config "patch.'https://github.com/MystenLabs/mysten-sim'.msim.path = \"$LOCAL_MSIM_PATH/msim\""
)
else
cargo_patch_args+=(
--config 'patch.crates-io.tokio.git = "https://github.com/MystenLabs/mysten-sim.git"'
--config 'patch.crates-io.tokio.rev = "e0355e2836fd3a6df7952b6aaca2c178d6055197"'
)
fi

CARGO_COMMAND=(nextest run --cargo-profile simulator)
if [ "$1" = "build" ]; then
shift
Expand All @@ -51,8 +68,7 @@ fi

cargo ${CARGO_COMMAND[@]} \
--config 'build.rustflags = ["--cfg", "msim"]' \
--config 'patch.crates-io.tokio.git = "https://github.com/MystenLabs/mysten-sim.git"' \
--config 'patch.crates-io.tokio.rev = "979cac9493d71aa14310c16f10230a4ea6b819b1"' \
"${cargo_patch_args[@]}" \
--config 'patch.crates-io.hyper.git = "https://github.com/mystenmark/hyper-madsim-fork.git"' \
--config 'patch.crates-io.hyper.rev = "2b2eca1e983376294c84c93385ebe848ccf9a99f"' \
"$@"
Expand Down

0 comments on commit 658e140

Please sign in to comment.