mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Move all.sh (core) to the framework

Open mpg opened this issue 1 year ago • 0 comments

The script all.sh that once was monolithic has been split into a core (still all.sh) and component definitions (components*.sh).

We need to move the core to the framework repo so that it can be used by tf-psa-crypto as well as mbedtls (3.6 and development).

We may want to leave a file tests/scripts/all.sh in place in both mbedtls branches, but it should be a thin wrapper around say all-core.sh from the framework. This will:

  • avoid having to change paths everywhere in CI scripts
  • provide a convenient place for things that might differ between repos/branches (such as the path to components).

By "thin wrapper" I mean the remaining tests/scripts/all.sh could look like (just an example to make things concrete):

setup_and_parse_command_line "$@"
load_components "components*.sh"
run_components
report_and_tear_down

This may involve initially refactoring all.sh so that it starts with only* function definitions, and then a few functions calls (like the ones suggested above). Then move the function definitions** to all-core.sh and keep only the handful of function calls in test/scripts/all.sh. Finally, move all-core.sh to the framework.

*Currently all.sh starts with mostly function definitions, but there's some code in the middle (for example "Include the components"). Also, it ends with more than a handful of function calls, so we want to define new functions to simplify that.

**Actually some definitions are only used in a single component file and those should be moved to that component file. For example helper_libtestdriver1_* functions, but there might be others.

mpg avatar Sep 25 '24 11:09 mpg