Skip to content

Commit f978e9f

Browse files
committed
test(e2e): skip TUI check without expect
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
1 parent 09fc635 commit f978e9f

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

test/deepagents-code-tui-startup-check.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,22 @@ describe("Deep Agents Code TUI startup check helpers", () => {
7777
expect(result.stderr).not.toContain("expect is required");
7878
});
7979

80+
it("skips Deep Agents TUI exercise when expect is unavailable", () => {
81+
const result = runTuiStartupCheckHelperResult(
82+
[
83+
"PASSED=0",
84+
"FAILED=0",
85+
"sandbox_exec() { printf 'NEMOCLAW_DCODE_PROBE:deepagents\\n'; }",
86+
'command() { if [ "$1" = -v ] && [ "${2:-}" = expect ]; then return 1; fi; builtin command "$@"; }',
87+
"main",
88+
].join("; "),
89+
);
90+
91+
expect(result.status).toBe(0);
92+
expect(result.stdout).toContain("SKIP: expect is required");
93+
expect(result.stderr).not.toContain("FAIL");
94+
});
95+
8096
it("matches prompt-shaped TUI readiness text without accepting banner-only startup text", () => {
8197
const readiness = (capture: string) =>
8298
runTuiStartupCheckHelper(

test/e2e/e2e-cloud-experimental/checks/10-deepagents-code-tui-startup.sh

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,7 @@ is_positive_integer() {
4545
}
4646

4747
ensure_expect_available() {
48-
if command -v expect >/dev/null 2>&1; then
49-
return 0
50-
fi
51-
if [ "${GITHUB_ACTIONS:-}" = "true" ] && command -v sudo >/dev/null 2>&1 && command -v apt-get >/dev/null 2>&1; then
52-
info "expect is not preinstalled; installing expect for the Deep Agents Code TUI PTY check"
53-
if sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends expect; then
54-
command -v expect >/dev/null 2>&1
55-
return $?
56-
fi
57-
fi
58-
return 1
48+
command -v expect >/dev/null 2>&1
5949
}
6050

6151
contains_secret() {
@@ -234,9 +224,8 @@ main() {
234224
esac
235225

236226
if ! ensure_expect_available; then
237-
fail_test "expect is required for the Deep Agents Code TUI startup check"
238-
printf '%s\n' "${PREFIX}: $PASSED passed, $FAILED failed"
239-
exit 1
227+
info "SKIP: expect is required for the Deep Agents Code TUI startup check"
228+
exit 0
240229
fi
241230

242231
local capture_dir raw_capture_file expect_log_file combined_capture_file plain_capture_file

0 commit comments

Comments
 (0)