Skip to content

person_struct_task.wdl test doesn't work because stringified WDL floats can't be used with Bash -gt integer comparison #739

@adamnovak

Description

@adamnovak

Even in fix-test, the person_struct_task.wdl test substitutes a float (which is specced to come with trailing decimal zeroes) into a Bash integer comparison.

wdl/SPEC.md

Line 3327 in 0a21f68

if [ "~{select_first([person.income]).amount}" -gt 1000 ]; then

When I try to run this in Toil, I get this in the standard error for the task:

	../command: line 51: [: 1000000.000000: integer expression expected

But the task overall finishes because we didn't set -e in the script. But then it gives the wrong output, because the test expected the comparison to pass.

Either the number needs to be converted to an integer somehow, or the comparison condition needs to be moved from Bash into WDL or some other place where floats can be compared.

Metadata

Metadata

Assignees

Labels

K-bug(Kind) A bug report (for issues) and/or bugfix (for PRs).S05-in-progress(State) A task that is in progress.T-tests(Topic) Issues related to the conformance tests.Z-good-first-issue(Metadata) An issue that would be good as a first issue to work on.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions