12213: Check for correct test output.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Mon, 2 Oct 2017 18:25:42 +0000 (14:25 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Mon, 2 Oct 2017 18:25:42 +0000 (14:25 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

sdk/cwl/tests/12213-keepref-expr.cwl
sdk/cwl/tests/12213-keepref-tool.cwl
sdk/cwl/tests/12213-keepref-wf.cwl
sdk/cwl/tests/arvados-tests.sh
sdk/cwl/tests/arvados-tests.yml
sdk/cwl/tests/runner.sh [deleted file]

index c28f7e87d67693d339fd24dc58cfd98b00851aa6..ddc7ff9588c67d396b28226d344a493a7a281200 100644 (file)
@@ -22,10 +22,10 @@ expression: |
       }
     }
     var dirs = [];
-    for (var sampleid in samples) {
+    Object.keys(samples).sort().forEach(function(sampleid, _) {
       dirs.push({"class": "Directory",
                  "basename": sampleid,
                  "listing": samples[sampleid]});
-    }
+    });
     return {"out": dirs};
   }
\ No newline at end of file
index 4e55875ea2a52443211ff9c746a74ed749785806..8c28cc2215b5d3eac21b94ad31292595dae25f43 100644 (file)
@@ -4,8 +4,10 @@ requirements:
   InlineJavascriptRequirement: {}
 inputs:
   fastqsdir: Directory
-outputs: []
+outputs:
+  out: stdout
 baseCommand: [zcat]
+stdout: $(inputs.fastqsdir.listing[0].nameroot).txt
 arguments:
   - $(inputs.fastqsdir.listing[0].path)
   - $(inputs.fastqsdir.listing[1].path)
index 0c8427abaf7724450eac36b1fe8cdcd8819d8d9c..3f1e8902cc5a00488315d13cdb81a40f90000bb1 100644 (file)
@@ -4,7 +4,10 @@ requirements:
   ScatterFeatureRequirement: {}
 inputs:
   dir: Directory
-outputs: []
+outputs:
+  out:
+    type: File[]
+    outputSource: tool/out
 steps:
   ex:
     in:
@@ -14,6 +17,6 @@ steps:
   tool:
     in:
       fastqsdir: ex/out
-    out: []
+    out: [out]
     scatter: fastqsdir
     run: 12213-keepref-tool.cwl
\ No newline at end of file
index f069251a2aca4174221483f7486410affc55eec4..f7cebd4249acf5e5af7a7033100896a760720fbb 100755 (executable)
@@ -6,4 +6,4 @@
 if ! arv-get d7514270f356df848477718d58308cc4+94 > /dev/null ; then
     arv-put --portable-data-hash testdir
 fi
-exec cwltest --test arvados-tests.yml --tool $PWD/runner.sh $@
+exec cwltest --test arvados-tests.yml --tool arvados-cwl-runner $@ -- --disable-reuse --compute-checksum
index 35efab4ccc33f67e8f968558e620e3d84cc117fe..2f1429efba2b63f7e8c4bdbea555f17c56d0a961 100644 (file)
   doc: "Test arv:ReuseRequirement"
 
 - job: 12213-keepref-job.yml
-  output: {}
+  output: {
+    "out": [
+        {
+            "checksum": "sha1$1c78028c0d69163391eef89316b44a57bde3fead",
+            "location": "sample1_S01_R1_001.fastq.txt",
+            "class": "File",
+            "size": 32
+        },
+        {
+            "checksum": "sha1$83483b9c65d99967aecc794c14f9f4743314d186",
+            "location": "sample2_S01_R3_001.fastq.txt",
+            "class": "File",
+            "size": 32
+        }
+    ]
+  }
   tool: 12213-keepref-wf.cwl
   doc: "Test manipulating keep references with expression tools"
diff --git a/sdk/cwl/tests/runner.sh b/sdk/cwl/tests/runner.sh
deleted file mode 100755 (executable)
index 20bbb26..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# Copyright (C) The Arvados Authors. All rights reserved.
-#
-# SPDX-License-Identifier: Apache-2.0
-
-exec arvados-cwl-runner --disable-reuse --compute-checksum "$@"