-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
69 lines (55 loc) · 2.37 KB
/
.travis.yml
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
59
60
61
62
63
64
65
66
67
68
69
dist: trusty
language: c
sudo: false
addons:
apt:
# sources:
# - ubuntu-toolchain-r-test
packages:
- csh
- verilator
# - build-essential
install:
# Current working directory: /home/travis/build/akashlevy/CGRAGenerator
- git clone https://github.com/akashlevy/TestBenchGenerator.git
--branch master ../TestBenchGenerator
# Install python for testing infrastructure
# All this just to get python3 => python3.6 or better
# Because TBG (and LT unit tests) need python 3.6 or better
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -u -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
# Needed by TestBenchGenerator
- pip install delegator.py
script:
# "You can sandwich the stuff in script with set -e and set +e."
# set -e => exit on failure.
- set -e
################################################################
# Fifteen minutes for LT unit tests (background)
# Install python dependencies
- pip install pytest numpy delegator.py bit_vector==0.42a0
- pip install git+git://github.com/akashlevy/pe.git
# Run python based tests
- cd $TRAVIS_BUILD_DIR/tests/test_pe
# Set env variables for genesis (installed earlier)
- export GENESIS_HOME=/tmp/Genesis2/Genesis2Tools
- export PATH=$GENESIS_HOME/bin:$GENESIS_HOME/gui/bin:$PATH
- export PERL5LIB=$GENESIS_HOME/PerlLibs/ExtrasForOldPerlDistributions:$PERL5LIB
- echo 'Fifteen minutes for LT unit tests (background)'
- ../../bin/generate.csh
- pytest >& $TRAVIS_BUILD_DIR/pytest.log &
########################################################################
- echo "Twenty-five minutes (1500s) for travis system tests"
- cd $TRAVIS_BUILD_DIR/testdir; make SILENT=TRUE travis_system_tests MEMHEIGHT=short
########################################################################
# Summarize results here at the end
- cat $TRAVIS_BUILD_DIR/pytest.log
- grep RESULT $TRAVIS_BUILD_DIR/testdir/serpent_results.tmp | grep -v echo
# Did LT tests pass!!?? If not, print results and FAIL
- grep FAILURES $TRAVIS_BUILD_DIR/pytest.log && cat $TRAVIS_BUILD_DIR/pytest.log || echo "Lenny unit tests PASSED"
- grep FAILURES $TRAVIS_BUILD_DIR/pytest.log && exit 13 || echo okay