Skip to content

Commit 6900257

Browse files
nghielmejmitrevs
andauthored
Pytest folder naming update (#1437)
* Add utility functions for generating unique test case identifiers in pytest - Introduced `get_pytest_case_id` and `get_pytest_baseline_name` functions in `conftest.py` to create unique identifiers for parametrized test cases and baseline files. - Updated multiple test files to utilize these functions for generating output directory names, ensuring consistency and avoiding collisions in test outputs. - Refactored test function signatures to include the `request` parameter where necessary for accessing the pytest request context. * pre-commit fixes * Refactor pytest utility functions for unique test case identifiers - Introduced `_sanitize_test_id` function to handle sanitization of test identifiers for file paths. - Updated test files to utilize the new `get_pytest_case_id` function for generating baseline file names, ensuring uniformity in output directory naming. - Removed obsolete baseline files and added new ones to reflect updated test cases. * Uniform test root path (#1435) it is actually overridden by my contribution * pre-commit fixes * Refactor test case identifier handling in pytest - Replaced the `get_pytest_case_id` function with a new fixture `test_case_id` to streamline the generation of unique identifiers for test cases. - Updated multiple test files to utilize the new `test_case_id` fixture, ensuring consistent output directory naming across tests. - Removed obsolete references to the old identifier function. * Refactor test function signatures to use `test_case_id` - Updated the `garnet_models` and `garnet_stack_models` fixtures to replace the `request` parameter with `test_case_id` f * Refactor pytest fixtures and update baseline files - Changed the `scope` of some pytest fixtures from 'module' to default. - Updated the `_sanitize_test_id` function to remove the prefix 'hls4ml/test/pytest/'. - New mapping of old baselines json file to new naming style. * Update CI template to include all tar.gz files in the pytest directory - Modified the paths in the CI template to match all tar.gz files under the test/pytest directory instead of a specific pattern, required with the new naming convention. --------- Co-authored-by: Jovan Mitrevski <jmitrevs@fnal.gov>
1 parent 2bfb0ae commit 6900257

155 files changed

Lines changed: 516 additions & 488 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/pytest/baselines/Vitis/2020.1/hls4mlprj_keras_api_dense_Vitis_io_parallel.json renamed to test/pytest/baselines/Vitis/2020.1/test_keras_api_test_dense_io_parallel-Vitis.json

File renamed without changes.

test/pytest/baselines/Vitis/2020.1/hls4mlprj_keras_api_dense_Vitis_io_stream.json renamed to test/pytest/baselines/Vitis/2020.1/test_keras_api_test_dense_io_stream-Vitis.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_elu_Vitis_io_parallel.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_parallel-Vitis-elu.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_leaky_re_lu_Vitis_io_parallel.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_parallel-Vitis-leaky_relu.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_p_re_lu_Vitis_io_parallel.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_parallel-Vitis-prelu.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_relu_Vitis_io_parallel.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_parallel-Vitis-relu.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_sigmoid_Vitis_io_parallel.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_parallel-Vitis-sigmoid.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_elu_Vitis_io_stream.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_stream-Vitis-elu.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_leaky_re_lu_Vitis_io_stream.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_stream-Vitis-leaky_relu.json

File renamed without changes.

test/pytest/baselines/Vitis/2023.1/hls4mlprj_keras_api_activations_p_re_lu_Vitis_io_stream.json renamed to test/pytest/baselines/Vitis/2023.1/test_keras_api_test_activations_io_stream-Vitis-prelu.json

File renamed without changes.

0 commit comments

Comments
 (0)