From 1770323a2af358e927ac8eae4ef0d360ebefa581 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 21 Jun 2026 21:05:51 +0000 Subject: [PATCH] fix test runner repo path handling --- site/tests/api_coverage.uce | 3 ++- site/tests/cli_runner.uce | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/site/tests/api_coverage.uce b/site/tests/api_coverage.uce index 91f22a5..60e5e78 100644 --- a/site/tests/api_coverage.uce +++ b/site/tests/api_coverage.uce @@ -21,7 +21,8 @@ RENDER(Request& context) }; site_tests_page_start("API Coverage Manifest", "Repository-level guard that public wasm-unit APIs have an explicit test/doc/internal decision."); - String out = shell_exec("cd /Code/uce.openfu.com/uce && python3 scripts/api_coverage_manifest.py"); + String repo_root = process_start_directory(); + String out = shell_exec("cd " + shell_escape(repo_root) + " && python3 scripts/api_coverage_manifest.py"); check("api coverage manifest", contains(out, "API coverage manifest ok"), out); site_tests_summary(passed, failed, skipped, "This page runs only on trusted/local test requests."); site_tests_page_end(); diff --git a/site/tests/cli_runner.uce b/site/tests/cli_runner.uce index 8ddaa8d..6de00a9 100644 --- a/site/tests/cli_runner.uce +++ b/site/tests/cli_runner.uce @@ -280,7 +280,7 @@ void cli_run_site_suite() for(String marker : { "compile error", "runtime error", "timed out acquiring compile lock", "near line" }) if(cli_contains(lower, marker)) ok = false; - if(cli_contains(lower, "
") && !cli_contains(lower, ">failed 0<")) + if(cli_contains(lower, "
") && !cli_contains(lower, ">failed 0")) ok = false; if(!ok && file == "services.uce") { @@ -291,7 +291,7 @@ void cli_run_site_suite() for(String marker : { "compile error", "runtime error", "timed out acquiring compile lock", "near line" }) if(cli_contains(lower, marker)) ok = false; - if(cli_contains(lower, "
") && !cli_contains(lower, ">failed 0<")) + if(cli_contains(lower, "
") && !cli_contains(lower, ">failed 0")) ok = false; } String name = "uce_site_suite:site tests " + (file == "index.uce" ? "index" : file == "io.uce" ? "filesystem" : file == "websockets.ws.uce" ? "websockets page" : replace(replace(replace(file, ".uce", ""), ".ws", ""), "_", " ")); @@ -427,7 +427,8 @@ CLI(Request& context) print("[GROUP] starter ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n"); group_start = time_precise(); cli_run_tcp_smoke(); - String cli_arg_out = shell_exec("cd /Code/uce.openfu.com/uce && bash scripts/uce-cli /tests/cli.uce action=arg message=hello-cli 2>&1"); + String repo_root = process_start_directory(); + String cli_arg_out = shell_exec("cd " + shell_escape(repo_root) + " && bash scripts/uce-cli /tests/cli.uce action=arg message=hello-cli 2>&1"); cli_test_case("uce_cli_fixture:cli_arg", contains(cli_arg_out, "hello-cli") && contains(cli_arg_out, "fallback"), cli_truncate(cli_arg_out)); print("[GROUP] tcp ", std::to_string((u64)((time_precise() - group_start) * 1000)), " ms\n"); group_start = time_precise();