• 
      

    Consolidate base classes for test suites.

    Review Request #11822 — Created Sept. 27, 2021 and submitted

    Information

    RBTools
    master

    Reviewers

    RBTools has had two base classes available for unit test suites: an
    older rbtools.utils.testbase.RBTestBase, which contained all the
    useful helper methods but should have been legacy, and
    rbtools.testing.testcase.TestCase, which contained very little but was
    intended to be modern.

    This change consolidates the two. All the useful stuff from RBTestBase
    now lives in TestCase, with some unused methods (reset_cl_args() and
    catch_output()) removed.

    gen_uuid() was also removed, as it's not a generally-useful method,
    and was only used in one test, which shouldn't have used it to begin
    with.

    RBTestBase did set up a temporary home directory and chdir to it,
    which is functionality that wasn't worth removing, but shouldn't
    necessarily be the default. For now, TestCase now includes this
    ability as an opt-in.

    The old RBTestBase is still around for now, for legacy test suites.
    Many suites still need to be updated to use TestCase. It also opts
    into the temporary home directory, so that there aren't any regressions.

    Unit tests pass.

    Summary ID
    Consolidate base classes for test suites.
    RBTools has had two base classes available for unit test suites: an older `rbtools.utils.testbase.RBTestBase`, which contained all the useful helper methods but should have been legacy, and `rbtools.testing.testcase.TestCase`, which contained very little but was intended to be modern. This change consolidates the two. All the useful stuff from `RBTestBase` now lives in `TestCase`, with some unused methods (`reset_cl_args()` and `catch_output()`) removed. `gen_uuid()` was also removed, as it's not a generally-useful method, and was only used in one test, which shouldn't have used it to begin with. `RBTestBase` did set up a temporary home directory and `chdir` to it, which is functionality that wasn't worth removing, but shouldn't necessarily be the default. For now, `TestCase` now includes this ability as an opt-in. The old `RBTestBase` is still around for now, for legacy test suites. Many suites still need to be updated to use `TestCase`. It also opts into the temporary home directory, so that there aren't any regressions.
    93049cd7faad279f48fb1e4c9db0674854104b3b
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (0e0bc3b)