feat(test): add basic testing suite along with user DSPQueue Test Cases - #376
feat(test): add basic testing suite along with user DSPQueue Test Cases#376Dhruv Menon (malto101) wants to merge 5 commits into
Conversation
Dhruv Menon (malto101)
commented
Aug 14, 2026
- Add base_test directory with a comprehensive CMake build system supporting Linux (aarch64) and Android (API 35) target platforms
- Integrate Unity test framework as a git submodule under test/base_test/vendor/unity for unit testing
- Include platform-specific CMake toolchain configurations for cross-compilation targeting linux and android
- Add XML stream writer utility for structured test reporting output
- Provide BASIC documentation in CMakeLists.txt covering quick start, running tests, and instructions for adding new test suites or individual test cases
|
Dhruv Menon (@malto101), can we split this single commit into multiple independent, incremental commits? It'll be easier to review. |
cbd0542 to
d36b713
Compare
updated it |
d36b713 to
211b441
Compare
- Add root CMakeLists.txt with full quick-start, run, and extension docs - Register Unity test framework as a git submodule under vendor/unity - Add platform-specific CMake toolchain files for Linux (aarch64) and Android (API 35) cross-compilation - Add bin/CMakeLists.txt to produce deployable test binary artifacts - Add README.md with developer quick-start and contribution guide Signed-off-by: Dhruv Menon <dhrumeno@qti.qualcomm.com>
- Add streaming XML writer with layered architecture: streaming/ core writer, core/ data model, config/ configuration, error/ error handler, logging/ logger, facade/ public output API - Add utils/CMakeLists.txt to build xml_writer and future util targets - Utility is standalone with no dependency on test logic Signed-off-by: Dhruv Menon <dhrumeno@qti.qualcomm.com>
- Add Allure reporter (unity_allure_output) for structured test output - Add Unity fixture file reporter (unity_fixture_file_output) - Add shared fastrpc_utils (test_utils) with common test helpers - Add log_capture utility for capturing DSP/kernel log output - All utilities are consumed by both unit and feature test suites Signed-off-by: Dhruv Menon <dhrumeno@qti.qualcomm.com>
- Add fastrpc_test.idl defining the test RPC interface contract - Add AEEStdDef.idl and remote.idl as base IDL type dependencies - Add fastrpc_test_imp.c as the DSP-side stub implementation - Add idl/CMakeLists.txt to compile and link the IDL stub Signed-off-by: Dhruv Menon <dhrumeno@qti.qualcomm.com>
- Add root_all_tests.c as the top-level test runner entry point - Add unit tests for all DSPQueue API functions: create, close, write, read, peek, export, get_stat - Add feature tests covering end-to-end DSPQueue flows: echo flow, buffer management, data processing flow - Add dspqueue_feature_utils for shared feature test helpers - Add scripts/generate_report.sh for post-run report generation - Add CMakeLists.txt for both unit/ and feature/ test directories Signed-off-by: Dhruv Menon <dhrumeno@qti.qualcomm.com>
211b441 to
14507a4
Compare
| @@ -0,0 +1,114 @@ | |||
| # Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. | |||
There was a problem hiding this comment.
use year-less copyright
| # Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
| # | ||
| # bin/CMakeLists.txt |
There was a problem hiding this comment.
is this file really needed? Is it possible to stick with automake? Or do you think using cmake is better here?
There was a problem hiding this comment.
CMake is not strictly necessary, but it is genuinely the better tool for what base_test is doing. Migrating it to Automake is possible but would cost you real things.
- submodule integration: Cmake makes it a 1 liner
- CONFIGURE_DEPENDS auto-discovery -> makes it easier to create new test/auto discovers tests without hardcoding file source into build files for every new addition
- Each layer propagates include paths and compile definitions transitively via target_include_directories(... INTERFACE ...).
unity_dep → utils_dep → fastrpc_dep → common_test_dep → suite libs → test_fastrpc
In Automake, there is no equivalent — you would have to repeat _CFLAGS and _LDADD on every binary, or use a shared AM_CFLAGS that applies globally
- each platform file sets the full LLVM toolchain (clang, ld.lld, llvm-ar, etc.) and the right --target= triple. Under Automake this is done by ./configure --host=aarch64-linux-gnu or --host=aarch64-linux-android, which works but the Android NDK path resolution (ANDROID_NDK_HOME) and the NDK clang wrapper name (aarch64-linux-android35-clang) would need custom AC_ARG_WITH and AC_SUBST logic in configure.ac.
if i do move to automake, can we saperate it from top level automake build? because
the tests are architecturally a standalone consumer project, not part of the library build
| @@ -0,0 +1,73 @@ | |||
| # Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. | |||
There was a problem hiding this comment.
year-less copyright everywhere
| @@ -0,0 +1,91 @@ | |||
| #ifndef AEESTDDEF_IDL | |||
There was a problem hiding this comment.
there are plans to bring this IDL here: #356
can you use the same one?
| @@ -0,0 +1,32 @@ | |||
| interface remote_handle64 { | |||
| /** | |||
| * Opens the handle in the specified domain. If this is the first | |||
There was a problem hiding this comment.
same comment as above