Skip to content

Commit

Permalink
gh #29 Update hal_test_binary
Browse files Browse the repository at this point in the history
  • Loading branch information
hari22yuva committed Feb 10, 2025
1 parent 6e3d101 commit 4daddb3
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down Expand Up @@ -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

Expand Down
61 changes: 57 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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:
Expand All @@ -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)
2 changes: 1 addition & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@

cd "$(dirname "$0")"
export LD_LIBRARY_PATH=/usr/lib:/lib:/home/root:./
./hal_test $@
./hal_test_rmfAudioCapture $@

0 comments on commit 4daddb3

Please sign in to comment.