Skip to content

feat: adds --output-file flag to spectool test#2

Merged
claymcleod merged 2 commits intomainfrom
feat/output-file
Mar 16, 2026
Merged

feat: adds --output-file flag to spectool test#2
claymcleod merged 2 commits intomainfrom
feat/output-file

Conversation

@claymcleod
Copy link
Contributor

This adds an --output-file flag to spectool test that lets spectool read task/workflow outputs from a specified file path instead of the default outputs.json in the working directory. The path supports ~{target} substitution, so it works with engines that write outputs to indexed locations.

The motivating use case is Sprocket's --index-on flag, which writes outputs to stable symlinked paths like /tmp/out/index/<target>/outputs.json. With --output-file, spectool can read directly from these paths rather than relying on --redirect-stdout to capture JSON from stdout—which broke when Sprocket started printing non-JSON status messages to stdout (see stjude-rust-labs/sprocket#732).

Example usage:

spectool test \
  "sprocket run ~{path} ~{input} -t ~{target} -o /tmp/out --index-on ~{target}" \
  --output-file "/tmp/out/index/~{target}/outputs.json" \
  --all-capabilities \
  -s /path/to/wdl-spec -vv

Tested locally against the full WDL 1.3 spec—172/172 passed.

When set, spectool reads task/workflow outputs from the specified file
path instead of the default `outputs.json` in the working directory.
The path supports `~{target}` substitution, making it compatible with
engines that write outputs to indexed locations (e.g., Sprocket's
`--index-on` flag).
@claymcleod claymcleod merged commit 1e758c4 into main Mar 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant