I’ve added a very basic test to my project in the test
folder (see below).
And I’ve added a section to platform.io for [native]. Unfortunately, when I run Advanced → Test it tries to build all of my libraries that have platform-specific dependencies.
Is there any way to filter the libraries that are included? I can’t find any options in the testing documentation to do this.
platform.io configuration:
[env:native]
platform = native
targets = test
test_build_project_src = false
# enable C++11 extensions
build_flags = -std=c++11
Simple unit test:
#include <unity.h>
#include <string.h>
void test_example(void)
{
TEST_ASSERT_EQUAL(6, 3 + 3);
}
int main(int argc, char **argv)
{
UNITY_BEGIN();
RUN_TEST(test_example);
UNITY_END();
return 0;
}