diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2eeb7bddc775df605990708174c87ad6c0092923..c2577c38732ea44688602cb36386c59ac4e869ad 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -40,6 +40,32 @@ if (PANDA_TARGET_ARM64) add_dependencies(tests ecmascript-tests) endif() +if(PANDA_WITH_ECMASCRIPT AND PANDA_TARGET_64) + + set(ES2PANDA_TEST_ROOT plugins/ecmascript/es2panda/test) + set(OPTIONS --regression --no-progress --test-root ${ES2PANDA_TEST_ROOT} --list-root ${ES2PANDA_TEST_ROOT}) + + if(PANDA_TARGET_ARM64) + set(OPTIONS --arm64 ${OPTIONS}) + if(PANDA_QEMU_BUILD) + set(OPTIONS --arm64-qemu ${OPTIONS}) + endif() + elseif(PANDA_TARGET_ARM32) + set(OPTIONS --arm32 ${OPTIONS}) + if(PANDA_QEMU_BUILD) + set(OPTIONS --arm32-qemu ${OPTIONS}) + endif() + endif() + + add_custom_target(es2panda-regression-tests DEPENDS ark es2panda verifier) + add_dependencies(tests es2panda-regression-tests) + add_custom_command( + TARGET es2panda-regression-tests + WORKING_DIRECTORY ${PANDA_ROOT} + COMMAND ${PANDA_ROOT}/tests/runner/runner.sh ${PANDA_ROOT} ${OPTIONS} ${PANDA_BINARY_ROOT} + ) +endif() + if(PANDA_COMPILER_ENABLE) add_subdirectory(checked) add_dependencies(tests checked_tests)