Skip to content

Commit

Permalink
use full file path as db name (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <[email protected]>
  • Loading branch information
stdrc authored Sep 15, 2023
1 parent 9772a35 commit 8085ab6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sqllogictest-bin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,9 @@ async fn run_parallel(
let mut create_databases = BTreeMap::new();
for file in files {
let db_name = file
.file_name()
.ok_or_else(|| anyhow!("not a valid filename"))?
.to_str()
.ok_or_else(|| anyhow!("not a UTF-8 filename"))?;
let db_name = db_name.replace([' ', '.', '-'], "_");
let db_name = db_name.replace([' ', '.', '-', '/'], "_");
eprintln!("+ Discovered Test: {db_name}");
if create_databases.insert(db_name.to_string(), file).is_some() {
return Err(anyhow!("duplicated file name found: {}", db_name));
Expand Down

0 comments on commit 8085ab6

Please sign in to comment.