From aab14af64f44a2ca2a41bc50cf25946abf025e06 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 21 Apr 2020 17:16:19 -0700 Subject: [PATCH] /benchmark/sqllogictest_tester/run_tester.sh: Iterating on dir parsing --- benchmark/sqllogictest_tester/run_tester.sh | 55 +++++++++++++++------ 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/benchmark/sqllogictest_tester/run_tester.sh b/benchmark/sqllogictest_tester/run_tester.sh index ae182d4fad..a39b2071b0 100755 --- a/benchmark/sqllogictest_tester/run_tester.sh +++ b/benchmark/sqllogictest_tester/run_tester.sh @@ -52,7 +52,20 @@ function setup_testing_dir() { IFS=', ' read -r -a test_list <<< "$TEST_FILE_DIR_LIST" for fd in "${test_list[@]}" do + dir=$(dirname "$fd") + + echo "This is the dirname:" + echo "$dir" + + mkdir -p "$TMP_TESTING_DIR"/"$dir" + + echo "created dir:" + echo "$TMP_TESTING_DIR"/"$dir" + cp -r "$sqllogictest_checkout"/test/"$fd" "$TMP_TESTING_DIR"/"$fd" + + echo "copied file:" + ls "$TMP_TESTING_DIR"/"$dir" done echo "Files/Directories that will be tested:" @@ -84,6 +97,7 @@ function with_dolt_commit() { echo "Finished installing dolt from $commit_hash:" export PATH="$base_dir/.ci_bin/$commit_hash":$old_path dolt version + echo Using current path: "$PATH" } function with_dolt_checkout() { @@ -100,6 +114,7 @@ function with_dolt_checkout() { echo "Finished installing dolt from checkout:" export PATH="$base_dir/.ci_bin":$old_path dolt version + echo Using current path: "$PATH" } function import_parsed() { @@ -119,20 +134,33 @@ function import_parsed() { } function import_and_query_db() { + rm -f query_db + touch query_db + sqlite3 query_db < "$logictest"/regressions.sql + local commit_hash="$1" - local db_copy="$dsp_dir/query_db_$commit_hash" +# local db_copy="$dsp_dir/query_db_$commit_hash" local release_csv="$TMP_CSV_DIR/release_results.csv" local commiter_csv="$TMP_CSV_DIR/${commit_hash}_results.csv" - echo "$commiter_csv" - cp "$dsp_dir"/query_db "$db_copy" - sqlite3 "$db_copy" <