mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
use pytest to run core tests
This commit is contained in:
parent
f7e1f0cfe0
commit
e817eaa4dd
1
ci.sh
1
ci.sh
@ -23,7 +23,6 @@ echo -e "Running $CI_TARGET tests\n"
|
|||||||
CI_TARGET=${CI_TARGET:-core}
|
CI_TARGET=${CI_TARGET:-core}
|
||||||
if [ "$CI_TARGET" == "core" ]; then
|
if [ "$CI_TARGET" == "core" ]; then
|
||||||
run_test make -C myhdl/test/core
|
run_test make -C myhdl/test/core
|
||||||
run_test make -C myhdl/test/core2
|
|
||||||
elif [ "$CI_TARGET" == "icarus" ]; then
|
elif [ "$CI_TARGET" == "icarus" ]; then
|
||||||
run_test make -C "myhdl/test/conversion/general" icarus
|
run_test make -C "myhdl/test/conversion/general" icarus
|
||||||
run_test make -C cosimulation/icarus test
|
run_test make -C cosimulation/icarus test
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
all:
|
all:
|
||||||
python test_all.py
|
py.test
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- rm *.pyc *~
|
- rm *.pyc *~
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
# This file is part of the myhdl library, a Python package for using
|
|
||||||
# Python as a Hardware Description Language.
|
|
||||||
#
|
|
||||||
# Copyright (C) 2003-2008 Jan Decaluwe
|
|
||||||
#
|
|
||||||
# The myhdl library is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the GNU Lesser General Public License as
|
|
||||||
# published by the Free Software Foundation; either version 2.1 of the
|
|
||||||
# License, or (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This library is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
# Lesser General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
|
||||||
# License along with this library; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
""" Run all myhdl unit tests. """
|
|
||||||
from __future__ import absolute_import
|
|
||||||
|
|
||||||
|
|
||||||
import test_Simulation, test_Signal, test_intbv, test_Cosimulation, test_misc, \
|
|
||||||
test_always_comb, test_bin, test_traceSignals, test_enum, test_concat, \
|
|
||||||
test_inferWaiter, test_always, test_instance, test_signed, \
|
|
||||||
test_modbv
|
|
||||||
|
|
||||||
modules = (test_Simulation, test_Signal, test_intbv, test_misc, test_always_comb,
|
|
||||||
test_bin, test_traceSignals, test_enum, test_concat,
|
|
||||||
test_inferWaiter, test_always, test_instance, test_signed,
|
|
||||||
test_modbv
|
|
||||||
)
|
|
||||||
|
|
||||||
import unittest
|
|
||||||
|
|
||||||
tl = unittest.defaultTestLoader
|
|
||||||
def suite():
|
|
||||||
alltests = unittest.TestSuite()
|
|
||||||
for m in modules:
|
|
||||||
alltests.addTest(tl.loadTestsFromModule(m))
|
|
||||||
return alltests
|
|
||||||
|
|
||||||
def main():
|
|
||||||
unittest.main(defaultTest='suite',
|
|
||||||
testRunner=unittest.TextTestRunner(verbosity=2))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
@ -1,2 +0,0 @@
|
|||||||
all:
|
|
||||||
py.test
|
|
Loading…
x
Reference in New Issue
Block a user