code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
/* * Simplest possible test - just execute a couple of commands and * join them together in a pipeline */ hello = { exec "echo hello > test.txt" } world = { exec "echo world > test.world.txt" } mars = { exec "echo mars > test.mars.txt" } jupiter = { exec "echo jupiter > test.jupiter.txt" } saturn = { exec ...
zxd06407-bpipe
tests/define/test.groovy
Groovy
bsd
491
rm -f test.*.txt
zxd06407-bpipe
tests/define/cleanup.sh
Shell
bsd
17
source ../testsupport.sh run test_*.txt test.csv grep -q "inputs.txt: cat test_1.txt test_2.txt > test_1.txt.hello" test.out || err "Failed to find expected output 'inputs.txt: cat test_1.txt test_2.txt > test_1.txt.hello'" grep -q "input.txt: cat test_1.txt > test_1.txt.hello" test.out || err "Failed to find expect...
zxd06407-bpipe
tests/inputextmulti2/run.sh
Shell
bsd
1,021
/* * Simplest possible test using inputs and outputs * join them together in a pipeline */ hello = { msg "inputs.txt: cat $inputs.txt > $output" msg "input.txt: cat $input.txt > $output" msg "inputs: cat $inputs > $output" msg "input: cat $input > $output" msg "input[0]: cat ${input[0]} > $output" msg "in...
zxd06407-bpipe
tests/inputextmulti2/test.groovy
Groovy
bsd
420
rm -f test_1.txt.hello
zxd06407-bpipe
tests/inputextmulti2/cleanup.sh
Shell
bsd
23
source ../testsupport.sh rm -f test.world.txt test.txt run grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" [ ! -f test.txt ] && err "Failed to find expected output test.txt" [ ! -f test.world.txt ] && err "Failed...
zxd06407-bpipe
tests/slow/run.sh
Shell
bsd
367
/* * Simplest possible test - just execute a couple of commands and * join them together in a pipeline */ hello = { exec "echo hello > test.txt" exec "sleep 60" } world = { exec "echo world > test.world.txt" exec "sleep 60" } Bpipe.run { hello + world }
zxd06407-bpipe
tests/slow/test.groovy
Groovy
bsd
268
source ../testsupport.sh run test.txt test2.txt test.csv grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "inputs: test.txt test2.txt test.csv" test.out || err "Failed to find expected output: inputs: test.txt test2.txt test.csv" true
zxd06407-bpipe
tests/from_multiple_types/run.sh
Shell
bsd
277
hello = { from(["txt", "txt", "csv"]) { msg "inputs: $input1 $input2 $input3" } } run { hello }
zxd06407-bpipe
tests/from_multiple_types/test.groovy
Groovy
bsd
114
source ../testsupport.sh run test.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" [ ! -f mars.txt ] && err "Failed to find expected output mars.txt" [ ! -f world.txt ] && err "Failed to find expected output wo...
zxd06407-bpipe
tests/produce_multi/run.sh
Shell
bsd
528
/* * Test that producing multiple explicit outputs works */ hello = { produce("foo.txt") { exec "cp $input $output" } } world = { produce("world.txt", "mars.txt") { exec "cp $input $output1" exec "cp $input $output2" } } run { hello + world }
zxd06407-bpipe
tests/produce_multi/test.groovy
Groovy
bsd
268
rm -f mars.txt world.txt foo.txt query.out
zxd06407-bpipe
tests/produce_multi/cleanup.sh
Shell
bsd
43
source ../testsupport.sh bpipe run -n 10 test.groovy > test.out exists hello hello2 hello3 hello4 # each one should have gotten 3 threads (10/3) [ `cat hello` == 3 ] || echo "Wrong number of threads assigned to thread variable in multi statement" [ `cat hello2` == 3 ] || echo "Wrong number of threads assigned to t...
zxd06407-bpipe
tests/thread_variable/run.sh
Shell
bsd
636
hello = { uses(tempfiles: 1024) { multi "echo $threads > $output", "echo $threads > $output2", "echo $threads > $output3" exec "echo $threads > $output4" } } run { hello }
zxd06407-bpipe
tests/thread_variable/test.groovy
Groovy
bsd
209
rm -f hello*
zxd06407-bpipe
tests/thread_variable/cleanup.sh
Shell
bsd
13
source ../testsupport.sh run grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "world" test.out || err "Failed to find expected output world" true
zxd06407-bpipe
tests/backtick/run.sh
Shell
bsd
184
/* * Simplest possible test - just execute a couple of commands and * join them together in a pipeline */ hello = { exec """ x=`echo world`; echo "$x" """ } Bpipe.run { hello }
zxd06407-bpipe
tests/backtick/test.groovy
Groovy
bsd
196
source ../testsupport.sh # Should fail! run test.txt # Should clean up this file notexists test.hello.csv true
zxd06407-bpipe
tests/cleanup_output_from_ext/run.sh
Shell
bsd
114
hello = { exec "cp $input.txt $output.csv ; false" } run { hello }
zxd06407-bpipe
tests/cleanup_output_from_ext/test.groovy
Groovy
bsd
71
rm -f *.csv
zxd06407-bpipe
tests/cleanup_output_from_ext/cleanup.sh
Shell
bsd
12
source ../testsupport.sh run test1.txt test2.txt exists test1.foo.txt test2.foo.txt true
zxd06407-bpipe
tests/filter_two_same_type/run.sh
Shell
bsd
93
hello = { filter("foo","foo") { exec """ cp $input1 $output1 cp $input2 $output2 """ } } run { hello }
zxd06407-bpipe
tests/filter_two_same_type/test.groovy
Groovy
bsd
129
rm -f *.foo.txt
zxd06407-bpipe
tests/filter_two_same_type/cleanup.sh
Shell
bsd
16
source ../testsupport.sh source ./cleanup.sh run test.txt test2.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" [ ! -f test.hello.txt ] && err "Failed to find expected output test.hello.txt" [ ! -f test.hello...
zxd06407-bpipe
tests/from_2_matches/run.sh
Shell
bsd
481
/* * Test that a from that matches 2 inputs sets them as input1 and input2 */ hello = { from("txt","txt") { filter("hello","hello2") { msg "$input1 => $output1" msg "$input2 => $output2" exec "cp $input1 $output1" exec "cp $input2 $output2" ...
zxd06407-bpipe
tests/from_2_matches/test.groovy
Groovy
bsd
497
rm -f test.hell*.txt
zxd06407-bpipe
tests/from_2_matches/cleanup.sh
Shell
bsd
21
source ../testsupport.sh run test.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" grep -q "Stage world2" test.out || err "Failed to find expected stage world2" grep -q "Stage end" test.out || err "Failed to fin...
zxd06407-bpipe
tests/parallel/run.sh
Shell
bsd
712
/* * Simplest possible test using inputs and outputs * join them together in a pipeline */ hello = { exec "cp $input $output" } world = { exec "cp $input $output" } world2 = { // produce("anotheroutput.txt") { exec "cp $input $output" // } } end = { exec "cat $inputs > $output" } // Stage world and wo...
zxd06407-bpipe
tests/parallel/test.groovy
Groovy
bsd
467
rm -f test.txt.*
zxd06407-bpipe
tests/parallel/cleanup.sh
Shell
bsd
17
source ../testsupport.sh run test.txt exists test.txt.hello test.txt.hello.there test.txt.hello.world # The stage "there" shouldn't produce this output meta data because # meta data for the same output was already produced by the previous stage notexists .bpipe/outputs/there.test.txt.hello.properties true
zxd06407-bpipe
tests/produce_existing/run.sh
Shell
bsd
313
// If a file that already exists or that is produced by a previous stage // Is declared or inferred again as an output, we DON'T want to resave the meta data // The main reason for this is that it confuses the dependency tree and creates // apparent circular dependencies that foul up later logic hello = { exec "cp $i...
zxd06407-bpipe
tests/produce_existing/test.groovy
Groovy
bsd
573
rm -rf .bpipe test.txt.*;
zxd06407-bpipe
tests/produce_existing/cleanup.sh
Shell
bsd
26
. ../testsupport.sh . ./cleanup.sh run test.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q Skipping test.out && err "Found unexpected phrase Skipping steps" # Running a second time should skip the stages run test.txt grep -q "Skipping steps" test.out || err "Failed to f...
zxd06407-bpipe
tests/cleanup/run.sh
Shell
bsd
2,162
/* * A simple pipeline with some intermediate files to test * cleanup. Note that the last output (xls) depends only on the output * of the first stage (html), but not on the intermediate ones (csv, xls). * So we should be able to update the csv,xls files without actually requiring a * rebuild of the last stage. ...
zxd06407-bpipe
tests/cleanup/test.groovy
Groovy
bsd
769
rm -f *.html *.xls *.csv *.xml rm -f query.test.out rm -rf .bpipe/outputs
zxd06407-bpipe
tests/cleanup/cleanup.sh
Shell
bsd
74
source ../testsupport.sh . ./cleanup.sh ../../bin/bpipe run -p foo=foooo -p bar=baaaar test.groovy > test.out grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" grep -q "Stage there" test.out || err "Failed to find e...
zxd06407-bpipe
tests/cmdlinevars/run.sh
Shell
bsd
981
/* * Test that variables can be passed from the command line * and that defaults can be set */ bar="BAR" fubar="FUBAR" hello = { msg "foo=$foo" exec "echo $foo > test.txt" } world = { msg "bar=$bar" exec "echo $bar > test.world.txt" } there = { msg "fubar=$fubar" exec "echo $fubar > te...
zxd06407-bpipe
tests/cmdlinevars/test.groovy
Groovy
bsd
369
rm -f test.world.txt test.there.txt test.txt
zxd06407-bpipe
tests/cmdlinevars/cleanup.sh
Shell
bsd
48
source ../testsupport.sh run grep -q "Command failed" test.out && err "Failed to execute bash command terminated with ampersands" true
zxd06407-bpipe
tests/background/run.sh
Shell
bsd
139
bg = { exec """ sleep 5 & sleep 6 & wait """ } run { bg }
zxd06407-bpipe
tests/background/test.groovy
Groovy
bsd
77
FOO="bar" x = { msg "$FOO" }
zxd06407-bpipe
tests/externalstages/bpipes/External.groovy
Groovy
bsd
31
source ../testsupport.sh BPIPE_LIB_OLD="$BPIPE_LIB" export BPIPE_LIB=`pwd`/bpipes uname -a | grep -i -q cygwin && { export BPIPE_LIB=`cygpath -ma $BPIPE_LIB` } echo "Using BPIPE_LIB=$BPIPE_LIB" rm -f test.world.txt test.txt run grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -...
zxd06407-bpipe
tests/externalstages/run.sh
Shell
bsd
578
/* * Simplest possible test - just execute a couple of commands and * join them together in a pipeline */ FOO="tree" hello = { msg "FOO=$FOO" exec "echo hello > test.txt" } world = { exec "echo world > test.world.txt" } Bpipe.run { hello + world + x }
zxd06407-bpipe
tests/externalstages/test.groovy
Groovy
bsd
264
rm -f test.f*
zxd06407-bpipe
tests/transform_multi/clean.sh
Shell
bsd
14
source ../testsupport.sh . ./clean.sh run test.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" [ ! -f test.f1 ] && err "Failed to find expected output test.f1" [ ! -f test.f2 ] && err "Failed to find expected...
zxd06407-bpipe
tests/transform_multi/run.sh
Shell
bsd
408
/* * Simplest possible test using inputs and outputs * join them together in a pipeline */ hello = { transform("f1") { exec "cp $input $output" } } world = { transform(["f2", "f3"]) { exec "cp $input $output1" exec "cp $input $output2" } } world2 = { transform("f2", "f3") { exec "cp $inpu...
zxd06407-bpipe
tests/transform_multi/test.groovy
Groovy
bsd
399
rm -f *align*
zxd06407-bpipe
tests/persample/clean.sh
Shell
bsd
15
source ../testsupport.sh rm -f *align* run s_*.txt grep -q "Stage dedupe" test.out || err "Failed to find expected stage dedupe" grep -q "Stage align" test.out || err "Failed to find expected stage align" grep -q "Stage compute_statistics" test.out || err "Failed to find expected stage compute_statistics" [ ! -f s...
zxd06407-bpipe
tests/persample/run.sh
Shell
bsd
805
/* @SplitBy("-%") copy_to_resource_folder = { produce("output/$input") { exec "cp $input $output" } } */ @Filter("align") align = { exec "cat $input1 $input2 > $output" } @Filter("dedupe") dedupe = { exec "cp $input $output" } compute_statistics = { exec "wc $inputs > $output" } hello_there = { exe...
zxd06407-bpipe
tests/persample/test.groovy
Groovy
bsd
436
source ../testsupport.sh run test.txt test2.txt # the world stage should create an output file from the CSV files created in hello stage exists test.hello.world.txt # Check that it really used BOTH CSV files created by the earlier nested stage grep -q 'test.hello.csv test2.hello.csv' commandlog.txt || err "Failed to...
zxd06407-bpipe
tests/output_from_prior_nested_stage/run.sh
Shell
bsd
368
hello = { exec """ cat $input.txt > $output.csv """ } there = { exec """ cat $input.csv > $output.xml """ } world = { exec """ cat $inputs.csv > $output.txt """ } run { "%.txt" * [ hello + there ] + world }
zxd06407-bpipe
tests/output_from_prior_nested_stage/test.groovy
Groovy
bsd
237
rm -f *.xml *.csv test.*.txt
zxd06407-bpipe
tests/output_from_prior_nested_stage/cleanup.sh
Shell
bsd
29
source ../testsupport.sh . ./cleanup.sh run grep -q "Stage hello" test.out || err "Failed to find expected stage hello" cat test.out | grep -o "Stage hello_." | sort | uniq -c > counts.txt for c in a b c d e ; do grep -q "1 Stage hello_$c" counts.txt || err "Wrong counts for stage $c" done true
zxd06407-bpipe
tests/consecutive_parallel/run.sh
Shell
bsd
305
hello_a = { exec "echo hello_a > hello_a.txt" } @Produce("hello_b.txt") hello_b = { exec "echo hello_b > hello_b.txt" } @Produce("hello_c.txt") hello_c = { exec "echo hello_c > hello_c.txt" } hello_d = { exec "echo hello_d > hello_d.txt" } hello_e = { exec "echo hello_e > hello_e.txt" } hello_f = { exec "ech...
zxd06407-bpipe
tests/consecutive_parallel/test.groovy
Groovy
bsd
733
rm -f hello_*.txt rm -f counts.txt
zxd06407-bpipe
tests/consecutive_parallel/cleanup.sh
Shell
bsd
37
source ../testsupport.sh run foo.txt bar.csv exists bar.hello.xml true
zxd06407-bpipe
tests/branch_input_before_original/run.sh
Shell
bsd
74
/* * When parallel branches are split, the files used for splitting * the branches should get considered as the basis for outputs BEFORE * the other files that may have been inputs. */ hello = { exec """ cat $input.txt $input.csv > $output.xml """ } run { "%.csv" * [ hello ] }
zxd06407-bpipe
tests/branch_input_before_original/test.groovy
Groovy
bsd
294
rm -f *.xml
zxd06407-bpipe
tests/branch_input_before_original/cleanup.sh
Shell
bsd
12
source ../testsupport.sh . cleanup.sh export BPIPE_LIB=./lib run grep -q "Stage there" test.out || err "Failed to find expected stage there" grep -q "Stage world" test.out || err "Failed to find expected stage world" grep -q "Stage buddy" test.out || err "Failed to find expected stage buddy" grep -q "Stage foo" te...
zxd06407-bpipe
tests/external_segment/run.sh
Shell
bsd
567
/* * Test that a segment defined in an external file * behaves correctly */ Bpipe.run { foo }
zxd06407-bpipe
tests/external_segment/test.groovy
Groovy
bsd
103
rm -f test.world.txt test.there.txt test.buddy.txt
zxd06407-bpipe
tests/external_segment/cleanup.sh
Shell
bsd
52
hello = { produce("test.txt") { exec "echo hello > test.txt" } } world = { produce("test.world.txt") { exec "echo world > test.world.txt" } } there = { produce("test.there.txt") { exec "echo there > test.there.txt" } } buddy = { produce("test.buddy.txt") { exec "echo buddy > test.budd...
zxd06407-bpipe
tests/external_segment/lib/Segment.groovy
Groovy
bsd
383
source ../testsupport.sh run s_1.txt grep -q "foo = cat" test.out || err "Failed to find expected output foo = cat" grep -q "foo = bar" test.out || err "Failed to find expected output foo = bar" true
zxd06407-bpipe
tests/param_nested_parallel/run.sh
Shell
bsd
203
/* * Running a stage multiple times in parallel but customized with different * parameters passed should correctly run the stages with different values for the * parameter variable. * * Note: see Issue 57: http://code.google.com/p/bpipe/issues/detail?id=57 */ hello = { msg "foo = $foo" } Bpipe.run { "s_%.tx...
zxd06407-bpipe
tests/param_nested_parallel/test.groovy
Groovy
bsd
379
source ../testsupport.sh run test.txt exists test.txt.hello [ `cat test.txt.hello` == foo ] || err "Incorrect contents in output file test.txt.hello" true
zxd06407-bpipe
tests/output_directly_as_string/run.sh
Shell
bsd
159
hello = { def text = new File(input).text new File(output).text = text } run { hello }
zxd06407-bpipe
tests/output_directly_as_string/test.groovy
Groovy
bsd
93
rm -f hello
zxd06407-bpipe
tests/output_directly_as_string/cleanup.sh
Shell
bsd
13
source ../testsupport.sh source ./cleanup.sh run test.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" grep -q "Stage end" test.out || err "Failed to find expected stage end" [ ! -f test.txt.hello ] && err "Fa...
zxd06407-bpipe
tests/nested_parallel/run.sh
Shell
bsd
690
/* * Simplest possible test using inputs and outputs * join them together in a pipeline */ hello = { exec "cp $input $output" } world = { msg "world inputs=$inputs" exec "cp $input $output" for(i in 0..10) { Thread.sleep(1000); println "world $i" } } how_are_you = { msg "how_are inputs=$inputs" exec "se...
zxd06407-bpipe
tests/nested_parallel/test.groovy
Groovy
bsd
912
rm -f test.txt.*
zxd06407-bpipe
tests/nested_parallel/cleanup.sh
Shell
bsd
17
source ../testsupport.sh run test.vcf test.bam exists test.ma.bam true
zxd06407-bpipe
tests/from_plus_prior_input/run.sh
Shell
bsd
75
/* * Check that a filter doesn't cause the inner from to resolve the * "output" from the filter as an input for the inner content * (regression) */ scan_misalignments = { filter("ma") { from("*.bam") { exec """ cat $input.vcf $input1.bam > $output.bam """ } } } run { scan_mis...
zxd06407-bpipe
tests/from_plus_prior_input/test.groovy
Groovy
bsd
333
rm -f *.ma.*
zxd06407-bpipe
tests/from_plus_prior_input/cleanup.sh
Shell
bsd
13
source ../testsupport.sh run test.txt grep -q "Stage world" test.out || err "Failed to execute stage world" exists test.txt.hello test1.world.xml test*.world.tsv true
zxd06407-bpipe
tests/glob/run.sh
Shell
bsd
172
/** * Test that 'glob' function works and can be used with 'from' * to match files in the local directory. */ hello = { exec "cp $input $output" } world = { from(glob("*.xls","*.csv")) { exec "cat $inputs.xls > $output.xml" exec "cat $inputs.csv > $output.tsv" } } run { hello + world }
zxd06407-bpipe
tests/glob/test.groovy
Groovy
bsd
306
rm -rf test.txt.hello test1.csv test1.world.*
zxd06407-bpipe
tests/glob/cleanup.sh
Shell
bsd
46
source ../testsupport.sh run test.txt exists test.hello.csv exists test.hello.world.csv true
zxd06407-bpipe
tests/output_ext_with_number/run.sh
Shell
bsd
96
hello = { exec "cp $input $output1.csv" } world = { exec "cp $input $output2.csv" } run { hello + world }
zxd06407-bpipe
tests/output_ext_with_number/test.groovy
Groovy
bsd
112
rm -f *.csv *.hello
zxd06407-bpipe
tests/output_ext_with_number/cleanup.sh
Shell
bsd
20
source ../testsupport.sh run test.txt exists test.txt.hello test.txt.csv
zxd06407-bpipe
tests/prefix/run.sh
Shell
bsd
75
/* * Make sure using 'prefix' works on input and output variables */ hello = { produce("test.txt.hello","test.txt.csv") { exec "echo hello > $output" exec "echo hello > ${output2.prefix}.csv" } } world = { from("test.txt.hello") { exec "cp $input.prefix ${output.prefix}.txt.world" } } run { hel...
zxd06407-bpipe
tests/prefix/test.groovy
Groovy
bsd
334
rm -f *.csv test.txt.*
zxd06407-bpipe
tests/prefix/cleanup.sh
Shell
bsd
24
source ../testsupport.sh run input*.txt #grep -q "Stage hello" test.out || err "Failed to find expected stage hello" #grep -q "Stage world" test.out || err "Failed to find expected stage world" #grep -q "Stage world2" test.out || err "Failed to find expected stage world2" #grep -q "Stage end" test.out || err "Failed ...
zxd06407-bpipe
tests/huge_nested_parallel/run.sh
Shell
bsd
721
/* * The main test here is 100 threads / files all at once and whether that creates any * issues. */ hello = { exec "cp $input $output; sleep 5" } world = { exec "cp $input $output" } world2 = { // produce("anotheroutput.txt") { exec "cp $input $output" // } } end = { exec "cat $inputs > $output" } B...
zxd06407-bpipe
tests/huge_nested_parallel/test.groovy
Groovy
bsd
382
rm -f *.hello *.hello.*
zxd06407-bpipe
tests/huge_nested_parallel/cleanup.sh
Shell
bsd
24
source ../testsupport.sh rm -f *align* run grep -q "An input pattern was specified '.*' but no inputs were given when Bpipe was run" test.out || err "Failed to find expected error message" true
zxd06407-bpipe
tests/persamplenofiles/run.sh
Shell
bsd
199
/* @SplitBy("-%") copy_to_resource_folder = { produce("output/$input") { exec "cp $input $output" } } */ @Filter("align") align = { exec "cat $input1 $input2 > $output" } @Filter("dedupe") dedupe = { exec "cp $input $output" } compute_statistics = { exec "wc $inputs > $output" } Bpipe.run { "s_%_*...
zxd06407-bpipe
tests/persamplenofiles/test.groovy
Groovy
bsd
371
source ../testsupport.sh . ./cleanup.sh run grep -q "Stage there" test.out || err "Failed to find expected stage there" grep -q "Stage world" test.out || err "Failed to find expected stage world" grep -q "Stage buddy" test.out || err "Failed to find expected stage buddy" grep -q "Stage foo" test.out && err "Observe...
zxd06407-bpipe
tests/segment/run.sh
Shell
bsd
545
/* * Simplest possible test - just execute a couple of commands and * join them together in a pipeline */ hello = { produce("test.txt") { exec "echo hello > test.txt" } } world = { produce("test.world.txt") { exec "echo world > test.world.txt" } } there = { produce("test.there.txt") { exec ...
zxd06407-bpipe
tests/segment/test.groovy
Groovy
bsd
513
rm -f test.world.txt test.there.txt test.buddy.txt
zxd06407-bpipe
tests/segment/cleanup.sh
Shell
bsd
52
#!/bin/bash TESTS=`find . -maxdepth 1 -type d | grep "[A-Za-z]"` source testsupport.sh succ=0 fail=0 failures="" for t in $TESTS; do echo "============== $t ================" cd "$BASE"/"$t" rm -rf .bpipe if ./run.sh; then echo echo "SUCCEEDED" echo let 'succ=succ+1' else echo echo "FAILED" ec...
zxd06407-bpipe
tests/run.sh
Shell
bsd
561
source ../testsupport.sh rm -f test.txt.* test.hello.* test.bar run test.txt grep -q "Stage hello" test.out || err "Failed to find expected stage hello" grep -q "Stage world" test.out || err "Failed to find expected stage world" run test.txt grep -q "Skipping command" test.out || err "Failed to find stage being sk...
zxd06407-bpipe
tests/outputext/run.sh
Shell
bsd
723
/* * Simplest possible test using inputs and outputs * join them together in a pipeline */ hello = { exec "cp $input $output.csv" } world = { msg "$input => $output.txt, $output.xml" exec "cp $input $output.txt; cp $input $output.xml" msg "$input => $output.tsv" exec "cp $input $output.tsv" } t...
zxd06407-bpipe
tests/outputext/test.groovy
Groovy
bsd
445
rm -rf *.out *.csv *.xml test.*.txt doc
zxd06407-bpipe
tests/outputext/cleanup.sh
Shell
bsd
41
# Add BPipe from the project root to the path if [ -z "$BASE" ]; then BASE=`pwd` if [ ! -e $BASE/../bin/bpipe ] && [ -e $BASE/../../bin/bpipe ] ; then BASE=`pwd`/.. fi fi PATH="$BASE/../bin:$PATH" #which bpipe if [ $? -ne 0 ]; then echo Cannot find the 'bpipe' launch script on the path. Please make sure that...
zxd06407-bpipe
tests/testsupport.sh
Shell
bsd
926
source ../testsupport.sh run exists foo.txt bar.txt grep -q "Stage async_stuff" test.out || err "Failed to find expected stage async_stuff in output" grep -q "Command.*failed" test.out || err "Failed to find expected failed command in output" grep -q "Exit status = 1" test.out || err "Failed to find expected exit s...
zxd06407-bpipe
tests/multi/run.sh
Shell
bsd
344
async_stuff = { multi "sleep 5; echo foo > foo.txt", "sleep 7; echo bar > bar.txt; false" } run { async_stuff }
zxd06407-bpipe
tests/multi/test.groovy
Groovy
bsd
123
rm -f foo.txt bar.txt
zxd06407-bpipe
tests/multi/cleanup.sh
Shell
bsd
22
source ../testsupport.sh source ./cleanup.sh run *.chr*.*vcf *.chr*bam grep -c chr14 test.out | grep -q 1 || err "Unexpected number of references to chr14 - should be only 1" grep -c chr15 test.out | grep -q 1 || err "Unexpected number of references to chr15 - should be only 1" true
zxd06407-bpipe
tests/parallel_input_ext_original_inputs/run.sh
Shell
bsd
289
annotate_test = { produce("hello.txt") { exec "touch $output1" } } create_variant_bam_test = { println "bamFile = $input.bam" } run { ".chr%."* [ annotate_test + create_variant_bam_test ] }
zxd06407-bpipe
tests/parallel_input_ext_original_inputs/test.groovy
Groovy
bsd
254