diff --git a/.circleci/dist_compile.yml b/.circleci/dist_compile.yml index 920d4f5e57987..3b8f088492561 100644 --- a/.circleci/dist_compile.yml +++ b/.circleci/dist_compile.yml @@ -315,7 +315,7 @@ jobs: command: | mkdir -p /tmp/spark_aggregate_fuzzer_repro/ chmod -R 777 /tmp/spark_aggregate_fuzzer_repro - _build/debug/velox/exec/tests/spark_aggregation_fuzzer_test \ + _build/debug/velox/functions/sparksql/fuzzer/spark_aggregation_fuzzer_test \ --seed ${RANDOM} \ --duration_sec 60 \ --logtostderr=1 \ @@ -332,7 +332,7 @@ jobs: mkdir -p /tmp/aggregate_fuzzer_repro/ rm -rfv /tmp/aggregate_fuzzer_repro/* chmod -R 777 /tmp/aggregate_fuzzer_repro - _build/debug/velox/exec/tests/velox_aggregation_fuzzer_test \ + _build/debug/velox/functions/prestosql/fuzzer/velox_aggregation_fuzzer_test \ --seed ${RANDOM} \ --duration_sec 1800 \ --logtostderr=1 \ @@ -503,7 +503,7 @@ jobs: fuzzer_output: "/tmp/spark_aggregate_fuzzer.log" fuzzer_repro: "/tmp/spark_aggregate_fuzzer_repro" fuzzer_name: "SparkAggregate" - fuzzer_exe: "_build/debug/velox/exec/tests/spark_aggregation_fuzzer_test" + fuzzer_exe: "_build/debug/velox/functions/sparksql/fuzzer/spark_aggregation_fuzzer_test" fuzzer_args: " --seed ${RANDOM} --duration_sec 600 --logtostderr=1 --minloglevel=0 \ --repro_persist_path=/tmp/spark_aggregate_fuzzer_repro" @@ -518,7 +518,7 @@ jobs: fuzzer_output: "/tmp/aggregate_fuzzer.log" fuzzer_repro: "/tmp/aggregate_fuzzer_repro" fuzzer_name: "Aggregate" - fuzzer_exe: "_build/debug/velox/exec/tests/velox_aggregation_fuzzer_test" + fuzzer_exe: "_build/debug/velox/functions/prestosql/fuzzer/velox_aggregation_fuzzer_test" fuzzer_args: " --seed ${RANDOM} --duration_sec 3600 --logtostderr=1 --minloglevel=0 \ --repro_persist_path=/tmp/aggregate_fuzzer_repro" diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 2608825568b05..3a8723d5c1058 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -95,13 +95,13 @@ jobs: name: spark path: | velox/_build/debug/velox/expression/tests/spark_expression_fuzzer_test - velox/_build/debug/velox/expression/tests/spark_aggregation_fuzzer_test + velox/_build/debug/velox/functions/sparksql/fuzzer/spark_aggregation_fuzzer_test - name: Upload aggregation fuzzer uses: actions/upload-artifact@v3 with: name: aggregation - path: velox/_build/debug/velox/exec/tests/velox_aggregation_fuzzer_test + path: velox/_build/debug/velox/functions/prestosql/fuzzer/velox_aggregation_fuzzer_test - name: Upload join fuzzer uses: actions/upload-artifact@v3 diff --git a/velox/exec/tests/CMakeLists.txt b/velox/exec/tests/CMakeLists.txt index 0d61c75485bb5..1661a65c0409f 100644 --- a/velox/exec/tests/CMakeLists.txt +++ b/velox/exec/tests/CMakeLists.txt @@ -200,33 +200,7 @@ target_link_libraries( velox_tpch_connector velox_memory) -# Aggregation Fuzzer. -add_executable(velox_aggregation_fuzzer_test AggregationFuzzerTest.cpp) - -target_link_libraries( - velox_aggregation_fuzzer_test - velox_aggregation_fuzzer - velox_aggregation_fuzzer_base - velox_aggregates - velox_window - gtest - gtest_main) - -add_executable(spark_aggregation_fuzzer_test SparkAggregationFuzzerTest.cpp) - -target_link_libraries( - spark_aggregation_fuzzer_test - velox_aggregation_fuzzer - velox_aggregation_fuzzer_base - velox_functions_spark_aggregates - velox_fuzzer_util - velox_window - velox_vector_test_lib - gtest - gtest_main) - # Join Fuzzer. - add_library(velox_join_fuzzer JoinFuzzer.cpp) target_link_libraries(velox_join_fuzzer velox_type velox_vector_fuzzer diff --git a/velox/functions/prestosql/CMakeLists.txt b/velox/functions/prestosql/CMakeLists.txt index 9ea227de4b1cc..d2a17ca1c32ab 100644 --- a/velox/functions/prestosql/CMakeLists.txt +++ b/velox/functions/prestosql/CMakeLists.txt @@ -86,6 +86,7 @@ endif() if(${VELOX_BUILD_TESTING}) add_subdirectory(tests) add_subdirectory(coverage) + add_subdirectory(fuzzer) elseif(${VELOX_BUILD_TEST_UTILS}) add_subdirectory(tests/utils) endif() diff --git a/velox/exec/tests/AggregationFuzzerTest.cpp b/velox/functions/prestosql/fuzzer/AggregationFuzzerTest.cpp similarity index 100% rename from velox/exec/tests/AggregationFuzzerTest.cpp rename to velox/functions/prestosql/fuzzer/AggregationFuzzerTest.cpp diff --git a/velox/functions/prestosql/fuzzer/CMakeLists.txt b/velox/functions/prestosql/fuzzer/CMakeLists.txt new file mode 100644 index 0000000000000..abb95029c2960 --- /dev/null +++ b/velox/functions/prestosql/fuzzer/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_executable(velox_aggregation_fuzzer_test AggregationFuzzerTest.cpp) + +target_link_libraries( + velox_aggregation_fuzzer_test + velox_aggregation_fuzzer + velox_aggregation_fuzzer_base + velox_aggregates + velox_window + gtest + gtest_main) diff --git a/velox/functions/sparksql/CMakeLists.txt b/velox/functions/sparksql/CMakeLists.txt index b14b7b33b3469..0522cbfefab5f 100644 --- a/velox/functions/sparksql/CMakeLists.txt +++ b/velox/functions/sparksql/CMakeLists.txt @@ -62,6 +62,7 @@ endif() if(${VELOX_BUILD_TESTING}) add_subdirectory(tests) add_subdirectory(coverage) + add_subdirectory(fuzzer) endif() if(${VELOX_ENABLE_BENCHMARKS}) diff --git a/velox/functions/sparksql/fuzzer/CMakeLists.txt b/velox/functions/sparksql/fuzzer/CMakeLists.txt new file mode 100644 index 0000000000000..62f8eb1cda8c5 --- /dev/null +++ b/velox/functions/sparksql/fuzzer/CMakeLists.txt @@ -0,0 +1,26 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_executable(spark_aggregation_fuzzer_test SparkAggregationFuzzerTest.cpp) + +target_link_libraries( + spark_aggregation_fuzzer_test + velox_aggregation_fuzzer + velox_aggregation_fuzzer_base + velox_functions_spark_aggregates + velox_fuzzer_util + velox_window + velox_vector_test_lib + gtest + gtest_main) diff --git a/velox/exec/tests/SparkAggregationFuzzerTest.cpp b/velox/functions/sparksql/fuzzer/SparkAggregationFuzzerTest.cpp similarity index 100% rename from velox/exec/tests/SparkAggregationFuzzerTest.cpp rename to velox/functions/sparksql/fuzzer/SparkAggregationFuzzerTest.cpp