# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # 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. # Test suite for Panda. # Targets for running separate suites: add_custom_target(cts-assembly COMMENT "Running compliance tests for Panda Assembly") add_custom_target(regression COMMENT "Running panda compiler regression tests") add_custom_target(cts-aot-tests COMMENT "Running panda aot tests") add_custom_target(cts-jit-tests COMMENT "Running panda jit-enforce tests") add_custom_target(irtoc-interpreter-tests COMMENT "Running irtoc interpreter tests") add_custom_target(irtoc-opcode-suite COMMENT "Running irtoc interpreter opcode test suite") add_dependencies(tests irtoc-interpreter-tests) add_dependencies(irtoc-interpreter-tests irtoc-opcode-suite) # TODO(maksenov): disable tests subdirectory for Windows build to remove this condition if(NOT PANDA_TARGET_AMD64 OR PANDA_TARGET_WINDOWS) add_dependencies(tests cts-assembly regression) add_subdirectory(cts-coverage-tool) else() add_custom_target(verifier-tests COMMENT "Regression tests for verifier") add_dependencies(tests cts-assembly regression cts-generator-build verifier-tests) add_subdirectory(cts-coverage-tool) add_subdirectory(cts-generator) endif() if (PANDA_TARGET_ARM64) add_custom_target(ecmascript-tests COMMENT "Compiler tests for ECMAScript") add_dependencies(tests ecmascript-tests) endif() if(PANDA_COMPILER_ENABLE) add_subdirectory(checked) add_dependencies(tests checked_tests) endif() # Add a single test run to the build tree. # # Usage: # # panda_add_test_run( # FILE # TARGET # [SUBDIR ] # [EXPECTED_STDOUT ] # [SEARCH_DEBUG_STDERR ] # [DEPENDS ...] # [RUNTIME_OPTIONS