add nextflow d30e48d
This commit is contained in:
46
nextflow/tests/checks/agent-output.nf/.checks
Normal file
46
nextflow/tests/checks/agent-output.nf/.checks
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Test agent output mode (NXF_AGENT_MODE=true)
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
# Run workflow with agent mode enabled
|
||||
NXF_AGENT_MODE=true $NXF_CMD -q run $NXF_SCRIPT > stdout.txt 2> stderr.txt || true
|
||||
|
||||
# Verify agent output format in stdout
|
||||
# Should contain [PIPELINE], [WORKDIR], and [SUCCESS] or [FAILED]
|
||||
|
||||
if ! grep -q '\[PIPELINE\]' stdout.txt; then
|
||||
echo "ERROR: Missing [PIPELINE] in agent output"
|
||||
cat stdout.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q '\[WORKDIR\]' stdout.txt; then
|
||||
echo "ERROR: Missing [WORKDIR] in agent output"
|
||||
cat stdout.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -q '\[SUCCESS\]' stdout.txt; then
|
||||
echo "ERROR: Missing [SUCCESS] in agent output"
|
||||
cat stdout.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify banner is suppressed (should NOT contain "N E X T F L O W")
|
||||
if grep -q 'N E X T F L O W' stdout.txt; then
|
||||
echo "ERROR: Banner should be suppressed in agent mode"
|
||||
cat stdout.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Verify workflow output is present
|
||||
if ! grep -q 'World received: Hello from agent mode' stdout.txt; then
|
||||
echo "ERROR: Workflow stdout incorrect"
|
||||
cat stdout.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Agent output mode test passed"
|
||||
1
nextflow/tests/checks/agent-output.nf/.expected
Normal file
1
nextflow/tests/checks/agent-output.nf/.expected
Normal file
@@ -0,0 +1 @@
|
||||
World received: Hello from agent mode
|
||||
Reference in New Issue
Block a user