cocotb 1.9.2__cp311-cp311-win_amd64.whl → 2.0.0rc2__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cocotb might be problematic. Click here for more details.
- cocotb/_ANSI.py +65 -0
- cocotb/__init__.py +81 -327
- cocotb/_base_triggers.py +515 -0
- cocotb/_bridge.py +186 -0
- cocotb/_decorators.py +515 -0
- cocotb/_deprecation.py +3 -3
- cocotb/_exceptions.py +7 -0
- cocotb/_extended_awaitables.py +419 -0
- cocotb/_gpi_triggers.py +385 -0
- cocotb/_init.py +301 -0
- cocotb/_outcomes.py +54 -0
- cocotb/_profiling.py +46 -0
- cocotb/_py_compat.py +114 -29
- cocotb/_scheduler.py +448 -0
- cocotb/_test.py +248 -0
- cocotb/_test_factory.py +312 -0
- cocotb/_test_functions.py +42 -0
- cocotb/_typing.py +7 -0
- cocotb/_utils.py +274 -0
- cocotb/_version.py +3 -7
- cocotb/_xunit_reporter.py +66 -0
- cocotb/clock.py +353 -108
- cocotb/debug.py +24 -0
- cocotb/handle.py +1370 -793
- cocotb/libs/cocotb.dll +0 -0
- cocotb/libs/cocotb.exp +0 -0
- cocotb/libs/cocotb.lib +0 -0
- cocotb/libs/cocotbfli_modelsim.dll +0 -0
- cocotb/libs/cocotbfli_modelsim.exp +0 -0
- cocotb/libs/cocotbfli_modelsim.lib +0 -0
- cocotb/libs/cocotbutils.dll +0 -0
- cocotb/libs/cocotbutils.exp +0 -0
- cocotb/libs/cocotbutils.lib +0 -0
- cocotb/libs/cocotbvhpi_aldec.dll +0 -0
- cocotb/libs/cocotbvhpi_aldec.exp +0 -0
- cocotb/libs/cocotbvhpi_aldec.lib +0 -0
- cocotb/libs/cocotbvhpi_modelsim.dll +0 -0
- cocotb/libs/cocotbvhpi_modelsim.exp +0 -0
- cocotb/libs/cocotbvhpi_modelsim.lib +0 -0
- cocotb/libs/cocotbvpi_aldec.dll +0 -0
- cocotb/libs/cocotbvpi_aldec.exp +0 -0
- cocotb/libs/cocotbvpi_aldec.lib +0 -0
- cocotb/libs/cocotbvpi_ghdl.dll +0 -0
- cocotb/libs/cocotbvpi_ghdl.exp +0 -0
- cocotb/libs/cocotbvpi_ghdl.lib +0 -0
- cocotb/libs/cocotbvpi_icarus.exp +0 -0
- cocotb/libs/cocotbvpi_icarus.lib +0 -0
- cocotb/libs/cocotbvpi_icarus.vpl +0 -0
- cocotb/libs/cocotbvpi_modelsim.dll +0 -0
- cocotb/libs/cocotbvpi_modelsim.exp +0 -0
- cocotb/libs/cocotbvpi_modelsim.lib +0 -0
- cocotb/libs/embed.dll +0 -0
- cocotb/libs/embed.exp +0 -0
- cocotb/libs/embed.lib +0 -0
- cocotb/libs/gpi.dll +0 -0
- cocotb/libs/gpi.exp +0 -0
- cocotb/libs/gpi.lib +0 -0
- cocotb/libs/gpilog.dll +0 -0
- cocotb/libs/gpilog.exp +0 -0
- cocotb/libs/gpilog.lib +0 -0
- cocotb/libs/pygpilog.dll +0 -0
- cocotb/libs/pygpilog.exp +0 -0
- cocotb/libs/pygpilog.lib +0 -0
- cocotb/logging.py +424 -0
- cocotb/queue.py +103 -57
- cocotb/regression.py +680 -717
- cocotb/result.py +17 -188
- cocotb/share/def/aldec.exp +0 -0
- cocotb/share/def/aldec.lib +0 -0
- cocotb/share/def/ghdl.exp +0 -0
- cocotb/share/def/ghdl.lib +0 -0
- cocotb/share/def/icarus.exp +0 -0
- cocotb/share/def/icarus.lib +0 -0
- cocotb/share/def/modelsim.def +1 -0
- cocotb/share/def/modelsim.exp +0 -0
- cocotb/share/def/modelsim.lib +0 -0
- cocotb/share/include/cocotb_utils.h +9 -32
- cocotb/share/include/embed.h +7 -30
- cocotb/share/include/gpi.h +331 -137
- cocotb/share/include/gpi_logging.h +221 -142
- cocotb/share/include/py_gpi_logging.h +8 -5
- cocotb/share/include/vpi_user_ext.h +4 -26
- cocotb/share/lib/verilator/verilator.cpp +80 -67
- cocotb/simtime.py +230 -0
- cocotb/simulator.cp311-win_amd64.exp +0 -0
- cocotb/simulator.cp311-win_amd64.lib +0 -0
- cocotb/simulator.cp311-win_amd64.pyd +0 -0
- cocotb/simulator.pyi +107 -0
- cocotb/task.py +478 -213
- cocotb/triggers.py +55 -1092
- cocotb/types/__init__.py +28 -47
- cocotb/types/_abstract_array.py +151 -0
- cocotb/types/_array.py +295 -0
- cocotb/types/_indexing.py +17 -0
- cocotb/types/_logic.py +333 -0
- cocotb/types/_logic_array.py +868 -0
- cocotb/types/{range.py → _range.py} +47 -48
- cocotb/types/_resolve.py +76 -0
- cocotb/utils.py +58 -646
- cocotb-2.0.0rc2.dist-info/METADATA +60 -0
- cocotb-2.0.0rc2.dist-info/RECORD +146 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0rc2.dist-info}/WHEEL +1 -1
- cocotb-2.0.0rc2.dist-info/entry_points.txt +2 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0rc2.dist-info/licenses}/LICENSE +1 -0
- {cocotb-1.9.2.dist-info → cocotb-2.0.0rc2.dist-info}/top_level.txt +1 -0
- cocotb_tools/__init__.py +0 -0
- cocotb_tools/_coverage.py +33 -0
- cocotb_tools/_vendor/__init__.py +3 -0
- cocotb_tools/check_results.py +65 -0
- cocotb_tools/combine_results.py +152 -0
- cocotb_tools/config.py +241 -0
- {cocotb → cocotb_tools}/ipython_support.py +29 -22
- cocotb_tools/makefiles/Makefile.deprecations +27 -0
- {cocotb/share → cocotb_tools}/makefiles/Makefile.inc +77 -55
- {cocotb/share → cocotb_tools}/makefiles/Makefile.sim +16 -33
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.activehdl +9 -16
- cocotb_tools/makefiles/simulators/Makefile.cvc +61 -0
- cocotb_tools/makefiles/simulators/Makefile.dsim +39 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.ghdl +13 -42
- cocotb_tools/makefiles/simulators/Makefile.icarus +80 -0
- cocotb_tools/makefiles/simulators/Makefile.ius +93 -0
- cocotb_tools/makefiles/simulators/Makefile.modelsim +9 -0
- cocotb_tools/makefiles/simulators/Makefile.nvc +60 -0
- cocotb_tools/makefiles/simulators/Makefile.questa +29 -0
- cocotb/share/makefiles/simulators/Makefile.questa → cocotb_tools/makefiles/simulators/Makefile.questa-compat +26 -54
- cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun +149 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.riviera +17 -56
- cocotb_tools/makefiles/simulators/Makefile.vcs +65 -0
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.verilator +15 -22
- {cocotb/share → cocotb_tools}/makefiles/simulators/Makefile.xcelium +20 -52
- cocotb_tools/py.typed +0 -0
- cocotb_tools/runner.py +1868 -0
- cocotb/_sim_versions.py → cocotb_tools/sim_versions.py +16 -21
- pygpi/entry.py +34 -18
- pygpi/py.typed +0 -0
- cocotb/ANSI.py +0 -92
- cocotb/binary.py +0 -858
- cocotb/config.py +0 -289
- cocotb/decorators.py +0 -332
- cocotb/log.py +0 -303
- cocotb/memdebug.py +0 -35
- cocotb/outcomes.py +0 -56
- cocotb/runner.py +0 -1400
- cocotb/scheduler.py +0 -1099
- cocotb/share/makefiles/Makefile.deprecations +0 -12
- cocotb/share/makefiles/simulators/Makefile.cvc +0 -94
- cocotb/share/makefiles/simulators/Makefile.icarus +0 -111
- cocotb/share/makefiles/simulators/Makefile.ius +0 -125
- cocotb/share/makefiles/simulators/Makefile.modelsim +0 -32
- cocotb/share/makefiles/simulators/Makefile.nvc +0 -64
- cocotb/share/makefiles/simulators/Makefile.vcs +0 -98
- cocotb/types/array.py +0 -309
- cocotb/types/logic.py +0 -292
- cocotb/types/logic_array.py +0 -298
- cocotb/wavedrom.py +0 -199
- cocotb/xunit_reporter.py +0 -80
- cocotb-1.9.2.dist-info/METADATA +0 -168
- cocotb-1.9.2.dist-info/RECORD +0 -121
- cocotb-1.9.2.dist-info/entry_points.txt +0 -2
- /cocotb/{_vendor/__init__.py → py.typed} +0 -0
- {cocotb → cocotb_tools}/_vendor/distutils_version.py +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cocotb
|
|
3
|
+
Version: 2.0.0rc2
|
|
4
|
+
Summary: cocotb is a coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python.
|
|
5
|
+
Home-page: https://www.cocotb.org
|
|
6
|
+
Author: Chris Higgs, Stuart Hodgson
|
|
7
|
+
Maintainer: cocotb contributors
|
|
8
|
+
Maintainer-email: cocotb@lists.librecores.org
|
|
9
|
+
License: BSD-3-Clause
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/cocotb/cocotb/issues
|
|
11
|
+
Project-URL: Source Code, https://github.com/cocotb/cocotb
|
|
12
|
+
Project-URL: Documentation, https://docs.cocotb.org
|
|
13
|
+
Platform: any
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
|
|
24
|
+
Classifier: Framework :: cocotb
|
|
25
|
+
Requires-Python: >=3.6.2
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: find_libpython
|
|
29
|
+
Dynamic: author
|
|
30
|
+
Dynamic: classifier
|
|
31
|
+
Dynamic: description
|
|
32
|
+
Dynamic: description-content-type
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
Dynamic: maintainer
|
|
37
|
+
Dynamic: maintainer-email
|
|
38
|
+
Dynamic: platform
|
|
39
|
+
Dynamic: project-url
|
|
40
|
+
Dynamic: requires-dist
|
|
41
|
+
Dynamic: requires-python
|
|
42
|
+
Dynamic: summary
|
|
43
|
+
|
|
44
|
+
**cocotb** is a framework empowering users to write VHDL and Verilog testbenches in Python.
|
|
45
|
+
|
|
46
|
+
[](https://docs.cocotb.org/en/stable/)
|
|
47
|
+
[](https://github.com/cocotb/cocotb/actions/workflows/build-test-dev.yml)
|
|
48
|
+
[](https://pypi.org/project/cocotb/)
|
|
49
|
+
[](https://gitpod.io/#https://github.com/cocotb/cocotb)
|
|
50
|
+
[](https://codecov.io/gh/cocotb/cocotb)
|
|
51
|
+
|
|
52
|
+
* Check out the [tutorial](https://docs.cocotb.org/en/stable/quickstart.html)
|
|
53
|
+
* Read the [docs](https://docs.cocotb.org/en/stable/)
|
|
54
|
+
* Find more info in the [wiki](https://github.com/cocotb/cocotb/wiki)
|
|
55
|
+
* Discover [useful extensions](https://github.com/cocotb/cocotb/wiki/Further-Resources#utility-libraries-and-frameworks)
|
|
56
|
+
* Join the discussion in the [Gitter chat room](https://gitter.im/cocotb/Lobby)
|
|
57
|
+
* [Ask a question](https://github.com/cocotb/cocotb/discussions)
|
|
58
|
+
* [Raise a bug / request an enhancement](https://github.com/cocotb/cocotb/issues/new)
|
|
59
|
+
|
|
60
|
+
**Note: The current `master` branch of the cocotb repository is expected to be released as cocotb 2.0, which contains API-breaking changes from previous 1.x releases.**
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
cocotb/_ANSI.py,sha256=LIywDKSZXT5TuKq24YO4_c0lF-02wJYbQ50Ko_T4PJY,2272
|
|
2
|
+
cocotb/__init__.py,sha256=ytXW8EBeHwDddWwPArzeq8tNWy1tRShpU1UEte3_NgQ,3254
|
|
3
|
+
cocotb/_base_triggers.py,sha256=SNaN-K-wzLJjq5IFTlyvCkzZ9ExwqoXJg7YOvWAz_e0,16083
|
|
4
|
+
cocotb/_bridge.py,sha256=BAw73PpnTa-CCFkGt9Z9BM3AefdmzLWV8jCLYIOz-lw,6196
|
|
5
|
+
cocotb/_decorators.py,sha256=uBpX4LSj9zeIU7s3dWpQW92CJF94eNnZjKeoTZJLzc0,17916
|
|
6
|
+
cocotb/_deprecation.py,sha256=wgNE4GMapfvCzf4m6_dXg2FsOUGQnjpUU8erc5chRlo,1264
|
|
7
|
+
cocotb/_exceptions.py,sha256=FdlfgAG7yBT9l7mfhS_223fWtWei--3vMay1vsLhiOM,257
|
|
8
|
+
cocotb/_extended_awaitables.py,sha256=7WQrkh-Ad6DV1qXNOVi8Ic50MJiGrrrqcYqKjMWd34w,13908
|
|
9
|
+
cocotb/_gpi_triggers.py,sha256=G9xHsfKer0PLAOq-zQcesjf7PEBAfEb2S79ZJxgXaRo,13567
|
|
10
|
+
cocotb/_init.py,sha256=V3WT9OtdqE5Ng9Z-ahaFDmbgPR4jQ5qxU59LNZ-lSTc,10681
|
|
11
|
+
cocotb/_outcomes.py,sha256=r_PRvT2Yg3RQLwaFjOkCxo1G3h_DqPMljHc_eSe6cmo,1365
|
|
12
|
+
cocotb/_profiling.py,sha256=yk5aBDIVTIn6bxvW5a_EKpPwIt-dFU9ti7JbvBhOyuU,1152
|
|
13
|
+
cocotb/_py_compat.py,sha256=av_8OUaDUpMIuf6weE-gYxgmNqiA1z4ry7brzGl5fuY,3880
|
|
14
|
+
cocotb/_scheduler.py,sha256=O7eMLk967Y4POenXLITgPcw2TpWXX542qIskiyXlr3c,20351
|
|
15
|
+
cocotb/_test.py,sha256=A1XkTUB8OrkPOOLE3igX8Pt_vCmHq1Xmmix_L4E4l8k,8439
|
|
16
|
+
cocotb/_test_factory.py,sha256=EEuZAWWMcwFqaEp0XqiYvRUxSZbjuRu1IZNjp6N702I,11927
|
|
17
|
+
cocotb/_test_functions.py,sha256=nAef7y_MSGnHPL9NWnGay0WNwhknDWq5v03W0dS1xJs,1164
|
|
18
|
+
cocotb/_typing.py,sha256=2VQIYOlzZR8F5bmi7WK_j_NdNl_Kl7g0DM_XpQo6zrY,337
|
|
19
|
+
cocotb/_utils.py,sha256=DPeKRP7PARMJiBOEvHv-HcJbwSIAIo7DqnmqDnAuzm4,8481
|
|
20
|
+
cocotb/_version.py,sha256=8b5YwveFmhXomHhjDgTw28Qkz6vsEjAuoL7UkoZD3lU,98
|
|
21
|
+
cocotb/_xunit_reporter.py,sha256=1Su41GFrI55Tz9GSuXQHpFjao8F_RVGTbNsTnEYa4BU,2516
|
|
22
|
+
cocotb/clock.py,sha256=gTmxt6LcDyZ1lS5dX9gW4WL5XjpG8S19_dDovciLdTo,14335
|
|
23
|
+
cocotb/debug.py,sha256=OsvxKAf5lCTw0W50_8wPqwfMN9KbQT9Ep2MAGtjf6NM,816
|
|
24
|
+
cocotb/handle.py,sha256=1_RgF8yx2q1Y44JhtWq4OBK9tp_bBpZGfamWIBk5AsI,62849
|
|
25
|
+
cocotb/logging.py,sha256=Y5pQbP3MVwJabIp9VMKI5jD93xD5PUWlj4cwCQjuE8g,14247
|
|
26
|
+
cocotb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
cocotb/queue.py,sha256=i9jYA5r3ihpVF8LmZd-O7s7MMtOvJoZeNm5NzF6Ln8o,6698
|
|
28
|
+
cocotb/regression.py,sha256=llXaAHZCcMS_gqr4O7FFPfwmWSF-rrHbB44TDaYWyog,29786
|
|
29
|
+
cocotb/result.py,sha256=-Np4hFX9qMJsZ8KtTAfMWOpBim_funkViV0oRc0xo3I,1203
|
|
30
|
+
cocotb/simtime.py,sha256=wHg07UBDwiCbVqS9CjzTP3-Zvh0FKvLBntvIveTCrc8,6668
|
|
31
|
+
cocotb/simulator.cp311-win_amd64.exp,sha256=JW6I6Fnp37mPCrUc-wA68924qVjgZU-tRtnK8LsYWow,759
|
|
32
|
+
cocotb/simulator.cp311-win_amd64.lib,sha256=ERgTV6MSOr4olptkeYrU51UwuZ44pZf3g8CXaBUcU0Y,2048
|
|
33
|
+
cocotb/simulator.cp311-win_amd64.pyd,sha256=5R7wO1sSHyBG2guHDRsk5-0no3WEO2ssFa7CwULNpCc,38912
|
|
34
|
+
cocotb/simulator.cp311-win_amd64.pyd.2.config,sha256=JGoavZmGw71REMRGu8DrBlQezZSCkQx7E3GOzGIf9_o,263
|
|
35
|
+
cocotb/simulator.pyi,sha256=Bk_UlfkoKKUi4XE4ZmXBN8AEPbNwQvDrcaaB_2XYIKA,3814
|
|
36
|
+
cocotb/task.py,sha256=opsqjgaUMwxdWOK7IVAjZJwt1BJfXksWAblLz8ojrNE,21076
|
|
37
|
+
cocotb/triggers.py,sha256=_AnYLLtlcwliRvqXu3qKmlSGgu-yercYwpOFZfrZd4w,1450
|
|
38
|
+
cocotb/utils.py,sha256=hDN5jlImp8fAyBHZQXQfvKMViQKiUZqHTc1_nzETiNk,3491
|
|
39
|
+
cocotb/libs/cocotb.dll,sha256=_rNyKqxHboCrl3C--BSUnZdP9BdEg7R0Kb8iVOzCRsM,18944
|
|
40
|
+
cocotb/libs/cocotb.exp,sha256=Llv714zYL7lGWL_YVIxl5yO50wxTQ5aGxIY1a4opOcA,1109
|
|
41
|
+
cocotb/libs/cocotb.lib,sha256=qtiwA_JkiK2me2ubMMd5SxxoAC5wmYcUlQc5ay5C3cc,2358
|
|
42
|
+
cocotb/libs/cocotbfli_modelsim.dll,sha256=s4xDXIRMr5k7opmGsnnE8A1PtTuXFjEamIjuPovEpqI,96256
|
|
43
|
+
cocotb/libs/cocotbfli_modelsim.exp,sha256=59DN2qqHbH42rRI-cXKRaw7OLuixkFRlIQ0jmYtDn6k,875
|
|
44
|
+
cocotb/libs/cocotbfli_modelsim.lib,sha256=-9kBid-DG2f5z0Z9CiduoifgwpDCU8QWQYjInuMNW_s,2176
|
|
45
|
+
cocotb/libs/cocotbutils.dll,sha256=qGALC42wikm8oAtiNEdYJgkOLOWhTygOcIN3QnRLsw8,11776
|
|
46
|
+
cocotb/libs/cocotbutils.exp,sha256=8FWkooNXsAx6Lla7KwYMCamRpHN7EdHcfC0mwhqj3Ao,974
|
|
47
|
+
cocotb/libs/cocotbutils.lib,sha256=EHhJD0X1LPxhp9lb6TNVUyv9h9L4czAo_YZmXvCo5p4,2146
|
|
48
|
+
cocotb/libs/cocotbvhpi_aldec.dll,sha256=Vh07-NQPGwWHjB2v9x8CvEd8PZnRPHwYbdh1hqLRk8E,94720
|
|
49
|
+
cocotb/libs/cocotbvhpi_aldec.exp,sha256=WfLYgj81fxeqkizuOERpi51pP-EKEWTczzlj5yBxw9M,1073
|
|
50
|
+
cocotb/libs/cocotbvhpi_aldec.lib,sha256=cmbJQCo27j-xoEjPR7qoCuoPsjJdp4LX5vPpE8Shfks,2442
|
|
51
|
+
cocotb/libs/cocotbvhpi_modelsim.dll,sha256=6UfZRj06pLgpBZ7oJJLpq8yoiCrttVQmhAQJ36SMnbc,94720
|
|
52
|
+
cocotb/libs/cocotbvhpi_modelsim.exp,sha256=gPZotctW38dEyvguWL93fqY8jNpsEkcGY4zSPr4aBCM,1080
|
|
53
|
+
cocotb/libs/cocotbvhpi_modelsim.lib,sha256=-oiZely604KSwT2J2Tjc4_1Te7_WNX8xu4MKddUoCoA,2484
|
|
54
|
+
cocotb/libs/cocotbvpi_aldec.dll,sha256=hbIl-6orps9BVghwesOkPIS7YNIkeDz5ti2x7JX3FU4,83456
|
|
55
|
+
cocotb/libs/cocotbvpi_aldec.exp,sha256=5NoQLV1zQJKfqTCZTfgBj1iWQ83az6dYU_gFxvJfMl4,1068
|
|
56
|
+
cocotb/libs/cocotbvpi_aldec.lib,sha256=gm0Uv112vnmBjtqQl60DxiI2IlsKZDZdCznzPK8mmjc,2418
|
|
57
|
+
cocotb/libs/cocotbvpi_ghdl.dll,sha256=CurrE5C1r6ZewR0vS6R-wSILRbdVg8FklKaS9kFMhd8,83456
|
|
58
|
+
cocotb/libs/cocotbvpi_ghdl.exp,sha256=_007tfJ11YcieXk2cUceJh-4hyj_w8nERZ-F_ykVXm4,1067
|
|
59
|
+
cocotb/libs/cocotbvpi_ghdl.lib,sha256=IMrx9rIzSEsZSRaqQMpBX4qxIABKl6SpUbIKz0wNhfU,2408
|
|
60
|
+
cocotb/libs/cocotbvpi_icarus.exp,sha256=cdGdCaSG9pp6ND-m3kfAv6WvlHHf2KFaDpgsnCD7gVA,1071
|
|
61
|
+
cocotb/libs/cocotbvpi_icarus.lib,sha256=68QdmFqReSZqyDs1N0SeMix1rEEiuvtcTiRBb3p78NI,2438
|
|
62
|
+
cocotb/libs/cocotbvpi_icarus.vpl,sha256=2VtXUOY_8swrdVBZEz2kPjLzxaQvrgijAwHWAJliVdI,82944
|
|
63
|
+
cocotb/libs/cocotbvpi_modelsim.dll,sha256=Tv0pddet9p6gjrWW0W6FGKiuCV7FCEmt3no8gnnCvKU,83456
|
|
64
|
+
cocotb/libs/cocotbvpi_modelsim.exp,sha256=Mutxnx6FcRc0Fg0fsZ20wx6ZLkz8go1p9x1qy2jP67Q,1075
|
|
65
|
+
cocotb/libs/cocotbvpi_modelsim.lib,sha256=5kiZtX7oBUILlcMhmMOEQ4LKJLcRnVwpqZxLA9I_5qs,2468
|
|
66
|
+
cocotb/libs/embed.dll,sha256=VRmLIpNXwFa2hi5EUX3iHXJJtnKh214duFww8kz4iBU,12288
|
|
67
|
+
cocotb/libs/embed.exp,sha256=UIhvtjSVA221Mliwrjra1h7qjMQxlZRdLq5TmoDBg3o,1096
|
|
68
|
+
cocotb/libs/embed.lib,sha256=xUMQO0uGQ7EtcGdeQTwIQ1-u0zNXMvEvo_snwcdtllg,2322
|
|
69
|
+
cocotb/libs/gpi.dll,sha256=RzrDKJyRlroBuW1-Wf3nR0iFXfbweDHCKIvhwjYlk_o,58368
|
|
70
|
+
cocotb/libs/gpi.exp,sha256=2Mfz19uz8M1RyZgxArGUT9Id9rckdoOdJlB9a1QzEXQ,18647
|
|
71
|
+
cocotb/libs/gpi.lib,sha256=oHMnfCQSgR-N6uH4_DJ5w6hai8zkCb0n0SkaJcwEMNc,30614
|
|
72
|
+
cocotb/libs/gpilog.dll,sha256=NV6eAgqqIhr_dQCMQ5WGjDyUEsGroe8cXg6KrswVCfA,18944
|
|
73
|
+
cocotb/libs/gpilog.exp,sha256=S9-RBkScHiA07UNKL5wuCul0x5xWDoCRpNdGRS_IRi4,2196
|
|
74
|
+
cocotb/libs/gpilog.lib,sha256=thj4ksSTm3-PjqaWdPiYpSFfopq28wo3oJpokUbBROw,4156
|
|
75
|
+
cocotb/libs/pygpilog.dll,sha256=NY2gKV-fnpYzNne5zDmGfJsVlYcfyzzs1k-Avd2wMTA,20992
|
|
76
|
+
cocotb/libs/pygpilog.exp,sha256=Opktv5ti7fvMX2aTLnQnLs95USlVrhX-TEVk9FGhqew,988
|
|
77
|
+
cocotb/libs/pygpilog.lib,sha256=47Bo_HCcKUBajRFG2RB-WFGr-U7eDMfeiF1GzuILMDw,2174
|
|
78
|
+
cocotb/share/def/.gitignore,sha256=JYPaHghbqtLFl-9QtOWaAHvoDOhVxEewSYwHgoYYgf8,46
|
|
79
|
+
cocotb/share/def/README.md,sha256=dptv3zHQGzMqLt3Zv4XOd5IZeGqQS7Lwcq1XCs3BcR0,380
|
|
80
|
+
cocotb/share/def/aldec.def,sha256=ItgxVlRaVuD20jGTN3JpkbHEO8jPfU5XjFlUqDUXzlU,991
|
|
81
|
+
cocotb/share/def/aldec.exp,sha256=yXJETvzdX0mVc-wh4Wg9HI1pUKr7ICWdP-CivFrCDi8,7946
|
|
82
|
+
cocotb/share/def/aldec.lib,sha256=lsiICfAMsPJE6hrYSVdbdqBw8rjAVOhHZd119w_sagg,13498
|
|
83
|
+
cocotb/share/def/ghdl.def,sha256=ETQh5VI72dWSJi_ig5m163GfLrxScYUamt5BjHjoKsY,705
|
|
84
|
+
cocotb/share/def/ghdl.exp,sha256=Ei9RDlbobmUa27gCOBXP-n5PF3jUZvxPntqKuD6Q3yY,5771
|
|
85
|
+
cocotb/share/def/ghdl.lib,sha256=6M7KWc6tOsLKb2SAKVa0XJMXvMoL-vvjupI-g-3G6VM,9974
|
|
86
|
+
cocotb/share/def/icarus.def,sha256=VRqkgUyzR2sa916Ra56cZVIb4kzbqDlJVWIOc3389qY,698
|
|
87
|
+
cocotb/share/def/icarus.exp,sha256=bBH0n1G8O17WN1WYPTFIsYQTXdKhzzbNo6aIFtZTH40,5761
|
|
88
|
+
cocotb/share/def/icarus.lib,sha256=7xK49dESScne241yTQ472C7GO7dWgUZKNbrcMQqHCF0,9612
|
|
89
|
+
cocotb/share/def/modelsim.def,sha256=HncvdEzVllbzFR21Nqcbsr-oXMWIfx3YsVi-RK4sbpk,2402
|
|
90
|
+
cocotb/share/def/modelsim.exp,sha256=hPJT5aSuDQB54YPBLoQnQ1XJmjPIqq82EgGEvZwPqIY,17032
|
|
91
|
+
cocotb/share/def/modelsim.lib,sha256=h0xnCX_brttzAUxg56zpOHh9xMo2iJSvgaCOvb6mKuk,28378
|
|
92
|
+
cocotb/share/include/cocotb_utils.h,sha256=6lHffujs9KVTMMMu08r-ClbaZeyRUHHK-S1QnwH54Lg,2477
|
|
93
|
+
cocotb/share/include/embed.h,sha256=I5PXIcyNRQH3I6A81trsGJ-ksGDQt3tvJsrzht5ux_U,894
|
|
94
|
+
cocotb/share/include/exports.h,sha256=RRDg9diMCUUJxdzKX0B6TGmQBNttcoVMBVCCLUUKsrA,677
|
|
95
|
+
cocotb/share/include/gpi.h,sha256=g3wIG_jtdVvIchXTE50wiAkqvYE4AuL-LzXswRV066w,15576
|
|
96
|
+
cocotb/share/include/gpi_logging.h,sha256=sBgvpiYjJfrFIKKLGh8oVMBHGGNz93rIILjA9N6VheQ,13560
|
|
97
|
+
cocotb/share/include/py_gpi_logging.h,sha256=24ZP1aRMNz4HRLpX6Mt3f-pkvEKK-EFZ1cKUaqA548w,722
|
|
98
|
+
cocotb/share/include/vhpi_user_ext.h,sha256=VLXbA-oeO83mL1vR0e4Ye0zMe5ijIaXnvT2FRFgsYDY,654
|
|
99
|
+
cocotb/share/include/vpi_user_ext.h,sha256=uJd-wKgKyVpoBVgagiPjND0WjciUNZaoqSa9Js_3UhU,970
|
|
100
|
+
cocotb/share/lib/verilator/verilator.cpp,sha256=LsFSuJdrZGenJVDOA-UFDBsukInK3gYVmUgNskhKGs8,6284
|
|
101
|
+
cocotb/types/__init__.py,sha256=B7pA3EAY6q1tnK60NcDcAJTYXT41N8_mPS5fz2vG0dc,957
|
|
102
|
+
cocotb/types/_abstract_array.py,sha256=mP94zSDRKHxsZTb5nUAHEYjp43Klx-8RT3DS5r1Vm_4,4059
|
|
103
|
+
cocotb/types/_array.py,sha256=Pql7dtXc9NQXN1OMddLuZG_t5SThgaToejKYOnGC1NI,11171
|
|
104
|
+
cocotb/types/_indexing.py,sha256=OHxwlnEVNEc0JOO7XQr6DZNfPBJTeTjYno8Y60OiCIk,543
|
|
105
|
+
cocotb/types/_logic.py,sha256=wWJsoCzENu3tbJKEil4FjMryjpiJr-owkYMfH9NQ-tU,11365
|
|
106
|
+
cocotb/types/_logic_array.py,sha256=7y3lQBE0_YbpBzw5AV2o7vbZr3heRDZJfmSV_hyASHY,33629
|
|
107
|
+
cocotb/types/_range.py,sha256=hfUuB7vIqg9SHVucjqwwVozW20-gCYJGUaKeNGoJXrU,6421
|
|
108
|
+
cocotb/types/_resolve.py,sha256=bdxyDw1ViQbtjTalszemARE4s8-KQgJmvGhNrFYd448,2129
|
|
109
|
+
cocotb-2.0.0rc2.dist-info/licenses/LICENSE,sha256=8mwxMGzbfTp55fmZ9K18_4yuclcePI7u1fPvmxa9LVo,1601
|
|
110
|
+
cocotb_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
+
cocotb_tools/_coverage.py,sha256=cZBUbdVed99jcBA60t0U4XcLfq_8rkJVvk5Bdqlqhns,1265
|
|
112
|
+
cocotb_tools/check_results.py,sha256=nnn7k2jTTvDOzRmZ5Lk2fBbKvq_vEBw204FG61Rd-bw,1769
|
|
113
|
+
cocotb_tools/combine_results.py,sha256=_1vi7bglTlnWpsLr4IRrN779GpWN3wQDBXGLpicPbHE,5290
|
|
114
|
+
cocotb_tools/config.py,sha256=UEuv72qTQBfDYY3J3-FEc87zMe4MZOPG2fwFK5h3Ct8,7945
|
|
115
|
+
cocotb_tools/ipython_support.py,sha256=xjEOUgRbP9vHgMDy53eA0rBbGzb4v7O-aT0_6TwKHmM,3444
|
|
116
|
+
cocotb_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
117
|
+
cocotb_tools/runner.py,sha256=uNVkLEp3-BR-nvK54RPfihVBnKVOfqIjO0cAwsypgDs,70355
|
|
118
|
+
cocotb_tools/sim_versions.py,sha256=KwXJ93B2hARVtTwShQjdvcytNcMWle43FJ5sgtqfXyA,4007
|
|
119
|
+
cocotb_tools/_vendor/__init__.py,sha256=-fGisWAvaqm1aSSA9GAUNT44xDHmASVhSo1Lg46OB6I,142
|
|
120
|
+
cocotb_tools/_vendor/distutils_version.py,sha256=k4Zipnnw88hyoE5MLBbgcXh9iu7iYGK3K5s97wVpOFE,13185
|
|
121
|
+
cocotb_tools/makefiles/Makefile.deprecations,sha256=HbmEQOwkp8XiWO_-Q43KnkqGbFxmlx_aIs4DoYIls6A,886
|
|
122
|
+
cocotb_tools/makefiles/Makefile.inc,sha256=PFf0Phe6P1q-2ovz0dGl6EAJI0OKqQADfiOv6P3Obww,5446
|
|
123
|
+
cocotb_tools/makefiles/Makefile.sim,sha256=exzBV6KRE8Xt9nuefvmhSRWqEh6V1pGrEDD5hl7HEt4,4171
|
|
124
|
+
cocotb_tools/makefiles/simulators/Makefile.activehdl,sha256=u2_EuY-c6OH4_h9aw1TCUH04GyH9EblduUy1-xAKqSs,3068
|
|
125
|
+
cocotb_tools/makefiles/simulators/Makefile.cvc,sha256=B6LadqK-NUhhnh2bI3bt6zueKcmR5DFQZ7wAobpnpck,2968
|
|
126
|
+
cocotb_tools/makefiles/simulators/Makefile.dsim,sha256=iNwQ_9JlV8z7TaN6-mllA_PBjH4h-xltoNDBQodofg4,1519
|
|
127
|
+
cocotb_tools/makefiles/simulators/Makefile.ghdl,sha256=FIIOlC-4R0KNi_Xtj4gu71Blxs87VcGlmdxT0UGnHAU,3452
|
|
128
|
+
cocotb_tools/makefiles/simulators/Makefile.icarus,sha256=joxeAbIkzDVNCjlyHKnXMHWmyi25CitsIgeVXN0AsDo,3208
|
|
129
|
+
cocotb_tools/makefiles/simulators/Makefile.ius,sha256=koC6rhvuO5Lf2qET24TQIrAuFHP3CizXZJ8H6wTnz2k,3665
|
|
130
|
+
cocotb_tools/makefiles/simulators/Makefile.modelsim,sha256=JK9P_d1HsOO61O8Rm6qeLSPZdNQ_mQNe8nf-2f8nzk0,355
|
|
131
|
+
cocotb_tools/makefiles/simulators/Makefile.nvc,sha256=qJocV32rwFXTGwP6HKZjKClN0QrjfWMiUHW_ZNWV0Ac,2643
|
|
132
|
+
cocotb_tools/makefiles/simulators/Makefile.questa,sha256=iLdtpBOwSAdeuSBa-TCY-GtDXdEDPVgM5pgLgdKNXmY,1504
|
|
133
|
+
cocotb_tools/makefiles/simulators/Makefile.questa-compat,sha256=upoFF9NsQ_2bwP6_cvd66Zn3YnRYVrPLLO6FiVl6Jbw,5165
|
|
134
|
+
cocotb_tools/makefiles/simulators/Makefile.questa-qisqrun,sha256=aHSRmQny4EXvqH8SLD5HPAzs_NuN-CwurLlf27Rc5zo,5017
|
|
135
|
+
cocotb_tools/makefiles/simulators/Makefile.riviera,sha256=iqaoWq6-j_eQbL_eJY4m8tjayjMX_9L413jmUiUSiJM,5495
|
|
136
|
+
cocotb_tools/makefiles/simulators/Makefile.vcs,sha256=xSxfmsPruSu4wvy_IydNIXdh74ewjM_McZs8AFGtmuY,2219
|
|
137
|
+
cocotb_tools/makefiles/simulators/Makefile.verilator,sha256=kgV50lZsGwrc_Fc1b5Gw9FcSYgZv0LLYa6rGO9DpyLI,2830
|
|
138
|
+
cocotb_tools/makefiles/simulators/Makefile.xcelium,sha256=vIKcGasyQv6wGH07MnOH3gXCZ_anC5c9azT_-5irDws,4354
|
|
139
|
+
pygpi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
|
+
pygpi/entry.py,sha256=dvFSzT1MeGZOThD5r3gRFU-g2fDL4sUETsHu4unyL2U,1644
|
|
141
|
+
pygpi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
|
+
cocotb-2.0.0rc2.dist-info/METADATA,sha256=EyJKsXmPLqlAmkJGh1Np4jPJR4HhUFV3Fv9r1CjDUws,3065
|
|
143
|
+
cocotb-2.0.0rc2.dist-info/WHEEL,sha256=JLOMsP7F5qtkAkINx5UnzbFguf8CqZeraV8o04b0I8I,101
|
|
144
|
+
cocotb-2.0.0rc2.dist-info/entry_points.txt,sha256=LQ3GHF3csyQTVmUZ1aLtd2y5DG1GgYUHZ_xntnGO5jg,59
|
|
145
|
+
cocotb-2.0.0rc2.dist-info/top_level.txt,sha256=1wga6LXtoeDGlL2GXjX4-w8Qt0y18HKevHn5PD7U2ZA,406
|
|
146
|
+
cocotb-2.0.0rc2.dist-info/RECORD,,
|
cocotb_tools/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def start_cocotb_library_coverage(_: object) -> None: # pragma: no cover
|
|
8
|
+
if "COCOTB_LIBRARY_COVERAGE" not in os.environ:
|
|
9
|
+
return
|
|
10
|
+
try:
|
|
11
|
+
import coverage # noqa: PLC0415
|
|
12
|
+
except (ImportError, ModuleNotFoundError):
|
|
13
|
+
raise RuntimeError(
|
|
14
|
+
"cocotb library coverage collection requested but coverage package not available. Install it using `pip install coverage`."
|
|
15
|
+
) from None
|
|
16
|
+
else:
|
|
17
|
+
library_coverage = coverage.coverage(
|
|
18
|
+
data_file=".coverage.cocotb",
|
|
19
|
+
config_file=False,
|
|
20
|
+
branch=True,
|
|
21
|
+
source=["cocotb"],
|
|
22
|
+
)
|
|
23
|
+
library_coverage.start()
|
|
24
|
+
|
|
25
|
+
def stop_library_coverage() -> None:
|
|
26
|
+
library_coverage.stop()
|
|
27
|
+
library_coverage.save() # pragma: no cover
|
|
28
|
+
|
|
29
|
+
# This must come after `library_coverage.start()` to ensure coverage is being
|
|
30
|
+
# collected on the cocotb library before importing from it.
|
|
31
|
+
from cocotb._init import _register_shutdown_callback # noqa: PLC0415
|
|
32
|
+
|
|
33
|
+
_register_shutdown_callback(stop_library_coverage)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
"""Checks if a JUnit results file exists and whether there was failing tests."""
|
|
5
|
+
|
|
6
|
+
import argparse
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import Tuple
|
|
10
|
+
from xml.etree import ElementTree
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_results(results_xml_file: Path) -> Tuple[int, int]:
|
|
14
|
+
"""Return number of tests and fails in *results_xml_file*.
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
Tuple of number of tests and number of fails.
|
|
18
|
+
|
|
19
|
+
Raises:
|
|
20
|
+
RuntimeError: If *results_xml_file* is non-existent.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
__tracebackhide__ = True # Hide the traceback when using PyTest.
|
|
24
|
+
|
|
25
|
+
if not results_xml_file.is_file():
|
|
26
|
+
raise RuntimeError(
|
|
27
|
+
f"ERROR: Simulation terminated abnormally. Results file {results_xml_file} not found."
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
num_tests = 0
|
|
31
|
+
num_failed = 0
|
|
32
|
+
|
|
33
|
+
tree = ElementTree.parse(results_xml_file)
|
|
34
|
+
for ts in tree.iter("testsuite"):
|
|
35
|
+
for tc in ts.iter("testcase"):
|
|
36
|
+
num_tests += 1
|
|
37
|
+
for _ in tc.iter("failure"):
|
|
38
|
+
num_failed += 1
|
|
39
|
+
|
|
40
|
+
return (num_tests, num_failed)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _get_parser() -> argparse.ArgumentParser:
|
|
44
|
+
"""Return the cmdline parser"""
|
|
45
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
46
|
+
parser.add_argument(
|
|
47
|
+
"results_file", help="Path to XML file holding JUnit test results.", type=Path
|
|
48
|
+
)
|
|
49
|
+
return parser
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def main() -> int:
|
|
53
|
+
parser = _get_parser()
|
|
54
|
+
args = parser.parse_args()
|
|
55
|
+
|
|
56
|
+
try:
|
|
57
|
+
(_, num_failed) = get_results(args.results_file)
|
|
58
|
+
except RuntimeError:
|
|
59
|
+
return 1
|
|
60
|
+
return num_failed
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
if __name__ == "__main__":
|
|
64
|
+
rc = main()
|
|
65
|
+
sys.exit(rc)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Copyright cocotb contributors
|
|
2
|
+
# Licensed under the Revised BSD License, see LICENSE for details.
|
|
3
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
#!/usr/bin/env python
|
|
5
|
+
"""
|
|
6
|
+
Simple script to combine JUnit test results into a single XML file.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import os
|
|
11
|
+
import re
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
from typing import Iterable, Pattern
|
|
15
|
+
from xml.etree import ElementTree as ET
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def _find_all(name: Pattern, path: Path) -> Iterable[Path]:
|
|
19
|
+
for obj in path.iterdir():
|
|
20
|
+
if obj.is_file() and re.match(name, obj.name):
|
|
21
|
+
yield obj
|
|
22
|
+
elif obj.is_dir():
|
|
23
|
+
yield from _find_all(name, obj)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _get_parser() -> argparse.ArgumentParser:
|
|
27
|
+
"""Return the cmdline parser"""
|
|
28
|
+
parser = argparse.ArgumentParser(
|
|
29
|
+
description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter
|
|
30
|
+
)
|
|
31
|
+
parser.add_argument(
|
|
32
|
+
"directories",
|
|
33
|
+
nargs="*",
|
|
34
|
+
type=lambda args: [Path(arg) for arg in args],
|
|
35
|
+
default=[Path()],
|
|
36
|
+
help="Directories to search for input files.",
|
|
37
|
+
)
|
|
38
|
+
parser.add_argument(
|
|
39
|
+
"-i",
|
|
40
|
+
"--input-filename",
|
|
41
|
+
default=r"results.*\.xml",
|
|
42
|
+
help="A regular expression to match input filenames.",
|
|
43
|
+
)
|
|
44
|
+
parser.add_argument(
|
|
45
|
+
"-o",
|
|
46
|
+
"--output-file",
|
|
47
|
+
default="combined_results.xml",
|
|
48
|
+
help="Path of output XML file.",
|
|
49
|
+
)
|
|
50
|
+
parser.add_argument(
|
|
51
|
+
"--output-testsuites-name",
|
|
52
|
+
default="results",
|
|
53
|
+
help="Name of 'testsuites' element in output XML file.",
|
|
54
|
+
)
|
|
55
|
+
parser.add_argument(
|
|
56
|
+
"--verbose",
|
|
57
|
+
action="store_true",
|
|
58
|
+
help="Enables verbose output.",
|
|
59
|
+
)
|
|
60
|
+
parser.add_argument(
|
|
61
|
+
"--repo-root",
|
|
62
|
+
type=Path,
|
|
63
|
+
help="Specify root of cocotb repo the regression is run from (CI only).",
|
|
64
|
+
)
|
|
65
|
+
return parser
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def main() -> int:
|
|
69
|
+
parser = _get_parser()
|
|
70
|
+
args = parser.parse_args()
|
|
71
|
+
rc = 0
|
|
72
|
+
|
|
73
|
+
result = ET.Element("testsuites", name=args.output_testsuites_name)
|
|
74
|
+
|
|
75
|
+
input_pattern = re.compile(args.input_filename)
|
|
76
|
+
|
|
77
|
+
for directory in args.directories:
|
|
78
|
+
if args.verbose:
|
|
79
|
+
print(f"Searching in {directory} for results.xml files.")
|
|
80
|
+
for fname in _find_all(input_pattern, directory):
|
|
81
|
+
if args.verbose:
|
|
82
|
+
print(f"Reading file {fname}.")
|
|
83
|
+
tree = ET.parse(fname)
|
|
84
|
+
for ts in tree.iter("testsuite"):
|
|
85
|
+
if args.verbose:
|
|
86
|
+
print(
|
|
87
|
+
"Testsuite name: {!r}, package: {!r}".format(
|
|
88
|
+
ts.get("name"), ts.get("package")
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
for existing in result:
|
|
92
|
+
if (existing.get("name") == ts.get("name")) and (
|
|
93
|
+
existing.get("package") == ts.get("package")
|
|
94
|
+
):
|
|
95
|
+
if args.verbose:
|
|
96
|
+
print(
|
|
97
|
+
"Testsuite already exists in combined results. Extending it."
|
|
98
|
+
)
|
|
99
|
+
existing.extend(list(ts))
|
|
100
|
+
break
|
|
101
|
+
else:
|
|
102
|
+
if args.verbose:
|
|
103
|
+
print(
|
|
104
|
+
"Testsuite does not already exist in combined results. Adding it."
|
|
105
|
+
)
|
|
106
|
+
result.append(ts)
|
|
107
|
+
|
|
108
|
+
testsuite_count = 0
|
|
109
|
+
testcase_count = 0
|
|
110
|
+
for testsuite in result.iter("testsuite"):
|
|
111
|
+
testsuite_count += 1
|
|
112
|
+
for testcase in testsuite.iter("testcase"):
|
|
113
|
+
testcase_count += 1
|
|
114
|
+
for _ in testcase.iter("failure"):
|
|
115
|
+
rc = 1
|
|
116
|
+
print(
|
|
117
|
+
"Failure in testsuite: '{}' classname: '{}' testcase: '{}' with parameters '{}'".format(
|
|
118
|
+
testsuite.get("name"),
|
|
119
|
+
testcase.get("classname"),
|
|
120
|
+
testcase.get("name"),
|
|
121
|
+
testsuite.get("package"),
|
|
122
|
+
)
|
|
123
|
+
)
|
|
124
|
+
if (
|
|
125
|
+
os.getenv("GITHUB_ACTIONS") is not None
|
|
126
|
+
and args.repo_root is not None
|
|
127
|
+
):
|
|
128
|
+
# Get test file relative to root of repo
|
|
129
|
+
file = testcase.get("file")
|
|
130
|
+
# if this file was output by cocotb, it has this attribute
|
|
131
|
+
assert file is not None
|
|
132
|
+
relative_file = Path(file).relative_to(args.repo_root)
|
|
133
|
+
print(
|
|
134
|
+
"::error file={},line={}::Test {}:{} failed".format(
|
|
135
|
+
relative_file,
|
|
136
|
+
testcase.get("lineno"),
|
|
137
|
+
testcase.get("classname"),
|
|
138
|
+
testcase.get("name"),
|
|
139
|
+
)
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
print(f"Ran a total of {testsuite_count} TestSuites and {testcase_count} TestCases")
|
|
143
|
+
|
|
144
|
+
if args.verbose:
|
|
145
|
+
print(f"Writing combined results to {args.output_file}")
|
|
146
|
+
ET.ElementTree(result).write(args.output_file, encoding="UTF-8")
|
|
147
|
+
return rc
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
if __name__ == "__main__":
|
|
151
|
+
rc = main()
|
|
152
|
+
sys.exit(rc)
|