Files
sunnypilot/selfdrive/loggerd/SConscript
Dean Lee 0fac38e34f LoggerState: test cases (#21855)
* test multiple threads writing to log

* fix typo

* use util::getenv

* check INIT_DATA and SENTINEL

* test END_OF_SEGMENT

* add comment

* test multiple threads logging and rotation

* cleanup

* update

* LoggerHandle:quick fix

* cleanup

* revert test_loggerd.py

* refactor test case

* check lock file

* check refcnt after close

* test_runner.cc

d

* int eixt_signal
old-commit-hash: 935cbd3139
2021-08-30 17:12:09 -07:00

32 lines
877 B
Python

Import('env', 'arch', 'cereal', 'messaging', 'common', 'visionipc', 'gpucommon')
logger_lib = env.Library('logger', ["logger.cc"])
libs = [logger_lib, common, cereal, messaging, visionipc,
'zmq', 'capnp', 'kj', 'z',
'avformat', 'avcodec', 'swscale', 'avutil',
'yuv', 'bz2', 'OpenCL']
src = ['loggerd.cc']
if arch in ["aarch64", "larch64"]:
src += ['omx_encoder.cc']
libs += ['OmxCore', 'gsl', 'CB'] + gpucommon
if arch == "aarch64":
libs += ['OmxVenc', 'cutils']
else:
libs += ['pthread']
else:
src += ['raw_logger.cc']
libs += ['pthread']
if arch == "Darwin":
# fix OpenCL
del libs[libs.index('OpenCL')]
env['FRAMEWORKS'] = ['OpenCL']
env.Program(src, LIBS=libs)
env.Program('bootlog.cc', LIBS=libs)
if GetOption('test'):
env.Program('tests/test_logger', ['tests/test_runner.cc', 'tests/test_logger.cc'], LIBS=[libs])