tests: Add Python unit tests for m5.util.convert
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 19 Jan 2021 16:04:33 +0000 (16:04 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Sun, 24 Jan 2021 18:46:03 +0000 (18:46 +0000)
commit02cd8945988623e39390d846dd3872766591cfe9
treecb8f4a2a5482e0c28741943a677faa7aa2873408
parentfd7bcb7ecd96274f86be0f948acb19f6fc4f66a5
tests: Add Python unit tests for m5.util.convert

Python unit tests need to be run from within gem5. This change adds a
script to run unit tests (tests/run_pyunit.py) and a unit test for
m5.util.convert.

The tests can be run as follows:

  ./build/NULL/gem5.opt tests/run_pyunit.py

Change-Id: I80d1aabbe1d87b01b48280972f9418317e648779
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39377
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
tests/pyunit/__init__.py [new file with mode: 0644]
tests/pyunit/util/__init__.py [new file with mode: 0644]
tests/pyunit/util/test_convert.py [new file with mode: 0644]
tests/run_pyunit.py [new file with mode: 0644]