Skip to content

Commit

Permalink
Travis fixing, with || and -la #WIP
Browse files Browse the repository at this point in the history
Add downloader example test to the Travis script

This fixes issue #29.
  • Loading branch information
smondet committed Dec 20, 2016
1 parent 5424c72 commit a2eb824
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions tools/travis_ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,37 @@ make native
gennspio_test=_build/src/test/genspio-test.byte
genspio_examples=_build/src/test/genspio-examples.byte

$genspio_test
echo "================== TEST 0 ======================================================"
$gennspio_test

# We also run the example
# we get the script and then we test it

genspio_downloader=/tmp/genspio-downloader
$genspio_examples dl $genspio_downloader

sh $genspio_downloader -h

echo "================== TEST 1 ======================================================"
sh $genspio_downloader -c -t /tmp/test1 -f k3.0.0.tar.gz -u https://github.com/hammerlab/ketrew/archive/ketrew.3.0.0.tar.gz || echo "Test 1 failed!!"
ls -la /tmp/test1 || echo "LS Test 1 failed!!"
test -f /tmp/test1/k3.0.0.tar || echo "Nope" # Yes, the -f worked
test -f /tmp/test1/ketrew-ketrew.3.0.0/README.md || echo "NO: test -f /tmp/test1/ketrew-ketrew.3.0.0/README.md"


echo "================== TEST 2 ======================================================"
sh $genspio_downloader -c -t /tmp/genstest2 -u https://www.dropbox.com/s/h16b8ak9smkgw3g/test.tar.gz.zip.bz2.tbz2?raw=1 || echo "NO: sh $genspio_downloader -c -t /tmp/genstest2 -u https://www.dropbox.com/s/h16b8ak9smkgw3g/test.tar.gz.zip.bz2.tbz2?raw=1"
ls -la /tmp/genstest2 || echo "NO: ls /tmp/genstest2"
test -f /tmp/genstest2/src/lib/EDSL.ml || echo "NO: test -f /tmp/genstest2/src/lib/EDSL.ml"

echo "================== TEST 3 ======================================================"
# like -t /tmp/test2, without -c (which is fragile w.r.t. tar)
mkdir -p /tmp/test3 || echo "NO: mkdir -p /tmp/test3"
cd /tmp/test3 || echo "NO: cd /tmp/test3"
sh $genspio_downloader -u https://github.com/hammerlab/ketrew/archive/ketrew.3.0.0.tar.gz || echo "NO: sh $genspio_downloader -u https://github.com/hammerlab/ketrew/archive/ketrew.3.0.0.tar.gz"
ls -la /tmp/test3 || echo "NO: ls /tmp/test3"
test -f /tmp/test3/ketrew-ketrew.3.0.0/README.md || echo "NO: test -f /tmp/test3/ketrew-ketrew.3.0.0/README.md"




$genspio_examples dl -

0 comments on commit a2eb824

Please sign in to comment.