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

Fix collect_steps #1011

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ipa-core/benches/oneshot/ipa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async fn run(args: Args) -> Result<(), Error> {

let seed = args.random_seed.unwrap_or_else(|| random());
tracing::info!(
"Using random seed: {seed} for {q} records",
"Using random seed {seed} for {q} records",
q = args.query_size
);
let rng = StdRng::seed_from_u64(seed);
Expand Down
4 changes: 3 additions & 1 deletion ipa-core/src/test_fixture/world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ impl<S: ShardingScheme> TestWorld<S> {
#[must_use]
pub fn with_config(config: &TestWorldConfig) -> Self {
logging::setup();
println!("Using seed {seed}", seed = config.seed);
// Print to stdout so that it appears in test runs only on failure.
// scripts/collect_steps.py must be updated if the message text changes.
println!("TestWorld random seed {seed}", seed = config.seed);

let shard_count = ShardIndex::try_from(S::SHARDS).unwrap();
let shard_network = InMemoryShardNetwork::with_shards(shard_count);
Expand Down
3 changes: 3 additions & 0 deletions scripts/collect_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ def collect_steps(args):
if not line or line == "":
break

if line.startswith("TestWorld random seed "):
continue

if not line.startswith(ROOT_STEP_PREFIX):
print("Unexpected line: " + line, flush=True)
exit(1)
Expand Down