Unity: Avoid "weak" attributes on Windows

This commit is contained in:
Ivan Kravets
2022-04-23 11:05:28 +03:00
parent f88904e246
commit 9b221a06c8
2 changed files with 9 additions and 6 deletions

View File

@ -73,7 +73,11 @@ void unityOutputComplete();
#include <unity_config.h>
#if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA)
# define UNITY_WEAK_ATTRIBUTE __attribute__((weak))
# if defined(__GNUC__) || defined(__ghs__) /* __GNUC__ includes clang */
# if !(defined(__WIN32__) && defined(__clang__)) && !defined(__TMS470__)
# define UNITY_WEAK_ATTRIBUTE __attribute__((weak))
# endif
# endif
#endif
#ifdef __cplusplus
@ -207,9 +211,11 @@ void unityOutputComplete(void) { unittest_uart_end(); }
UNITY_CONFIG_DIR=os.path.join("$BUILD_DIR", "unity_config"),
BUILD_UNITY_CONFIG_DIR=os.path.join("$BUILD_DIR", "unity_config_build"),
)
env.Append(CPPPATH=["$UNITY_CONFIG_DIR"])
self.generate_unity_extras(env.subst("$UNITY_CONFIG_DIR"))
env.BuildSources("$BUILD_UNITY_CONFIG_DIR", "$UNITY_CONFIG_DIR")
env.Append(
CPPPATH=["$UNITY_CONFIG_DIR"],
LIBS=[env.BuildLibrary("$BUILD_UNITY_CONFIG_DIR", "$UNITY_CONFIG_DIR")],
)
def generate_unity_extras(self, dst_dir):
dst_dir = Path(dst_dir)

View File

@ -102,9 +102,6 @@ void setUp(){
my_extra_fun();
}
void tearDown(){
}
void dummy_test(void) {
TEST_ASSERT_EQUAL(1, TEST_ONE);
}