X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2FSConstruct;h=ae79f710e579b2459bd0c8f1d4cf8d298c0f869f;hb=48f5dd83530a46dd2423277f4488fd4ce9c93b72;hp=9092d4f89bdf98edaa0e8aabb519f35fc8ead0d4;hpb=0f3c0f79bc83c3678c325f7e8e17dd031acaf77f;p=apps%2Fagl-service-can-low-level.git diff --git a/tests/SConstruct b/tests/SConstruct index 9092d4f8..ae79f710 100644 --- a/tests/SConstruct +++ b/tests/SConstruct @@ -72,6 +72,11 @@ if not env.GetOption('clean'): else: conf.env.Append(PROTOCPATH = '/usr/include') + # Check protoc version + status, output = conf.TryAction('$PROTOC --version > $TARGET') + if status: + conf.env['PROTOC_VERSION'] = output + # Check if libmudflap is available (only with GCC) if 'gcc' in env['CC']: if conf.CheckLib('mudflap'): @@ -88,7 +93,9 @@ if not env.GetOption('clean'): conf.env.Append(CORECFLAGS = extra) # Check if we can use undefined behaviour sanitizer (only with clang) - extra = '-fsanitize=undefined ' + # TODO: Fuzz test triggers the bool sanitizer, figure out whether to + # modify the fuzz test or to keep ignoring the check. + extra = '-fsanitize=undefined,integer -fno-sanitize-recover=undefined,integer -fsanitize-recover=bool ' if 'clang' in env['CC']: if conf.CheckCCFLAGS(extra, linkflags = extra): conf.env.Append(CORECFLAGS = extra) @@ -121,9 +128,6 @@ elif 'cl' in env['CC']: # More strict checks on the nanopb core env.Append(CORECFLAGS = '/W4') - - # PB_RETURN_ERROR triggers C4127 because of while(0) - env.Append(CFLAGS = '/wd4127') elif 'tcc' in env['CC']: # Tiny C Compiler env.Append(CFLAGS = '-Wall -Werror -g')