summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: bb9eff43b365929c553c7e13b016f7f2bc2db008 (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
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
        - python -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:
        - cd __root__
        - python 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];
          } || {
               pip install --disable-pip-version-check -- pip 2>/dev/null >&2
               || pip install -qe .[test];
          } || {
               ret=$?;
               echo "LOGS>"; cat ~/.pip/pip.log ~/.cache/pip/log/debug.log 2>/dev/null;
               f() { return $1; }; f $ret;
          }

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

script: ./run-tests

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"'