Skip to content

Commit

Permalink
Merge pull request #47 from jck/travis-container
Browse files Browse the repository at this point in the history
travis: use container based infrastructure
  • Loading branch information
jandecaluwe committed Mar 31, 2015
2 parents 0f377e1 + 9fc795c commit 39ddc36
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 24 deletions.
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

language: python
python:
- "2.6"
- "2.7"
- "pypy"
- "3.4"

before_install:
- if [ $CI_TARGET == "icarus" ]; then
sudo apt-get update -qq;
sudo apt-get install -y iverilog;
elif [ $CI_TARGET == "ghdl" ]; then
sudo apt-add-repository -y ppa:pgavin/ghdl;
sudo apt-get update -qq;
sudo apt-get install -y ghdl;
fi
addons:
apt:
sources:
- pgavin-ghdl
packages:
- iverilog
- ghdl

install:
- pip install .
Expand All @@ -22,6 +23,7 @@ env:
- CI_TARGET=core
- CI_TARGET=icarus
- CI_TARGET=ghdl
- CI_TARGET=bugs

matrix:
allow_failures:
Expand Down
3 changes: 3 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ elif [ "$CI_TARGET" == "icarus" ]; then
elif [ "$CI_TARGET" == "ghdl" ]; then
run_test make -C "myhdl/test/conversion/general" GHDL
run_test make -C myhdl/test/conversion/toVHDL GHDL
elif [ "$CI_TARGET" == "bugs" ]; then
run_test make -C "myhdl/test/bugs" icarus
run_test make -C "myhdl/test/bugs" GHDL
fi

exit $foundError
2 changes: 1 addition & 1 deletion cosimulation/modelsim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
WARNS=-Wall

# change this path to point to the pli include files directory for cver
INCS=-I /opt/Altera/11.0/modelsim_ase/include
INCS=-I $(shell dirname `which vsim`)/../include

# maybe want -O<something> and/or -g

Expand Down
1 change: 1 addition & 0 deletions myhdl/_modbv.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from __future__ import absolute_import

from ._intbv import intbv
from ._compat import long

class modbv(intbv):
__slots__ = []
Expand Down
10 changes: 5 additions & 5 deletions myhdl/test/bugs/test_bug_1740778.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ def bug_1740778 ():
def logic():
v = intbv(0, min=-15, max=45)
yield delay(10)
print v.min
print v.max
print s.val
print s.min
print s.max
print(v.min)
print(v.max)
print(s.val)
print(s.min)
print(s.max)

return logic

Expand Down
4 changes: 2 additions & 2 deletions myhdl/test/bugs/test_bug_1835792.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def bug_1835792 ():
def logic():
v = intbv(0, min=-15, max=45)
yield delay(10)
print v.min;
print v.max;
print(v.min);
print(v.max);

return logic

Expand Down
4 changes: 2 additions & 2 deletions myhdl/test/bugs/test_bug_1835797.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def logic():
v = intbv(0, min=-15, max=45)
"""Wrongly placed docstring"""
yield delay(10)
print v.min
print v.max
print(v.min)
print(v.max)

return logic

Expand Down
2 changes: 1 addition & 1 deletion myhdl/test/bugs/test_bug_39.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def check():
d.next = 0
for i in range(100):
yield delay(10)
print rx
print(rx)
a.next = (a + 37) % 256
b.next = (b + 67) % 256
c.next = (c + 97) % 256
Expand Down
4 changes: 2 additions & 2 deletions myhdl/test/bugs/test_bug_44.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def dec():
def tb_stimulus():
# My logic happens on posedge, so I'll perform all checks on negedge.
yield clk.negedge
for x_val in xrange(-2**WIDTH, 2**WIDTH):
for x_val in range(-2**WIDTH, 2**WIDTH):
#print('x_val={} x.next={}'.format(x_val, x_val % 2**WIDTH))
x.next = x_val % 2**WIDTH
yield clk.negedge
Expand All @@ -36,6 +36,6 @@ def tb_stimulus():
tb = instances()

def test_bug_44():
print instances()
print(instances())
Simulation(tb).run()

2 changes: 1 addition & 1 deletion myhdl/test/bugs/test_bug_aj1s.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def seq():
count.next = 50
for i in range(300):
yield delay(10)
print count
print(count)
if count-1 < 0:
count.next = 97
else:
Expand Down
2 changes: 1 addition & 1 deletion myhdl/test/bugs/test_issue_10_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def doit():
yield delay(10)
conc.next = concat(flags, position)
yield delay(10)
print conc
print(conc)
return doit

def test_issue_10_2():
Expand Down

0 comments on commit 39ddc36

Please sign in to comment.