Documentation
¶
Overview ¶
Package pioracle runs the compiled Pi modules vendored for the Node extension runtime against Go test inputs, so a test compares Pig with Pi itself rather than with a transcription of Pi's behavior.
Index ¶
Constants ¶
const StampFile = ".pig-pi-oracle.json"
StampFile is the build stamp automation/pin/oracle.py writes beside an oracle's node_modules.
Variables ¶
This section is empty.
Functions ¶
func Bin ¶
Bin returns the Pi executable a test compares Pig with: PIG_PARITY_PI_BIN, else the oracle `make parity-deps` built from source at the pinned commit and linked into extensions/sdk-ts. The test is skipped when it is absent and fails when it is not the pinned build.
func CheckBin ¶
CheckBin reports why bin is not the Pi built from the pinned commit. The version string alone cannot tell two commits of one package version apart, so the build stamp must name the pinned commit.
func CheckDurable ¶
CheckDurable reports why modules, a node_modules directory such as durable/interop's, does not hold the pinned Pi Durable. A release pin installs the published package (`make durable-interop-deps` runs npm-locked.py), so its version is enough. A commit pin shares that package version with the release, so the tree must be the build of the pinned commit that `pin.py install-oracle` stamps.
func Run ¶
Run executes an ES module body in Node with the Pi distribution root in `root`, the decoded `input` in scope, and returns the JSON the body passes to `emit`. The body is the async function body of the check. Environment extra entries (KEY=value) are added to the child environment. A missing Node is a failure: the Pig test suite requires it.
Types ¶
This section is empty.