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

Infer test group name directly from test file path #3418

Merged
merged 10 commits into from
May 3, 2024
  •  
  •  
  •  
1 change: 0 additions & 1 deletion extension/duckdb/test/test_files/duckdb.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DuckDBExtension
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion extension/httpfs/test/test_files/http.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP HTTPFS
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion extension/httpfs/test/test_files/s3_download.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP S3
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion extension/httpfs/test/test_files/s3_glob.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP S3
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion extension/httpfs/test/test_files/s3_upload.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP S3
-DATASET CSV ldbc-sf01

--
Expand Down
1 change: 0 additions & 1 deletion extension/postgres/test/test_files/postgres.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP PostgresExtension
-DATASET CSV empty

--
Expand Down
6 changes: 3 additions & 3 deletions test/include/test_runner/test_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace testing {
enum class TokenType {
// header
DATASET,
GROUP,
SKIP,
SKIP_MUSL,
SKIP_32BIT,
Expand Down Expand Up @@ -47,8 +46,8 @@ enum class TokenType {
REMOVE_FILE
};

const std::unordered_map<std::string, TokenType> tokenMap = {{"-GROUP", TokenType::GROUP},
{"-DATASET", TokenType::DATASET}, {"-CASE", TokenType::CASE}, {"-COMMIT", TokenType::COMMIT},
const std::unordered_map<std::string, TokenType> tokenMap = {{"-DATASET", TokenType::DATASET},
{"-CASE", TokenType::CASE}, {"-COMMIT", TokenType::COMMIT},
{"-CHECK_ORDER", TokenType::CHECK_ORDER}, {"-ENCODED_JOIN", TokenType::ENCODED_JOIN},
{"-LOG", TokenType::LOG}, {"-DEFINE_STATEMENT_BLOCK", TokenType::DEFINE_STATEMENT_BLOCK},
{"-ENUMERATE", TokenType::ENUMERATE}, {"-PARALLELISM", TokenType::PARALLELISM},
Expand Down Expand Up @@ -92,6 +91,7 @@ class TestParser {

void openFile();
void tokenize();
void genGroupName();
void parseHeader();
void parseBody();
void extractExpectedResult(TestStatement* statement);
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/abs.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Abs
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/add.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Add
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/divide.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Divide
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/modulo.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Modulo
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/multiply.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Multiply
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/negate.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Negate
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/arithmetic/subtract.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Subtract
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/arrayimplicitcasting.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP ArrayImplicitCast
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/columnname.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP ColumnName
-DATASET CSV demo-db/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/comment.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CommentTests
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/todatecast.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP ToDateCast
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/types/interval.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP IntervalTests
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/types/null.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP IntervalTests
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/common/types/type_alias.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP Types
-DATASET CSV EMPTY

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_dates.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP TinySnbCopyDateTest
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_dos_style_newline.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyNodeFromCSVTest
-DATASET CSV copy-dos-style-newline

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_edge_case.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyEdgeCaseTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_init_rel_tables.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyNodeInitRelTablesTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_interval.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP TinySnbCopyIntervalTest
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_large_list.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP ReadLargeListTest
-DATASET CSV read-list-tests/large-list

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_large_serial.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyLargeSerialTest
-DATASET CSV large-serial
--

Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_lists.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP TinySnbListTest
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_long_string.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyLongStringTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_long_string_multiple_files.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyLongStringMultipleFilesTest
-DATASET CSV long-string-multiple-files

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_multiple_files.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyMultipleFilesTest
-DATASET CSV copy-multiple-files-test

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_node_csv.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyNodeFromCSVTest
-DATASET CSV copy-test/node/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_node_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyNodeFromParquetTest
-DATASET PARQUET copy-test/node/parquet

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_npy_large.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyThreeDimensionalNpyTest
-DATASET NPY npy-20k

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_npy_one_dimensional.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyOneDimensionalNpyTest
-DATASET NPY npy-1d

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_npy_three_dimensional.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyThreeDimensionalNpyTest
-DATASET NPY npy-3d

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_npy_two_dimensional.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyTwoDimensionalNpyTest
-DATASET NPY npy-2d

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_over_large_string.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyOverLargeStrings
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_partial_column.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyPartialColumnsTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_pk_basic.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyPKBasics
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_pk_long_string.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP LongStringPKTest
-DATASET CSV long-string-pk-tests

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_pk_long_string_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP LongStringPKTest
-DATASET PARQUET CSV_TO_PARQUET(long-string-pk-tests)

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_pk_serial.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopySerialPKTest
-DATASET CSV tinysnb-serial

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_rdf.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyRDFTest
-DATASET CSV copy-test/rdf
-BUFFER_POOL_SIZE 536870912

Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_snap_amazon0601_csv.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP COPY_SNAP
-DATASET CSV snap/amazon0601/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_snap_amazon0601_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP COPY_SNAP
-DATASET CSV snap/amazon0601/parquet

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_snap_twitter_csv.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP COPY_SNAP
-DATASET CSV snap/twitter/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_snap_twitter_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP COPY_SNAP
-DATASET CSV snap/twitter/parquet

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_special_char.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopySpecialChar
-DATASET CSV copy-special-char-test

## TODO(Ziyi): Duckdb's seems only allow escape character to be followed by quote or escape
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_timestamp.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP TinySnbTimestampTest
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_to_big_results.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyToBigResults
-DATASET CSV copy-test/node/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_to_csv.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyToCSV
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_to_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyToParquet
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/copy_transaction.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP TinySnbCopyCSVTransactionTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/export_import_db.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP TinySnbExportDB
-DATASET CSV demo-db/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/copy/multi_copy_node.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP MultiCopyNode
-DATASET CSV empty
--

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CSV
-DATASET CSV csv-edge-case-tests

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/csv/errors.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CSV
-DATASET CSV empty

--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CSV
-DATASET CSV empty

--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CSV
-DATASET CSV csv-multiline-quote-tests

--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CSV
-DATASET CSV empty

--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# These test are translated from SQLLogicTest.
# They are part of the CypherLogicTest project.
-GROUP CypherLogicTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/ddl/ddl.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DDL
-DATASET CSV tinysnb
--

Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBTest
-DATASET CSV demo-db/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db_create.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBCreateTest
-DATASET CSV demo-db/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db_delete.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBDeleteTest
-DATASET CSV demo-db/csv
--

Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db_order.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBTest
-DATASET CSV demo-db/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db_order_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBTest
-DATASET PARQUET demo-db/parquet

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db_parquet.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBTest
-DATASET PARQUET demo-db/parquet

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/demo_db/demo_db_set_copy.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP DemoDBSetAndCopyTest
-DATASET CSV demo-db/csv

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/exceptions/binder/binder_error.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP BinderErrorTest
-DATASET CSV tinysnb

--
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP EmptyDBBinderErrorTest
-DATASET CSV empty

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/exceptions/catalog/catalog.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CatalogErrorTest
-DATASET CSV tinysnb

--
Expand Down
1 change: 0 additions & 1 deletion test/test_files/exceptions/copy/auto_commit.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-GROUP CopyAutoCommit
-DATASET CSV empty

--
Expand Down
Loading
Loading