add rc trace"

This commit is contained in:
2026-01-23 17:22:07 -06:00
parent beea76949c
commit a01b48dabc
3 changed files with 491 additions and 5 deletions

24
test.ce
View File

@@ -4,12 +4,16 @@ var fd = use('fd')
var time = use('time')
var json = use('json')
var blob = use('blob')
var dbg = use('js')
// run gc with dbg.gc()
if (!args) args = []
var target_pkg = null // null = current package
var target_test = null // null = all tests, otherwise specific test file
var all_pkgs = false
var gc_after_each_test = false
// Actor test support
def ACTOR_TEST_TIMEOUT = 30000 // 30 seconds timeout for actor tests
@@ -43,6 +47,16 @@ function get_current_package_name() {
// cell test package all - run all tests from all packages
function parse_args() {
var cleaned_args = []
for (var i = 0; i < length(args); i++) {
if (args[i] == '-g') {
gc_after_each_test = true
} else {
push(cleaned_args, args[i])
}
}
args = cleaned_args
if (length(args) == 0) {
// cell test - run all tests for current package
if (!is_valid_package('.')) {
@@ -346,6 +360,9 @@ function run_tests(package_name, specific_test) {
push(file_result.tests, test_entry)
pkg_result.total++
if (gc_after_each_test) {
dbg.gc()
}
}
}
@@ -362,6 +379,9 @@ function run_tests(package_name, specific_test) {
pkg_result.failed++
file_result.failed++
pkg_result.total++
if (gc_after_each_test) {
dbg.gc()
}
}
push(pkg_result.files, file_result)
}
@@ -450,6 +470,10 @@ function handle_actor_message(msg) {
push(actor_test_results, entry)
}
if (gc_after_each_test) {
dbg.gc()
}
check_completion()
}