13af6ab5fSopenharmony_ci# Copyright (c) 2021-2024 Huawei Device Co., Ltd. 23af6ab5fSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 33af6ab5fSopenharmony_ci# you may not use this file except in compliance with the License. 43af6ab5fSopenharmony_ci# You may obtain a copy of the License at 53af6ab5fSopenharmony_ci# 63af6ab5fSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 73af6ab5fSopenharmony_ci# 83af6ab5fSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 93af6ab5fSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 103af6ab5fSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 113af6ab5fSopenharmony_ci# See the License for the specific language governing permissions and 123af6ab5fSopenharmony_ci# limitations under the License. 133af6ab5fSopenharmony_ci 143af6ab5fSopenharmony_ci# target to test compilation issue on arm32 platforms 153af6ab5fSopenharmony_ci# see issue https://gitee.com/openharmony-sig/arkcompiler_ets_frontend/issues/I84VFY 163af6ab5fSopenharmony_ciif (PANDA_TARGET_ARM32) 173af6ab5fSopenharmony_ci add_custom_target(ets_tests_arm32_punctuator_any_equal 183af6ab5fSopenharmony_ci COMMAND ${PANDA_ROOT}/tests/tests-u-runner/runner.sh 193af6ab5fSopenharmony_ci --build-dir ${PANDA_BINARY_ROOT} 203af6ab5fSopenharmony_ci --arm32-qemu 213af6ab5fSopenharmony_ci --ets-runtime 223af6ab5fSopenharmony_ci --test-file PunctuatorAnyEqual.sts 233af6ab5fSopenharmony_ci ) 243af6ab5fSopenharmony_ciendif() 253af6ab5fSopenharmony_ci 263af6ab5fSopenharmony_ci# ignore ARM32 because some files (not gnueabi or gnueabihf) are incompatible with 32x processors 273af6ab5fSopenharmony_ci# this will be fixed in the future 283af6ab5fSopenharmony_ciif(PANDA_TARGET_ARM32 OR PANDA_ARM64_TESTS_WITH_SANITIZER) 293af6ab5fSopenharmony_ci return() 303af6ab5fSopenharmony_ciendif() 313af6ab5fSopenharmony_ci 323af6ab5fSopenharmony_ciadd_custom_target(es2panda_tests COMMENT "Running es2panda test suites") 333af6ab5fSopenharmony_ci 343af6ab5fSopenharmony_cifunction(ets2panda_add_gtest TARGET) 353af6ab5fSopenharmony_ci # Parse arguments 363af6ab5fSopenharmony_ci cmake_parse_arguments( 373af6ab5fSopenharmony_ci ARG 383af6ab5fSopenharmony_ci "" 393af6ab5fSopenharmony_ci "" 403af6ab5fSopenharmony_ci "CPP_SOURCES" 413af6ab5fSopenharmony_ci ${ARGN} 423af6ab5fSopenharmony_ci ) 433af6ab5fSopenharmony_ci 443af6ab5fSopenharmony_ci MESSAGE(${TARGET}) 453af6ab5fSopenharmony_ci 463af6ab5fSopenharmony_ci panda_add_gtest( 473af6ab5fSopenharmony_ci NAME ${TARGET} 483af6ab5fSopenharmony_ci SOURCES 493af6ab5fSopenharmony_ci ${ARG_CPP_SOURCES} 503af6ab5fSopenharmony_ci LIBRARIES 513af6ab5fSopenharmony_ci es2panda-public 523af6ab5fSopenharmony_ci es2panda-lib 533af6ab5fSopenharmony_ci arkassembler 543af6ab5fSopenharmony_ci arkbytecodeopt 553af6ab5fSopenharmony_ci INCLUDE_DIRS 563af6ab5fSopenharmony_ci ${ES2PANDA_PATH} 573af6ab5fSopenharmony_ci ${ES2PANDA_BINARY_ROOT} 583af6ab5fSopenharmony_ci SANITIZERS 593af6ab5fSopenharmony_ci ${PANDA_SANITIZERS_LIST} 603af6ab5fSopenharmony_ci ) 613af6ab5fSopenharmony_ciendfunction(ets2panda_add_gtest) 623af6ab5fSopenharmony_ci 633af6ab5fSopenharmony_ci 643af6ab5fSopenharmony_ciif(PANDA_WITH_ETS) 653af6ab5fSopenharmony_ci if (NOT (PANDA_ENABLE_ADDRESS_SANITIZER OR PANDA_ENABLE_THREAD_SANITIZER) OR 663af6ab5fSopenharmony_ci NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR 673af6ab5fSopenharmony_ci PANDA_CI_TESTING_MODE STREQUAL "Nightly") 683af6ab5fSopenharmony_ci set(PANDA_REGRESSION_TESTS 1) 693af6ab5fSopenharmony_ci endif() 703af6ab5fSopenharmony_ciendif() 713af6ab5fSopenharmony_ci 723af6ab5fSopenharmony_ciadd_subdirectory(tsconfig) 733af6ab5fSopenharmony_ciadd_subdirectory(options) 743af6ab5fSopenharmony_ciadd_subdirectory(unit) 75