# HG changeset patch # User ronw@google.com # Date 1372705348 0 # Node ID bf89b122a68315dc2ba6dca1fc71b8d0b94aa106 # Parent 597913e855fda7bb91a73d3a376f1f401e2969cc Build carfac and sai tests as independent programs. diff -r 597913e855fd -r bf89b122a683 trunk/carfac/SConstruct --- a/trunk/carfac/SConstruct Thu Jun 27 22:28:42 2013 +0000 +++ b/trunk/carfac/SConstruct Mon Jul 01 19:02:28 2013 +0000 @@ -70,13 +70,15 @@ 'cd tmp && cmake . && make', ]) -test_sources = [ - 'carfac_test.cc', - 'sai_test.cc', +test_targets = [ + 'carfac_test', + 'sai_test', ] -test_program = env.Program(target = 'test', - source = test_sources, - LIBS = ['carfac', 'gtest', 'gtest_main', 'pthread'], - LIBPATH = ['.', 'tmp']) -test_alias = Alias('test', [test_program], test_program[0].abspath) -AlwaysBuild(test_alias) +test_programs = [env.Program(target = test_target, + source = ['%s.cc' % test_target], + LIBS = ['carfac', 'gtest', 'gtest_main', 'pthread'], + LIBPATH = ['.', 'tmp']) + for test_target in test_targets] +run_all_tests = env.Command('test', + test_programs, + ['./%s' % x for x in test_targets])