The AOCL Build-It-Yourself project includes comprehensive test executables
to validate library functionality. Tests can be enabled by setting
-DENABLE_TESTS=ON during CMake configuration.
Build with Tests
cmake --preset aocl-linux-make-lp-ga-gcc-config \
-DENABLE_TESTS=ON
cd build
cmake --build . --target install -j 10
cmake --build . --target test_original_symbols -j 10
./test/test_original_symbols
Test Coverage
75 test functions covering 9 AOCL libraries
Tests include: BLAS, LAPACK, Sparse, LibM, Crypto, Compression, Data Analytics, LibMem, Utils
Validates library functionality and API correctness
Symbol Renaming Tests
When symbol renaming is enabled (with -DSYMBOL_RENAME_PREFIX=<prefix>),
an additional test executable test_renamed_symbols is built to validate
renamed symbols:
cmake --preset aocl-linux-make-lp-ga-gcc-config \
-DENABLE_TESTS=ON \
-DSYMBOL_RENAME_PREFIX=AOCL_
cd build
cmake --build . --target install -j 10
cmake --build . --target test_original_symbols test_renamed_symbols -j 10
./test/test_original_symbols # Tests original symbols
./test/test_renamed_symbols # Tests renamed symbols with prefix
Note
When symbol renaming is disabled, only test_original_symbols executable
is built. When enabled, both test_original_symbols and
test_renamed_symbols executables are built simultaneously.
In addition to runtime tests, C++ symbol/header rewrite behavior is validated
by unit tests in test/test_rename_symbols_cpp.py. These tests verify C++
mangled symbol rewriting, namespace fallback updates, API family rewrite
behavior, and C++ wrapper identifier renaming in generated headers.