Skip to content

Commit

Permalink
Adding travis-ci with a basic regression check. (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 authored Jun 14, 2017
1 parent 64a92a2 commit 784004b
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sudo: required
language: c
compiler:
- clang
- gcc
script: make && make test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ dist:clean
tar -vcf dwgsim-${PACKAGE_VERSION}.tar dwgsim-${PACKAGE_VERSION}; \
gzip -9 dwgsim-${PACKAGE_VERSION}.tar; \
rm -rv dwgsim-${PACKAGE_VERSION};

test:
if [ -d tmp ]; then rm -r tmp; fi
/bin/bash testdata/test.sh
Binary file added testdata/ex1.test.bfast.fastq.gz
Binary file not shown.
Binary file added testdata/ex1.test.bwa.read1.fastq.gz
Binary file not shown.
Binary file added testdata/ex1.test.bwa.read2.fastq.gz
Binary file not shown.
Binary file added testdata/ex1.test.mutations.txt.gz
Binary file not shown.
Binary file added testdata/ex1.test.mutations.vcf.gz
Binary file not shown.
28 changes: 28 additions & 0 deletions testdata/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e

TESTDATADIR=$(dirname ${0});

# Decompress the test data
pushd $TESTDATADIR;
for FILE in $(ls -1 *gz)
do
gunzip -c ${FILE} > $(basename ${FILE} .gz);
done
popd

mkdir tmp

# Generate the new test data
./dwgsim -z 13 -N 10000 samtools/examples/ex1.fa ex1.test

# Test the differences
for FILE in $(ls -1 ex1.test*)
do
diff -q ${FILE} ${TESTDATADIR}/${FILE}
done

# Clean up the testdata
find ${TESTDATADIR} \! -name "*gz" -type f | grep -v sh$ | xargs rm;
rm -r tmp;

0 comments on commit 784004b

Please sign in to comment.