mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-12 15:33:45 +08:00
27 lines
1.7 KiB
Python
27 lines
1.7 KiB
Python
Import('env', 'arch', 'common', 'messaging')
|
|
|
|
if GetOption('extras') or any(target.startswith('openpilot/selfdrive/pandad/tests/') for target in COMMAND_LINE_TARGETS):
|
|
# Header-only AOL USB/status negotiation test also builds on Darwin hosts.
|
|
if arch != "Darwin":
|
|
usb_test = env.Object('tests/panda_usb_test.o', 'panda_usb.cc')
|
|
env.Program('tests/test_panda_usb', ['tests/test_panda_usb.cc', usb_test], LIBS=[common, 'pthread'])
|
|
env.Program('tests/test_aol_protocol', ['tests/test_aol_protocol.cc'])
|
|
env.Program('tests/test_aol_wire', ['tests/test_aol_wire.cc'], LIBS=[messaging, 'capnp', 'kj'])
|
|
|
|
if arch != "Darwin":
|
|
libs = [common, messaging, 'pthread', 'usb-1.0']
|
|
panda = env.Library('panda', ['panda.cc', 'panda_usb.cc', 'spi.cc'])
|
|
|
|
env.Program('pandad', ['main.cc', 'pandad.cc', 'panda_safety.cc'], LIBS=[panda] + libs)
|
|
|
|
if GetOption('extras') or any(target.startswith('openpilot/selfdrive/pandad/tests/') for target in COMMAND_LINE_TARGETS):
|
|
env.Program('tests/test_pandad_canprotocol', ['tests/test_pandad_canprotocol.cc'], LIBS=[panda] + libs)
|
|
|
|
if GetOption('extras') or any(target.startswith('openpilot/selfdrive/pandad/tests/') for target in COMMAND_LINE_TARGETS):
|
|
env.Program('tests/test_panda_owner', ['tests/test_panda_owner.cc', 'panda_safety.cc'], LIBS=[panda] + libs)
|
|
|
|
# Linux-only producer timing: gettid, THREAD rusage, and the native IPC backend.
|
|
if arch != "Darwin" and (GetOption('extras') or any(target.startswith('openpilot/selfdrive/pandad/tests/') for target in COMMAND_LINE_TARGETS)):
|
|
env.Program('tests/test_producer_timing', ['tests/test_producer_timing.cc'], LIBS=['pthread'])
|
|
env.Program('tests/test_producer_sink', ['tests/test_producer_sink.cc'], LIBS=[common, 'pthread'])
|