2019-05-29 15:42:46 +00:00
|
|
|
# Copyright (c) 2019 Google LLC
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
if (${SPIRV_BUILD_FUZZER})
|
|
|
|
|
|
|
|
set(SOURCES
|
|
|
|
fuzz_test_util.h
|
|
|
|
|
2020-09-01 11:23:58 +00:00
|
|
|
call_graph_test.cpp
|
2020-09-15 09:31:01 +00:00
|
|
|
comparator_deep_blocks_first_test.cpp
|
2019-11-07 16:19:06 +00:00
|
|
|
data_synonym_transformation_test.cpp
|
2019-10-25 11:46:52 +00:00
|
|
|
equivalence_relation_test.cpp
|
2019-06-11 14:56:08 +00:00
|
|
|
fact_manager_test.cpp
|
2019-05-29 15:42:46 +00:00
|
|
|
fuzz_test_util.cpp
|
2020-08-27 14:59:54 +00:00
|
|
|
fuzzer_pass_add_opphi_synonyms_test.cpp
|
2020-04-02 17:33:19 +00:00
|
|
|
fuzzer_pass_construct_composites_test.cpp
|
2020-01-07 08:39:55 +00:00
|
|
|
fuzzer_pass_donate_modules_test.cpp
|
2020-08-06 11:29:26 +00:00
|
|
|
fuzzer_pass_outline_functions_test.cpp
|
2019-10-22 17:05:35 +00:00
|
|
|
instruction_descriptor_test.cpp
|
2020-09-15 22:35:42 +00:00
|
|
|
fuzzer_pass_test.cpp
|
2020-07-15 11:13:23 +00:00
|
|
|
replayer_test.cpp
|
2020-02-11 23:10:57 +00:00
|
|
|
transformation_access_chain_test.cpp
|
2020-09-15 22:36:23 +00:00
|
|
|
transformation_add_bit_instruction_synonym_test.cpp
|
2019-06-04 13:55:00 +00:00
|
|
|
transformation_add_constant_boolean_test.cpp
|
2019-12-16 23:54:13 +00:00
|
|
|
transformation_add_constant_composite_test.cpp
|
2020-04-02 18:25:30 +00:00
|
|
|
transformation_add_constant_null_test.cpp
|
2019-06-04 13:55:00 +00:00
|
|
|
transformation_add_constant_scalar_test.cpp
|
2020-06-30 20:13:05 +00:00
|
|
|
transformation_add_copy_memory_test.cpp
|
2020-01-13 22:04:01 +00:00
|
|
|
transformation_add_dead_block_test.cpp
|
2019-06-05 07:02:16 +00:00
|
|
|
transformation_add_dead_break_test.cpp
|
2019-07-25 12:50:33 +00:00
|
|
|
transformation_add_dead_continue_test.cpp
|
2020-01-07 08:39:55 +00:00
|
|
|
transformation_add_function_test.cpp
|
2019-12-16 23:54:13 +00:00
|
|
|
transformation_add_global_undef_test.cpp
|
|
|
|
transformation_add_global_variable_test.cpp
|
2020-07-08 16:07:04 +00:00
|
|
|
transformation_add_image_sample_unused_components_test.cpp
|
2020-02-05 21:07:44 +00:00
|
|
|
transformation_add_local_variable_test.cpp
|
2020-07-30 19:18:19 +00:00
|
|
|
transformation_add_loop_preheader_test.cpp
|
2020-09-23 13:10:02 +00:00
|
|
|
transformation_add_loop_to_create_int_constant_synonym_test.cpp
|
2019-10-11 08:15:47 +00:00
|
|
|
transformation_add_no_contraction_decoration_test.cpp
|
2020-08-27 14:59:54 +00:00
|
|
|
transformation_add_opphi_synonym_test.cpp
|
2020-06-30 14:20:27 +00:00
|
|
|
transformation_add_parameter_test.cpp
|
2020-07-20 12:13:07 +00:00
|
|
|
transformation_add_relaxed_decoration_test.cpp
|
2020-07-12 08:59:08 +00:00
|
|
|
transformation_add_synonym_test.cpp
|
2019-12-16 23:54:13 +00:00
|
|
|
transformation_add_type_array_test.cpp
|
2019-06-04 13:55:00 +00:00
|
|
|
transformation_add_type_boolean_test.cpp
|
|
|
|
transformation_add_type_float_test.cpp
|
2019-12-16 23:54:13 +00:00
|
|
|
transformation_add_type_function_test.cpp
|
2019-06-04 13:55:00 +00:00
|
|
|
transformation_add_type_int_test.cpp
|
2019-12-16 23:54:13 +00:00
|
|
|
transformation_add_type_matrix_test.cpp
|
2019-06-18 17:41:08 +00:00
|
|
|
transformation_add_type_pointer_test.cpp
|
2019-12-16 23:54:13 +00:00
|
|
|
transformation_add_type_struct_test.cpp
|
|
|
|
transformation_add_type_vector_test.cpp
|
2020-05-14 10:38:34 +00:00
|
|
|
transformation_adjust_branch_weights_test.cpp
|
2019-10-27 18:11:07 +00:00
|
|
|
transformation_composite_construct_test.cpp
|
2019-10-28 09:33:08 +00:00
|
|
|
transformation_composite_extract_test.cpp
|
2020-08-19 12:56:03 +00:00
|
|
|
transformation_composite_insert_test.cpp
|
2020-04-20 18:02:49 +00:00
|
|
|
transformation_compute_data_synonym_fact_closure_test.cpp
|
2020-09-11 10:48:19 +00:00
|
|
|
transformation_duplicate_region_with_selection_test.cpp
|
2020-03-04 14:54:08 +00:00
|
|
|
transformation_equation_instruction_test.cpp
|
2020-09-15 09:31:01 +00:00
|
|
|
transformation_flatten_conditional_branch_test.cpp
|
2020-02-10 23:22:34 +00:00
|
|
|
transformation_function_call_test.cpp
|
2020-08-25 16:28:23 +00:00
|
|
|
transformation_inline_function_test.cpp
|
2020-07-03 16:37:32 +00:00
|
|
|
transformation_invert_comparison_operator_test.cpp
|
2020-02-06 16:54:34 +00:00
|
|
|
transformation_load_test.cpp
|
2020-08-06 14:50:18 +00:00
|
|
|
transformation_make_vector_operation_dynamic_test.cpp
|
2019-12-12 15:27:40 +00:00
|
|
|
transformation_merge_blocks_test.cpp
|
2019-05-31 08:59:06 +00:00
|
|
|
transformation_move_block_down_test.cpp
|
2020-08-03 15:45:24 +00:00
|
|
|
transformation_move_instruction_down_test.cpp
|
2020-09-01 11:45:13 +00:00
|
|
|
transformation_mutate_pointer_test.cpp
|
2019-12-10 14:47:42 +00:00
|
|
|
transformation_outline_function_test.cpp
|
2020-03-08 14:27:05 +00:00
|
|
|
transformation_permute_function_parameters_test.cpp
|
2020-06-23 14:00:28 +00:00
|
|
|
transformation_permute_phi_operands_test.cpp
|
2020-08-11 09:24:32 +00:00
|
|
|
transformation_propagate_instruction_up_test.cpp
|
2020-05-29 15:43:38 +00:00
|
|
|
transformation_push_id_through_variable_test.cpp
|
2020-08-06 16:30:34 +00:00
|
|
|
transformation_replace_add_sub_mul_with_carrying_extended_test.cpp
|
2019-06-06 21:22:35 +00:00
|
|
|
transformation_replace_boolean_constant_with_constant_binary_test.cpp
|
2020-07-23 07:17:45 +00:00
|
|
|
transformation_replace_copy_object_with_store_load_test.cpp
|
2019-06-18 17:41:08 +00:00
|
|
|
transformation_replace_constant_with_uniform_test.cpp
|
2020-07-23 14:14:20 +00:00
|
|
|
transformation_replace_copy_memory_with_load_store_test.cpp
|
2019-11-07 16:19:06 +00:00
|
|
|
transformation_replace_id_with_synonym_test.cpp
|
2020-09-01 15:28:04 +00:00
|
|
|
transformation_replace_irrelevant_id_test.cpp
|
2020-06-16 10:20:51 +00:00
|
|
|
transformation_replace_linear_algebra_instruction_test.cpp
|
2020-07-27 14:17:04 +00:00
|
|
|
transformation_replace_load_store_with_copy_memory_test.cpp
|
2020-09-02 00:06:38 +00:00
|
|
|
transformation_replace_opphi_id_from_dead_predecessor_test.cpp
|
2020-09-03 09:19:02 +00:00
|
|
|
transformation_replace_opselect_with_conditional_branch_test.cpp
|
2020-08-06 16:30:34 +00:00
|
|
|
transformation_replace_parameter_with_global_test.cpp
|
2020-07-21 20:02:32 +00:00
|
|
|
transformation_replace_params_with_struct_test.cpp
|
2019-10-11 06:10:47 +00:00
|
|
|
transformation_set_function_control_test.cpp
|
2019-10-10 12:34:38 +00:00
|
|
|
transformation_set_loop_control_test.cpp
|
2019-10-22 17:05:35 +00:00
|
|
|
transformation_set_memory_operands_mask_test.cpp
|
2019-10-08 10:25:34 +00:00
|
|
|
transformation_set_selection_control_test.cpp
|
2019-06-19 19:45:14 +00:00
|
|
|
transformation_split_block_test.cpp
|
2020-02-06 16:54:34 +00:00
|
|
|
transformation_store_test.cpp
|
2020-03-05 08:18:39 +00:00
|
|
|
transformation_swap_commutable_operands_test.cpp
|
2020-06-19 15:38:52 +00:00
|
|
|
transformation_swap_conditional_branch_operands_test.cpp
|
2020-03-08 22:33:24 +00:00
|
|
|
transformation_toggle_access_chain_instruction_test.cpp
|
2020-07-10 13:02:14 +00:00
|
|
|
transformation_record_synonymous_constants_test.cpp
|
2019-11-06 17:11:54 +00:00
|
|
|
transformation_vector_shuffle_test.cpp
|
2020-10-01 08:54:10 +00:00
|
|
|
transformation_wrap_region_in_selection_test.cpp
|
2019-06-19 19:45:14 +00:00
|
|
|
uniform_buffer_element_descriptor_test.cpp)
|
2019-05-29 15:42:46 +00:00
|
|
|
|
2019-09-20 08:43:26 +00:00
|
|
|
if (${SPIRV_ENABLE_LONG_FUZZER_TESTS})
|
|
|
|
# These are long-running tests that depend on random seeds. We do not want
|
|
|
|
# to run them during regular whole-project CI because they may reveal
|
|
|
|
# spirv-fuzz bugs in changes that are totally unrelated to spirv-fuzz,
|
|
|
|
# which would be counfounding. Instead, they should be run regularly but
|
|
|
|
# separately.
|
2019-09-20 14:23:25 +00:00
|
|
|
set(SOURCES ${SOURCES}
|
2019-09-20 08:43:26 +00:00
|
|
|
fuzzer_replayer_test.cpp
|
|
|
|
fuzzer_shrinker_test.cpp)
|
|
|
|
endif()
|
|
|
|
|
2019-05-29 15:42:46 +00:00
|
|
|
add_spvtools_unittest(TARGET fuzz
|
|
|
|
SRCS ${SOURCES}
|
|
|
|
LIBS SPIRV-Tools-fuzz
|
|
|
|
)
|
|
|
|
endif()
|