From 1cf219a80b2070cc001b9609e015e4f654167489 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Wed, 2 Aug 2023 15:39:38 +0530 Subject: [PATCH] Enable Werror for Posix Demo Coverage Test target (#1059) Enable Werror for Posix Demo Coverage Test target Werror cannot be enabled for the non coverage test because tracelyzer code generates warnings in that target. Also add "Build Posix_GCC Demo for Coverage Test" in the PR checks to catch warnings from kernel code in PR checks. Signed-off-by: Gaurav Aggarwal --- .github/workflows/freertos_demos.yml | 6 ++++++ FreeRTOS/Demo/Posix_GCC/FreeRTOSConfig.h | 1 + FreeRTOS/Demo/Posix_GCC/Makefile | 1 + 3 files changed, 8 insertions(+) diff --git a/.github/workflows/freertos_demos.yml b/.github/workflows/freertos_demos.yml index ea5494807..37f391985 100644 --- a/.github/workflows/freertos_demos.yml +++ b/.github/workflows/freertos_demos.yml @@ -231,6 +231,11 @@ jobs: exit 1 fi + - name: Build Posix_GCC Demo for Coverage Test + shell: bash + working-directory: FreeRTOS/Demo/Posix_GCC + run: make -j COVERAGE_TEST=1 + - name: Build Posix_GCC Full Demo id: build-posix-gcc-full-demo shell: bash @@ -239,6 +244,7 @@ jobs: # Build Posix_GCC Full Demo echo "::group::Build Posix_GCC Full Demo" sed -i -z "s/int[[:space:]]*main[[:space:]]*([[:space:]]*void[[:space:]]*)\n{/int main( void ){setvbuf( stdout, NULL, _IONBF, 0 );/g" main.c + make clean make -j echo "::endgroup::" if [ "$?" = "0" ]; then diff --git a/FreeRTOS/Demo/Posix_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/Posix_GCC/FreeRTOSConfig.h index 2543bf432..08efa3d87 100644 --- a/FreeRTOS/Demo/Posix_GCC/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/Posix_GCC/FreeRTOSConfig.h @@ -59,6 +59,7 @@ #define configUSE_QUEUE_SETS 1 #define configUSE_TASK_NOTIFICATIONS 1 #define configSUPPORT_STATIC_ALLOCATION 1 +#define configRECORD_STACK_HIGH_ADDRESS 1 /* Software timer related configuration options. The maximum possible task * priority is configMAX_PRIORITIES - 1. The priority of the timer task is diff --git a/FreeRTOS/Demo/Posix_GCC/Makefile b/FreeRTOS/Demo/Posix_GCC/Makefile index 3d6bd8671..d86921a88 100644 --- a/FreeRTOS/Demo/Posix_GCC/Makefile +++ b/FreeRTOS/Demo/Posix_GCC/Makefile @@ -73,6 +73,7 @@ endif ifeq ($(COVERAGE_TEST),1) CPPFLAGS += -DprojCOVERAGE_TEST=1 + CFLAGS += -Werror else CPPFLAGS += -DprojCOVERAGE_TEST=0 # Trace library.