Expand description
A server a browser suite starts with docker compose, built from the copy
the suite runs in. The image holds the instrumented code, but nothing else
crossed into the container: not the environment that tells the server’s
runtime where to write, and not the directory it writes to. A docker
launcher on the suite’s PATH hands each service built from the copy that
environment and Supercov’s directory, mounted at the path it has outside,
and records the project so the run can stop it, and read what it wrote,
once the command ends.
Anything it does not recognise, or cannot read, runs as written.
Constants§
- CONTAINER_
VARIABLE - Set in each such service: its runtime runs in an image of the copy.
- COPY_
VARIABLE - The copy: a service whose build context is in it was built from it.
- DOCKER_
COMMAND - The hidden command a launcher runs:
supercov __docker <docker> <args>. - ENVIRONMENT_
VARIABLE - Names, comma-separated, of the variables each such service is given.
- MOUNT_
VARIABLE - The directory mounted into each service, at the same path.
- STATE_
VARIABLE - Where projects the launcher started are recorded, one JSON line each.
Functions§
- run
- Run
dockeras the launcher was asked to, giving services built from the copy what their runtime needs. Returns the exit code. - stop_
started - Stop what the launcher started, so each server writes its last window before the run reads them. Stopped, never removed: the containers are the suite’s. Quietly does nothing when nothing was started.
- write_
launchers - The launchers,
dockeranddocker-composefor those on PATH, indirectory, or None when neither is.