From 8085ab61216125bd08dd0b16f7750c4036c485fc Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Fri, 15 Sep 2023 10:24:17 +0800 Subject: [PATCH] use full file path as db name (#194) Signed-off-by: Richard Chien --- sqllogictest-bin/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sqllogictest-bin/src/main.rs b/sqllogictest-bin/src/main.rs index 2cbbfa1..afa4a9f 100644 --- a/sqllogictest-bin/src/main.rs +++ b/sqllogictest-bin/src/main.rs @@ -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));