Skip to content

Commit

Permalink
Merge master into issues/5120-wdl-normalize-trouble
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 22, 2024
2 parents 196497e + c607dc7 commit bf7bac0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
3 changes: 1 addition & 2 deletions src/toil/test/cwl/cwlTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,6 @@ def test_slurm_node_memory(self) -> None:
"--outdir",
self.outDir,
os.path.join(self.rootDir, "src/toil/test/cwl/measure_default_memory.cwl"),
os.path.join(self.rootDir, "src/toil/test/cwl/empty.json"),
]
try:
log.debug("Start test workflow")
Expand All @@ -497,7 +496,7 @@ def test_slurm_node_memory(self) -> None:
else:
out = json.loads(output)
log.debug("Workflow output: %s", out)
memory_string = open(out["memory"]["location"][len("file://") :]).read()
memory_string = out["memory"]
log.debug("Observed memory: %s", memory_string)
result = int(memory_string)
# We should see more than the CWL default or the Toil default, assuming Slurm nodes of reasonable size (3 GiB).
Expand Down
29 changes: 9 additions & 20 deletions src/toil/test/cwl/measure_default_memory.cwl
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
cwlVersion: v1.2
class: Workflow

class: CommandLineTool
inputs: []

steps:
measure:
run:
class: CommandLineTool
inputs: []
baseCommand: ["bash", "-c", "ulimit -m"]
outputs:
memory: stdout
in: []
out:
# There's no good way to go back from a command output to a CWL value
# without bringing in a bunch of JS.
- id: memory

baseCommand: ["bash", "-c", "ulimit -m"]
stdout: memory.txt
outputs:
- id: memory
type: File
outputSource: measure/memory
memory:
type: string
outputBinding:
glob: memory.txt
loadContents: True
outputEval: $(self[0].contents)

0 comments on commit bf7bac0

Please sign in to comment.