Skip to content

Commit

Permalink
Fix project properties
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeGalan committed Jan 28, 2022
1 parent a175b90 commit c9d10d2
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 48 deletions.
10 changes: 2 additions & 8 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
"-I Profiles/Motor",
"-I Profiles/Servo_motor",
"-I Profiles/Voltage",
"-I Bootloader",
"-I test/resources/Unity",
"-I test/resources/Mock",
"-I test/resources/Scenarios"
"-I Bootloader"
],
"srcFilter": [
"+<*.c>",
Expand All @@ -30,10 +27,7 @@
"+<../Profiles/Motor/*.c>",
"+<../Profiles/Servo_motor/*.c>",
"+<../Profiles/Voltage/*.c>",
"+<../Bootloader/*.c>",
"+<../test/resources/Unity/*.c>",
"+<../test/resources/Mock/*.c>",
"+<../test/resources/Scenarios/*.c>"
"+<../Bootloader/*.c>"
]
},
"repository": {
Expand Down
11 changes: 11 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

This directory is intended for PlatformIO Unit Testing and project tests.

Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.

More information about PlatformIO Unit Testing:
- https://docs.platformio.org/page/plus/unit-testing.html
10 changes: 10 additions & 0 deletions test/luos/config/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ test_transport = custom
test_build_project_src = true
build_type = debug

src_filter =
"+<../test/resources/Unity/*.c>"
"+<../test/resources/Mock/*.c>"
"+<../test/resources/Scenarios/*.c>"

build_flags =
-I inc
-I test
-I test/resources/Unity
-I test/resources/Mock
-I test/resources/Scenarios

-include ./test/luos/config/node_config.h

-lgcov
--coverage
-fprofile-arcs
Expand Down
14 changes: 12 additions & 2 deletions test/msg_alloc/config/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ test_transport = custom
test_build_project_src = true
build_type = debug

src_filter =
"+<../test/resources/Unity/*.c>"
"+<../test/resources/Mock/*.c>"
"+<../test/resources/Scenarios/*.c>"

build_flags =
-I inc
-I test
-include ./test/msg_alloc/config/node_config.h
-I test/resources/Unity
-I test/resources/Mock
-I test/resources/Scenarios

-include ./test/luos/config/node_config.h

-lgcov
--coverage
-fprofile-arcs
Expand All @@ -32,4 +42,4 @@ extra_scripts =
./test/resources/Unity/unit_test_script.py

; debug_test value = unit test directory
debug_test = msg_alloc
debug_test = msg_alloc
1 change: 0 additions & 1 deletion test/resources/Mock/luos_hal_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ static uint32_t *last_page_stub_flash_x86 = &stub_flash_x86[FLASH_PAGE_NUMBER -
#define PAGE_SIZE (uint32_t) FLASH_PAGE_SIZE
#endif
#ifndef ADDRESS_LAST_PAGE_FLASH
//#define ADDRESS_LAST_PAGE_FLASH (uint32_t*)&stub_flash_x86[FLASH_PAGE_NUMBER - 1][FLASH_PAGE_SIZE]
#define ADDRESS_LAST_PAGE_FLASH (uint32_t) last_page_stub_flash_x86
#endif

Expand Down
2 changes: 2 additions & 0 deletions test/resources/Unity/unit_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <string.h>
#include <stdbool.h>
#include <unity.h>
//#include "../Mock/luos_hal.h"
//#include "../Mock/luos_hal_config.h"
#include "luos_hal.h"
#include "luos_hal_config.h"
#include "luos.h"
Expand Down
14 changes: 12 additions & 2 deletions test/template/config/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ test_transport = custom
test_build_project_src = true
build_type = debug

src_filter =
"+<../test/resources/Unity/*.c>"
"+<../test/resources/Mock/*.c>"
"+<../test/resources/Scenarios/*.c>"

build_flags =
-I inc
-I test
-include ./test/template/config/node_config.h
-I test/resources/Unity
-I test/resources/Mock
-I test/resources/Scenarios

-include ./test/luos/config/node_config.h

-lgcov
--coverage
-fprofile-arcs
Expand All @@ -30,6 +40,6 @@ build_flags =

extra_scripts =
./test/resources/Unity/unit_test_script.py

; debug_test value = unit test directory
debug_test = template
35 changes: 0 additions & 35 deletions test/template/config/platformio.ini.bak

This file was deleted.

0 comments on commit c9d10d2

Please sign in to comment.