Skip to content

Commit 784004b

Browse files
authored
Adding travis-ci with a basic regression check. (#37)
1 parent 64a92a2 commit 784004b

8 files changed

Lines changed: 38 additions & 0 deletions

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sudo: required
2+
language: c
3+
compiler:
4+
- clang
5+
- gcc
6+
script: make && make test

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ dist:clean
7171
tar -vcf dwgsim-${PACKAGE_VERSION}.tar dwgsim-${PACKAGE_VERSION}; \
7272
gzip -9 dwgsim-${PACKAGE_VERSION}.tar; \
7373
rm -rv dwgsim-${PACKAGE_VERSION};
74+
75+
test:
76+
if [ -d tmp ]; then rm -r tmp; fi
77+
/bin/bash testdata/test.sh

testdata/ex1.test.bfast.fastq.gz

972 KB
Binary file not shown.
531 KB
Binary file not shown.
531 KB
Binary file not shown.

testdata/ex1.test.mutations.txt.gz

58 Bytes
Binary file not shown.

testdata/ex1.test.mutations.vcf.gz

319 Bytes
Binary file not shown.

testdata/test.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
TESTDATADIR=$(dirname ${0});
6+
7+
# Decompress the test data
8+
pushd $TESTDATADIR;
9+
for FILE in $(ls -1 *gz)
10+
do
11+
gunzip -c ${FILE} > $(basename ${FILE} .gz);
12+
done
13+
popd
14+
15+
mkdir tmp
16+
17+
# Generate the new test data
18+
./dwgsim -z 13 -N 10000 samtools/examples/ex1.fa ex1.test
19+
20+
# Test the differences
21+
for FILE in $(ls -1 ex1.test*)
22+
do
23+
diff -q ${FILE} ${TESTDATADIR}/${FILE}
24+
done
25+
26+
# Clean up the testdata
27+
find ${TESTDATADIR} \! -name "*gz" -type f | grep -v sh$ | xargs rm;
28+
rm -r tmp;

0 commit comments

Comments
 (0)