From 3d6fe1f9cdd142e04487ae5888dc7aba98f86c1f Mon Sep 17 00:00:00 2001 From: Evgeniy Nikeytsev Date: Mon, 6 Mar 2023 20:17:12 +0300 Subject: [PATCH] Add additional garbage collectors types to tests that uses GC - add STW and Gen-gc types of GC to be used in ecmascripts tests to increse coverage for thoses GC types - add mm_tests cmake target in order to quickly run unit-tests that uses GC mostly Signed-off-by: Evgeniy Nikeytsev --- tests/runtime/common/ecma_empty_class_check/CMakeLists.txt | 2 ++ tests/runtime/common/gc/CMakeLists.txt | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/tests/runtime/common/ecma_empty_class_check/CMakeLists.txt b/tests/runtime/common/ecma_empty_class_check/CMakeLists.txt index 8b5f515d5..36e45c10f 100644 --- a/tests/runtime/common/ecma_empty_class_check/CMakeLists.txt +++ b/tests/runtime/common/ecma_empty_class_check/CMakeLists.txt @@ -22,6 +22,8 @@ add_custom_target(ecma_empty_class_check_ark COMMENT "running ark javascript ecma_empty_class_check testcase" COMMAND rm -f ${ECMA_EMPTY_CLASS_CHECK_OUTPUT} COMMAND ${PANDA_RUN_PREFIX} $ ${RUNTIME_ARGUMENTS} > ${ECMA_EMPTY_CLASS_CHECK_OUTPUT} + COMMAND ${PANDA_RUN_PREFIX} $ ${RUNTIME_ARGUMENTS} --gc-type=gen-gc + COMMAND ${PANDA_RUN_PREFIX} $ ${RUNTIME_ARGUMENTS} --gc-type=stw DEPENDS ecma_empty_class_check_es2panda ark ) diff --git a/tests/runtime/common/gc/CMakeLists.txt b/tests/runtime/common/gc/CMakeLists.txt index 59f10c55c..d6903cef4 100644 --- a/tests/runtime/common/gc/CMakeLists.txt +++ b/tests/runtime/common/gc/CMakeLists.txt @@ -127,6 +127,10 @@ function(panda_add_ecma_jsnapi_gc_test) endif() endfunction() +# mm_tests target will launch tests that use GC the most +add_dependencies(mm_tests + ecmascript_common_tests) + # Use --gc-trigger-type=debug-never to control GC in the test. # In the test we don't need the runtime triggers GC during allocation. panda_add_ecma_gc_test(FILE startGc.js OPTIONS "--gc-trigger-type=debug-never") -- Gitee