summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 5221e9458611a004de56899cecbb7b3704d80680 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
language: python
python:
        - 2.6
        # cf. https://github.com/travis-ci/travis-ci/issues/2219
        - "2.7_with_system_site_packages"
before_install:
        # http://docs.travis-ci.com/user/installing-dependencies/#Installing-Ubuntu-packages
        # https://github.com/travis-ci/travis-ci/issues/2124#issuecomment-38992012
        - sudo apt-get update -qq
        # speed the run up
        - python2 -c
          'from sys import exit, version_info as v; exit(v[:2] in ((2, 7), (3, 2)))'
          || sudo apt-get install -qq python-lxml python-distribute
install:
        - pushd __root__
        - python2 setup.py -q
            saveopts -f setup.cfg pkg_prepare
              --ra-metadata-dir="$(pwd)/cluster"
              --ccs-flatten="$(dirname $(pwd))/ccs_flatten"
              --editor="sed -i 's|\(force-block=\"\)false|\1true|;w /dev/stdout'"
        #- cat setup.cfg
        # make following robust enough to deal with pip pre-6.0(?)
        - true;{
               pip install --disable-pip-version-check -- pip >/dev/null
               && pip install --disable-pip-version-check -qe .[test,coverage]
               && pip install --disable-pip-version-check coveralls;
          } || {
               pip install --disable-pip-version-check -- pip 2>/dev/null >&2
               || pip install -qe .[test,coverage]
               && pip install  coveralls;
          } || {
               ret=$?;
               echo "LOGS>"; cat ~/.pip/pip.log ~/.cache/pip/log/debug.log 2>/dev/null;
               f() { return $1; }; f $ret;
          }
        - popd

before_script:
        - ulimit -S -c unlimited  # ensure cores are generated (~after_failure)

script: ./run-tests -c

after_failure:
        - sudo apt-get install -qq gdb libc6-dbg
        # examine core files
        # TODO: eu-readelf -n binary|sed -n 's/^.*Build ID: //p'
        #       etc. to ensure build-id match
        - find -name 'core*' -print0
          | xargs -0I@ -- sh -xc
            'file "@";
             gdb -se $(file "@" | sed -n "s|.* core file .* from \x27\([^\x27 ]*\).*|\1|p")
                 -c "@" -batch -ex "t a a bt f" -ex "set pagination 0"'

after_success:
        coveralls

notifications:
        irc: "irc.freenode.net#clusterlabs-dev"