diff --git a/SConscript b/SConscript new file mode 100644 index 0000000000..ed3aff754d --- /dev/null +++ b/SConscript @@ -0,0 +1,6 @@ +# panda fw +SConscript('board/SConscript') + +# test files +if GetOption('test'): + SConscript('tests/libpanda/SConscript') diff --git a/SConstruct b/SConstruct index 6cfc049e54..fd83d87523 100644 --- a/SConstruct +++ b/SConstruct @@ -1,5 +1,7 @@ -# panda fw -SConscript('board/SConscript') +AddOption('--test', + action='store_true', + default=True, + help='build test files') -# test files -SConscript('tests/libpanda/SConscript') +# panda fw & test files +SConscript('SConscript') diff --git a/tests/libpanda/SConscript b/tests/libpanda/SConscript index 71919ac27c..9ff9102470 100644 --- a/tests/libpanda/SConscript +++ b/tests/libpanda/SConscript @@ -5,7 +5,7 @@ env = Environment( '-fno-builtin', '-std=gnu11', ], - CPPPATH=[".", "#board/"], + CPPPATH=[".", "../../board"], ) env.SharedLibrary("libpanda.so", ["safety_helpers.c"]) diff --git a/tests/safety/SConscript b/tests/safety/SConscript deleted file mode 100644 index 809c651740..0000000000 --- a/tests/safety/SConscript +++ /dev/null @@ -1,11 +0,0 @@ -env = Environment( - CC='gcc', - CFLAGS=[ - '-nostdlib', - '-fno-builtin', - '-std=gnu11', - ], - CPPPATH=[".", "../../board"], -) - -env.SharedLibrary("libpandasafety.so", ["test.c"])