Improve test compatibility

Get rid of the old AVR simulator extern "C" hack, because
clang warns about it. Instead use a weak symbol to resolve
the app_main() name when running a C++ main program.
This commit is contained in:
Petteri Aimonen
2025-11-03 14:49:11 +02:00
parent 7e19a0db72
commit 722ef054b8
11 changed files with 17 additions and 15 deletions
+6 -3
View File
@@ -1,7 +1,10 @@
# Test stack usage
# This test case intentionally performs access outside the legal stack area,
# so it may have to be skipped to avoid false positives on memory safety tools.
Import("env")
env.NanopbProto(["stackusage", "stackusage.options"])
test = env.Program(["stackusage.c", "stackusage.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"])
env.RunTest(test)
if not env.get("NOUNSAFE"):
env.NanopbProto(["stackusage", "stackusage.options"])
test = env.Program(["stackusage.c", "stackusage.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"])
env.RunTest(test)