[Libre-soc-bugs] [Bug 441] New: Avoid unit tests that depend on other unit tests being run first

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Jul 26 06:42:13 BST 2020


            Bug ID: 441
           Summary: Avoid unit tests that depend on other unit tests being
                    run first
           Product: Libre-SOC's first SoC
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: CONFIRMED
          Severity: enhancement
          Priority: ---
         Component: Source Code
          Assignee: lkcl at lkcl.net
          Reporter: programmerjake at gmail.com
                CC: libre-soc-bugs at lists.libre-soc.org,
                    programmerjake at gmail.com
   NLnet milestone: ---


I specifically changed the class creating .test_data to not be built on
unittest's infrastructure since the functions that add entries to test_data
need to be run before the actual Simulator test case.

unittest (and testing infrastructure built to use it, such as nose3)
fundamentally assumes that all unit tests are independent of each other, which
allows them to be run in parallel, on different computers, or not even at all.

We should change the code back to not having the code constructing the list of
instructions to test be submitted to unittest.

This also should be done for all the other places the subtly incorrect code
that I tried to fix was copied to.

Basically, if the code which invokes unittest needs to be something more than
if __name__ == "__main__":
then you're probably doing something wrong

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

More information about the libre-soc-bugs mailing list