Harness

object Harness(source)

Text of the files the runner hands to a container: the per-arm plan and the docker command.

Properties

Link copied to clipboard
const val CPUS: String
Link copied to clipboard
const val MEMORY: String
Link copied to clipboard
const val NETWORK: String

Functions

Link copied to clipboard
fun command(scenario: Scenario, arm: Arm): String
Link copied to clipboard
fun env(arm: Arm): String

The arm's variables as export lines that native.sh and harness.ps1 read.

Link copied to clipboard
fun filePath(armName: String, index: Int): String

Host path under the scenario directory for the nth file mount of an arm.

Link copied to clipboard
fun gcompatTag(image: String): String

The tag of an Alpine image with gcompat and libgcc added, which the glibc drift needs.

Link copied to clipboard
fun images(scenario: Scenario): String

The distinct arm images of a scenario, one per line, sorted.

Link copied to clipboard
fun nativeRefusal(scenario: Scenario): String?

Why a scenario cannot run on the host without a container, or null when it can.

Link copied to clipboard
fun plan(scenario: Scenario, arm: Arm): String
Link copied to clipboard
fun quote(text: String): String
Link copied to clipboard
Link copied to clipboard
fun script(scenario: Scenario, armName: String, arm: Arm): String

A shell script that runs one arm; DRIFT names the Linux drift binary to mount, if any.

Link copied to clipboard
fun shellTag(image: String, shell: String): String

The tag of a Debian image whose /bin/sh is linked to shell.

Link copied to clipboard
fun solveScript(scenario: Scenario): String

A shell script that runs drift solve for one prepared scenario. The capsules sit next to it as capsule.<arm>.json and the program under workspace/; DRIFT is the absolute path of a Linux drift binary, SOLVED the directory that receives the case. The binary placed in the arms follows the capsule's architecture: DRIFT_ARMS_AARCH64 or DRIFT_ARMS_X86_64, then DRIFT_ARMS, then DRIFT.

Link copied to clipboard
fun workspacePath(armName: String, path: String): String

Path under the scenario directory of a workspace file of an arm.