Skip to content
  • Tiago Alves's avatar
    9f077629
    WL#13063 MOVES LOGIC TO FIND BINARIES TO OWN CLASS · 9f077629
    Tiago Alves authored
    Introduces TestExecutionResources class to encapsulate the logic
    handling binaries filesystem find and path retrieval.
    
    atrt uses --prefix0 and --prefix1 to set MySQL installation paths from
    which it finds binaries, libraries, and scripts (test execution
    resources).
    --prefix0 is assumed as default and paths are stored in global variables
    and used across the code.
    --prefix1 is assumed to be used only in upgrade tests, and switching
    from --prefix0 to --prefix1 paths is done by replacing the base path and
    then checking for the files.
    Furthermore, when we introduced Custom Processes, the existent structure
    didn't allow to accomodate such binaries and logic ended up a bit more
    fragmented.
    
    The TestExecutionResources was designed to fix all above issues.
    It's pre-filled with known resources (binaries/libraries/scripts) but
    allows to further register resources that could be needed during runtime
    (e.g. custom processes).
    The full path of all binaries (for both --prefix0 and --prefix 1) are
    loaded as soon as prefixes are available and errors are signalled.
    This class is then meant to be used to retrieve paths for both --prefix0
    or --prefix1 either in the single-version scenario, upgrade test
    scenarios, or mixed-version scenarios (to be implemented next).
    
    Change-Id: I49fcc2d209bbf2dfb7ae3ec7e0cfdc95276753bc
    9f077629
    WL#13063 MOVES LOGIC TO FIND BINARIES TO OWN CLASS
    Tiago Alves authored
    Introduces TestExecutionResources class to encapsulate the logic
    handling binaries filesystem find and path retrieval.
    
    atrt uses --prefix0 and --prefix1 to set MySQL installation paths from
    which it finds binaries, libraries, and scripts (test execution
    resources).
    --prefix0 is assumed as default and paths are stored in global variables
    and used across the code.
    --prefix1 is assumed to be used only in upgrade tests, and switching
    from --prefix0 to --prefix1 paths is done by replacing the base path and
    then checking for the files.
    Furthermore, when we introduced Custom Processes, the existent structure
    didn't allow to accomodate such binaries and logic ended up a bit more
    fragmented.
    
    The TestExecutionResources was designed to fix all above issues.
    It's pre-filled with known resources (binaries/libraries/scripts) but
    allows to further register resources that could be needed during runtime
    (e.g. custom processes).
    The full path of all binaries (for both --prefix0 and --prefix 1) are
    loaded as soon as prefixes are available and errors are signalled.
    This class is then meant to be used to retrieve paths for both --prefix0
    or --prefix1 either in the single-version scenario, upgrade test
    scenarios, or mixed-version scenarios (to be implemented next).
    
    Change-Id: I49fcc2d209bbf2dfb7ae3ec7e0cfdc95276753bc
Loading