diff --git a/SConstruct b/SConstruct index 841f14c..4de5056 100644 --- a/SConstruct +++ b/SConstruct @@ -59,4 +59,6 @@ for mode in (MODE.split(',') if MODE else ['debug']): CPPPATH=[SRC_DIR]) # Get test binaries. - do_sconscript(env, TEST_DIR, out_dir.Dir('test')) + test = do_sconscript(env, TEST_DIR, out_dir.Dir('test')) + run_tests = env.Alias('test', [test], test[0].path) + env.AlwaysBuild(run_tests) diff --git a/test/SConscript b/test/SConscript index 0f6a24b..2f3afcc 100644 --- a/test/SConscript +++ b/test/SConscript @@ -26,4 +26,5 @@ for f in files: objs.append(env.Object(f)) # TODO: Add the library target for the package to test to LIBS. -env.Program('test', objs, LIBS=['gtest']) +test = env.Program('test', objs, LIBS=['gtest']) +Return('test')