diff --git a/Makefile b/Makefile index 714c0d9..7864dd9 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,8 @@ SRC_DIRS = $(ROOT_DIR)/src INC_DIRS := $(ROOT_DIR)/../include HAL_LIB := rmfAudioCapture SKELETON_SRCS := $(ROOT_DIR)/skeletons/src/* -#TARGET_EXEC :=hal_test_$(HAL_LIB) +TARGET_EXEC :=hal_test_$(HAL_LIB) + # Check if TARGET is unset ifeq ($(TARGET),) $(info TARGET NOT SET ) @@ -69,7 +70,7 @@ export TARGET export TOP_DIR export HAL_LIB_DIR export HAL_LIB -#export TARGET_EXEC +export TARGET_EXEC .PHONY: clean list build cleanlibs clean cleanall skeleton diff --git a/README.md b/README.md index 25d8975..d15a9ac 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ - [Acronyms, Terms and Abbreviations](#acronyms-terms-and-abbreviations) - [Description](#description) - [Reference Documents](#reference-documents) +- [How to build the test suite](#how-to-build-the-test-suite) - [Notes](#notes) ## Acronyms, Terms and Abbreviations @@ -14,11 +15,11 @@ - `L3` - Module testing with External Stimulus is required to validate and control device - `HAL`- Hardware Abstraction Layer - `High-Level Test Specification` : These specification will provide a broad overview of the system's functionality from the callers' perspective. It focuses on major use cases, system behavior, and overall caller experience. -- `Low-Level Test Specification` : These specification will delve deeper into the technical details. They will define specific test cases with inputs, expected outputs, and pass/fail criteria for individual functionalities, modules, or APIs. +- `Low-Level Test Specification` : These specification will deeper into the technical details. They will define specific test cases with inputs, expected outputs, and pass/fail criteria for individual functionalities, modules, or APIs. ## Description -This repository contains the Unit Test Suites(L1 & L2) for RMF Audio Capture `HAL`. +This repository contains the Unit Test Suites(`L1` , `L2` and `L3`) for RMF Audio Capture `HAL`. ## Reference Documents @@ -36,8 +37,56 @@ This repository contains the Unit Test Suites(L1 & L2) for RMF Audio Capture `HA - Building against the actual library may introduce SOC dependencies. Hence, a template SKELETON library is created without SOC dependencies. On the real platform (target), it can be mounted, copied and bound with the actual library. - When executing the binary, ensure to include a platform-specific profile file as an argument for the designated test cases. The following example illustrates this: +## How to build the test suite + +In order to build the test suits, there is a requirement to supply the toolchain, either as a vendor independent toolchain, an SDK, or an RDK Docker Toolchain . + +For more information about RDK Docker Toolchain, please check [RDK Docker Toolchain](https://github.com/rdkcentral/ut-core/wiki/FAQ:-RDK-Docker-Toolchain) + +- Export the Toolchain Path: + +```bash +export TOOLCHAIN_PATH=/opt/toolchains/rdk-glibc-x86_64/sysroots/armv7at2hf-neon-rdk-linux-gnueabi +export CC="arm-rdk-linux-gnueabi-gcc -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard --sysroot=$TOOLCHAIN_PATH" +``` + +- Clone the `HAL` Repository: + +```bash +git clone git@github.com:rdkcentral/rdk-halif-rmf_audio_capture.git +``` + +- Set Project Version: + +If you want to build the test repository with a specific tag or branch, set the UT_PROJECT_VERSION variable accordingly. If not set, the default main branch will be used. + +```bash +export UT_PROJECT_VERSION=1.0.1 # Build using a specific tag +``` + +or + +```bash +export UT_PROJECT_VERSION=develop # Build using a specific branch +``` + +- Build Targets: + + There are two targets for the platform + + 1. linux - (default) + 2. arm - TARGET=arm + +```bash +build_ut.sh TARGET=arm +``` + +- `build_ut.sh` script will clone the hal-test repo, ut-core and generate a `hal_test_rmfAudioCapture` binary in `ut/bin/` upon successful completion. + +### Running the `L1` and `L2` test cases + ```bash - ./hal_test -p rmfAudioCaptureAuxSupported.yaml + ./hal_test_rmfAudioCapture -p rmfAudioCaptureAuxSupported.yaml ``` Alternatively, use the run.sh script with the profile file: @@ -48,4 +97,8 @@ Alternatively, use the run.sh script with the profile file: - Profile files define the configuration for the platform available here [profile yaml file](./profiles/) -- Install Python Environment and Activation Scripts please check the[HPK Documentation](https://github.com/rdkcentral/rdk-hpk-documentation/blob/main/README.md) +### Running the `L3` test cases + +- For running the L3 test suite, a host PC or server with a Python environment is required. +- Install Python Environment and Activation Scripts as detailed in the [HPK Documentation](https://github.com/rdkcentral/rdk-hpk-documentation/blob/main/README.md) +- To run the test cases follow the [rmf-audio-capture_L3_TestProcedure.md](docs/pages/rmf-audio-capture_L3_TestProcedure.md) \ No newline at end of file diff --git a/bin/run.sh b/bin/run.sh index e660411..729efa9 100755 --- a/bin/run.sh +++ b/bin/run.sh @@ -21,4 +21,4 @@ cd "$(dirname "$0")" export LD_LIBRARY_PATH=/usr/lib:/lib:/home/root:./ -./hal_test $@ +./hal_test_rmfAudioCapture $@ diff --git a/host/install.sh b/host/install.sh index 078bde7..ded7bae 100755 --- a/host/install.sh +++ b/host/install.sh @@ -158,11 +158,11 @@ setup_and_enable_venv ### Clone required repos ### # Setup raft -clone_repo git@github.com:rdkcentral/python_raft.git "${RAFT_DIR}" "1.1.1" "in ./raft" +clone_repo git@github.com:rdkcentral/python_raft.git "${RAFT_DIR}" "1.3.0" "in ./raft" install_pip_requirements "${RAFT_DIR}"/requirements.txt # Setup ut-raft -clone_repo git@github.com:rdkcentral/ut-raft.git "${PLUGINS_FRAMEWORK_DIR}/ut_raft" 2.0.0 "in ./raft/framework/plugins" +clone_repo git@github.com:rdkcentral/ut-raft.git "${PLUGINS_FRAMEWORK_DIR}/ut_raft" 2.0.1 "in ./raft/framework/plugins" install_pip_requirements "${PLUGINS_FRAMEWORK_DIR}"/ut_raft/requirements.txt ## Install your own sub git repo's in here as required