From e817eaa4dd013bc540c076ef2b4c752f72d5f54e Mon Sep 17 00:00:00 2001 From: Keerthan Jaic Date: Tue, 14 Apr 2015 11:33:06 -0400 Subject: [PATCH] use pytest to run core tests --- ci.sh | 1 - myhdl/test/core/Makefile | 2 +- .../test/{core2 => core}/test_ShadowSignal.py | 0 myhdl/test/core/test_all.py | 50 ------------------- myhdl/test/core2/Makefile | 2 - 5 files changed, 1 insertion(+), 54 deletions(-) rename myhdl/test/{core2 => core}/test_ShadowSignal.py (100%) delete mode 100644 myhdl/test/core/test_all.py delete mode 100644 myhdl/test/core2/Makefile diff --git a/ci.sh b/ci.sh index 862d98c5..701ba485 100755 --- a/ci.sh +++ b/ci.sh @@ -23,7 +23,6 @@ echo -e "Running $CI_TARGET tests\n" CI_TARGET=${CI_TARGET:-core} if [ "$CI_TARGET" == "core" ]; then run_test make -C myhdl/test/core - run_test make -C myhdl/test/core2 elif [ "$CI_TARGET" == "icarus" ]; then run_test make -C "myhdl/test/conversion/general" icarus run_test make -C cosimulation/icarus test diff --git a/myhdl/test/core/Makefile b/myhdl/test/core/Makefile index 72ddf460..15beb8c0 100644 --- a/myhdl/test/core/Makefile +++ b/myhdl/test/core/Makefile @@ -1,5 +1,5 @@ all: - python test_all.py + py.test clean: - rm *.pyc *~ diff --git a/myhdl/test/core2/test_ShadowSignal.py b/myhdl/test/core/test_ShadowSignal.py similarity index 100% rename from myhdl/test/core2/test_ShadowSignal.py rename to myhdl/test/core/test_ShadowSignal.py diff --git a/myhdl/test/core/test_all.py b/myhdl/test/core/test_all.py deleted file mode 100644 index 56acc97c..00000000 --- a/myhdl/test/core/test_all.py +++ /dev/null @@ -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() diff --git a/myhdl/test/core2/Makefile b/myhdl/test/core2/Makefile deleted file mode 100644 index d4b3a03d..00000000 --- a/myhdl/test/core2/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -all: - py.test