Skip to content

Commit

Permalink
Fix collect_steps
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleiserson committed Apr 16, 2024
1 parent 428d1e9 commit 8808dc5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
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

0 comments on commit 8808dc5

Please sign in to comment.