diff options
| author | drowe67 <[email protected]> | 2023-07-14 13:49:19 +0930 |
|---|---|---|
| committer | David Rowe <[email protected]> | 2023-07-14 13:49:19 +0930 |
| commit | 597e9eb965b6b79279d045a43fde60e031d2e716 (patch) | |
| tree | e117fa8c20a29def6c08c54564e4cf549a7410e0 | |
| parent | fb4547abe6fc20a0e9aa4c3049d5359027d0d89e (diff) | |
experimental clang-format ctest
| -rw-r--r-- | .github/workflows/cmake.yml | 2 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | README.md | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 79eb86a..61c9c5c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,7 +21,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind + sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind clang-format - name: Create Build Directory shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index e322dcb..86d5599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,6 +308,10 @@ if(UNITTEST) include(CTest) enable_testing() + add_test(NAME test_clang_format + COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}; + clang-format --dry-run --Werror src/*.c src/*.h unittest/*.c demo/*.c") + add_test(NAME test_freedv_get_hash COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/thash") @@ -113,7 +113,7 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn 1. Install GNU Octave and libraries on Ubuntu with: ``` - sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind + sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind clang-format ``` 1. To build and run the tests: ``` |
