Skip to content

Commit b24b9fc

Browse files
committed
Public CI fast RPC Shell Scripts
Added shell script for fast RPC testcases Added Readme for fast RPC Testcases Signed-off-by: Abhishek <[email protected]>
1 parent 73a2a03 commit b24b9fc

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
# FastRPC Test Scripts for RB3 Gen2 (Yocto)
5+
6+
## Overview
7+
8+
CDSP scripts demonstrates the usage of FastRPC (Fast Remote Procedure Call) to offload computations to different DSP (Digital Signal Processor) domains. The test application supports multiple examples, including a simple calculator service, a HAP example, and a multithreading example. This test app is publicly available @https://github.com/quic/fastrpc
9+
10+
## Features
11+
12+
- Simple Calculator Service
13+
- HAP example
14+
- Multithreading Example
15+
16+
## Prerequisites
17+
18+
Ensure the following components are present in the target Yocto build (at usr/share/bin/):
19+
20+
- this test app can be compiled from https://github.com/quic/fastrpc
21+
- `fastrpc_test` : The compiled test application.
22+
- `android Directory` : Contains shared libraries for the Android platform.
23+
- `linux Directory` : Contains shared libraries for the Linux platform.
24+
- `v68 Directory` : Contains skeletons for the v68 architecture version.
25+
- Write access to root filesystem (for environment setup)
26+
27+
## Directory Structure
28+
29+
```bash
30+
Runner/
31+
├── suites/
32+
│ ├── Multimedia/
33+
│ │ ├── CDSP/
34+
│ │ │ ├── fastrpc_test/
35+
│ │ │ │ ├── run.sh
36+
37+
```
38+
39+
## Usage
40+
41+
1. Copy repo to Target Device: Use scp to transfer the scripts from the host to the target device. The scripts should be copied to the /var directory on the target device.
42+
43+
2. Verify Transfer: Ensure that the repo have been successfully copied to the /var directory on the target device.
44+
45+
3. Run Scripts: Navigate to the /var directory on the target device and execute the scripts as needed.
46+
47+
Run a specific test using:
48+
---
49+
Quick Example
50+
```
51+
git clone <this-repo>
52+
cd <this-repo>
53+
scp -r common Runner user@target_device_ip:/var
54+
ssh user@target_device_ip
55+
cd /var/Runner && ./run-test.sh
56+
```
57+
Sample output:
58+
```
59+
sh-5.2# cd /var/Runner && ./run-test.sh fastrpc_test
60+
[Executing test case: /var/Runner/suites/Multimedia/CDSP/fastrpc_test] 1980-01-06 01:33:25 -
61+
[INFO] 1980-01-06 01:33:25 - -----------------------------------------------------------------------------------------
62+
[INFO] 1980-01-06 01:33:25 - -------------------Starting fastrpc_test Testcase----------------------------
63+
[INFO] 1980-01-06 01:33:25 - Checking if dependency binary is available
64+
[PASS] 1980-01-06 01:33:25 - Test related dependencies are present.
65+
...
66+
[PASS] 1980-01-06 01:33:27 - fastrpc_test : Test Passed
67+
[INFO] 1980-01-06 01:33:27 - -------------------Completed fastrpc_test Testcase----------------------------
68+
```
69+
70+
4. Results will be available in the `Runner/suites/Multimedia/CDSP/` directory.
71+
72+
## Notes
73+
74+
- The script does not take any arguments.
75+
- It validates the presence of required libraries before executing tests.
76+
- If any critical tool is missing, the script exits with an error message.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
#!/bin/sh
5+
# Import test suite definitions
6+
. $(pwd)/init_env
7+
TESTNAME="fastrpc_test"
8+
9+
#import test functions library
10+
. $TOOLS/functestlib.sh
11+
12+
test_path=$(find_test_case_by_name "$TESTNAME")
13+
log_info "-----------------------------------------------------------------------------------------"
14+
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
15+
16+
log_info "Checking if dependency binary is available"
17+
export PATH=$PATH:/usr/share/bin
18+
check_dependencies fastrpc_test
19+
20+
mkdir -p results/fastrpc_test
21+
chmod -R 755 results/fastrpc_test
22+
23+
# Navigate to the directory where the fastrpc_test application is located
24+
25+
cd /usr/share/bin
26+
27+
# Execute the command and capture the output
28+
output=$(./fastrpc_test -d 3 -U 1 -t linux -a v68)
29+
echo $output
30+
31+
# Check if the output contains the desired string
32+
if echo "$output" | grep -q "All tests completed successfully"; then
33+
log_pass "$TESTNAME : Test Passed"
34+
echo "$TESTNAME PASS" > $test_path/$TESTNAME.res
35+
else
36+
log_fail "$TESTNAME : Test Failed"
37+
echo "$TESTNAME FAIL" > $test_path/$TESTNAME.res
38+
fi
39+
40+
log_info "-------------------Completed $TESTNAME Testcase----------------------------"

0 commit comments

Comments
 (0)