forked from broadinstitute/cromwell
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deduplicate PAPI v2 input localizations. [BA-5979] [force ci] (broadi…
- Loading branch information
Showing
3 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
centaur/src/main/resources/standardTestCases/dedup_localizations_papi_v2.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: dedup_localizations_papi_v2 | ||
testFormat: workflowsuccess | ||
backends: [Papiv2] | ||
|
||
files { | ||
workflow: dedup_localizations_papi_v2/dedup_localizations_papi_v2.wdl | ||
} | ||
|
||
metadata { | ||
workflowName: dedup_localizations_papi_v2 | ||
status: Succeeded | ||
"outputs.dedup_localizations_papi_v2.check_log.num_input_localizations": 1 | ||
} |
59 changes: 59 additions & 0 deletions
59
...n/resources/standardTestCases/dedup_localizations_papi_v2/dedup_localizations_papi_v2.wdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
version 1.0 | ||
|
||
workflow dedup_localizations_papi_v2 { | ||
call producer | ||
call consumer { input: first = producer.data, second = producer.data } | ||
call check_log { input: out_file_path = consumer.out, log_file_name = "consumer.log" } | ||
} | ||
|
||
task producer { | ||
command { | ||
echo "Here is some data." > data.txt | ||
} | ||
|
||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
|
||
output { | ||
File data = "data.txt" | ||
} | ||
} | ||
|
||
task consumer { | ||
input { | ||
File first | ||
File second | ||
} | ||
|
||
command { | ||
# noop | ||
} | ||
|
||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
|
||
output { | ||
File out = stdout() | ||
} | ||
} | ||
|
||
task check_log { | ||
input { | ||
String out_file_path | ||
String log_file_name | ||
} | ||
String file_log = sub(out_file_path, "/stdout$", "/" + log_file_name) | ||
command { | ||
set -euo pipefail | ||
gsutil cp ~{file_log} log.txt | ||
set +e | ||
grep 'Localizing input gs://cloud-cromwell-dev-self-cleaning/cromwell_execution/travis/dedup_localizations_papi_v2/' log.txt | grep -c "data.txt" | ||
} | ||
output { | ||
File out = stdout() | ||
Int num_input_localizations = read_int(stdout()) | ||
} | ||
runtime { docker: "google/cloud-sdk" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters