diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 11:40:11 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 12:41:36 -0300 |
| commit | 3f1533813b6692a736251e4d467a7f108229ddee (patch) | |
| tree | 37a32c5ebbf9d3af08923856fd6fa516f3b33a39 /tools/web_fixture.py | |
| parent | cfd2b993feda1b3f7474225bb32db8cac8edc5ae (diff) | |
| download | pardes-3f1533813b6692a736251e4d467a7f108229ddee.tar.gz pardes-3f1533813b6692a736251e4d467a7f108229ddee.zip | |
targets: the DOM web shell goes (src/web.zig and src/web/, its harnesses web_harness, web_snapshot, web_driver_test and web-snapshots/, tools/web_fixture.py, -Dplatform=web, -Ddump, and the web, web-harness, web-snap, web-e2e and web-driver-test steps), and with it what only a freestanding build needed: `hosted` and every guard on it (every build has a host now), memory's stack-fallback arenas and reduced_target sizes, the emscripten main, the tree-sitter libc shim and the stb stub, lsp's has_client, the web arms of the platform switches (-Dplatform is tui, gui or macos); the macOS files pass zig ast-check; docs/web.md is a paragraph on what it was
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'tools/web_fixture.py')
| -rw-r--r-- | tools/web_fixture.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/tools/web_fixture.py b/tools/web_fixture.py deleted file mode 100644 index 06fc54cd..00000000 --- a/tools/web_fixture.py +++ /dev/null @@ -1,34 +0,0 @@ -"""web_fixture.py PARDES OUT: the web shell's touch fixture as a dump of this -build: one pane on touch-fixture.zig at 100x30, theme helix. - - python3 -B tools/web_fixture.py <pardes> test/web-snapshots/touch.dump -""" -import os, sys, time, shutil, struct, fcntl, termios -from pathlib import Path -sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'test')) -import fs # noqa: E402 - -binary, out = sys.argv[1], sys.argv[2] -root = Path('/tmp/pardes-web-fixture') # fixed: the dump names it -shutil.rmtree(root, ignore_errors=True) -root.mkdir(parents=True, mode=0o700) -shutil.copy(Path(__file__).resolve().parent.parent / 'test' / 'web-snapshots' / 'touch-fixture.zig', root / 'touch-fixture.zig') -# Set at startup, which announces nothing: a fixture with no message on -# its pane. -(root / 'config' / 'pardes').mkdir(parents=True) -(root / 'config' / 'pardes' / 'init').write_text('Theme helix\nVerbose off\n') -handles = {} -with fs.session(binary, root, 'web', tty=True, file=root / 'touch-fixture.zig', inherited={'PARDES_DAEMON': 'off'}, terminal=handles) as (client, address): - fcntl.ioctl(handles['input_fd'], termios.TIOCSWINSZ, struct.pack('HHHH', 30, 100, 0, 0)) - deadline = time.monotonic() + 10 - while client.screen()['cols'] != 100: - assert time.monotonic() < deadline - time.sleep(.01) - client.write('/ctl', b'Dump\n') - while b'\ndump ' not in client.read('/log'): - assert time.monotonic() < deadline - time.sleep(.01) - print(client.read('/index').decode()) - shutil.copy(root / 'web.dump.zon', out) -shutil.rmtree(root, ignore_errors=True) -print(os.path.getsize(out), 'bytes') |
