[Libre-soc-bugs] [Bug 730] adapt ALU test cases to include expected results

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Mon Oct 25 19:37:20 BST 2021


--- Comment #14 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to klehman9 from comment #13)
> https://git.libre-soc.org/?p=openpower-isa.git;a=commit;
> h=5ada14e4fed3098edac3449cc880b975c68733fb

looks great.

> adding a parameter to passthrough a name of a class of test cases (or
> whatever) via add_case in common.py would be trivial (well besides adding it
> to all the cases) for directory sorting.

the problem with adding it as an argument is that it is
added to literally everything.  hundreds of unit tests.

a more standard approach, one adopted by python unittest, is to inspect
the stack frame and obtain the name of the caller *of* the add_cases

i believe this has already been done.

the next upper level of hierarchy is to separate test classes, by
determining the class name: self.__class__.__name__ does the trick.
use that in add_cases() to add an extra piece of info to the
test_data, it can then propagate through and eventually get put
as an argument to the dump function

quite laborious but hey

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list