test-suite-debian7-64bits-gcc-4.7.sh 2.34 KB
Newer Older
Charles Deltel's avatar
Charles Deltel committed
1
#!/bin/bash
Charles Deltel's avatar
Charles Deltel committed
2
3
4
5
6
7
8
9
10
#--------------------------------------------------------------#
#         Continuous integration script for Jenkins            #
#--------------------------------------------------------------#
#
# Default mode : 
# This script will exit with error (exit code 1) if any of its steps fails. 
# To change this behaviour, launch the script with the DEBUG argument.
#--------------------------------------------------------------#
 
Charles Deltel's avatar
Charles Deltel committed
11
[ "$DEBUG" != "true" ] && { set -e ; } || { echo "DEBUG mode, the script will NOT stop..." ; }
Charles Deltel's avatar
Charles Deltel committed
12
set -xv
Charles Deltel's avatar
Charles Deltel committed
13

Charles Deltel's avatar
Charles Deltel committed
14
15
16
17
date
hostname
pwd

Charles Deltel's avatar
Charles Deltel committed
18
19
20
21
22
23
24
echo "
--------------------------
 Jenkins build parameters
--------------------------
GIT_TAG : $GIT_TAG
DEBUG   : $DEBUG
"
Charles Deltel's avatar
Charles Deltel committed
25

Charles Deltel's avatar
Charles Deltel committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
################################################################
#                       COMPILATION                            #
################################################################

gcc --version
g++ --version

[ `gcc -dumpversion` = 4.7 ] && { echo "GCC 4.7"; } || { echo "GCC version is not 4.7, we exit"; exit 1; }

JENKINS_TASK=test-suite-debian7-64bits-gcc-4.7
GIT_DIR=/builds/workspace/$JENKINS_TASK/gatb-core
BUILD_DIR=/scratchdir/$JENKINS_TASK/gatb-core/build

rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR

cd $BUILD_DIR
 
cmake -Wno-dev $GIT_DIR

make

################################################################
#                       UNIT TESTS                             #
################################################################
export CPPUNIT_VERBOSE=1

# Specify single unit tests
#$BUILD_DIR/bin/gatb-core-cppunit TestBag
#$BUILD_DIR/bin/gatb-core-cppunit TestMap

# Launch the full test suite
$BUILD_DIR/bin/gatb-core-cppunit

################################################################
#    CHECK FUNCTIONS (with precomputed reference results)      #
################################################################

# Note: if "dgbh5 -check" fails, exit code will be 1 (0 otherwise), and the Jenkins build will be reported as FAILED

$BUILD_DIR/bin/dbgh5 -verbose 0 -in $HOME/reference/fastq/aphid_662451seq.fa               -check $HOME/reference/check/aphid_662451.props

$BUILD_DIR/bin/dbgh5 -verbose 0 -in $HOME/reference/fastq/aphid_662451seq.album/album.txt  -check $HOME/reference/check/aphid_662451.props

$BUILD_DIR/bin/dbgh5 -verbose 0 -in $HOME/reference/fastq/SRR959239_clean.fastq.gz         -check $HOME/reference/check/SRR959239_clean.props