From: <sv...@ww...> - 2007-07-31 06:44:49
|
Author: mkrose Date: 2007-07-30 23:43:40 -0700 (Mon, 30 Jul 2007) New Revision: 2162 Modified: trunk/csp/SConstruct trunk/csp/tools/build/registry.py Log: Register runtests and dir.runtests as scons aliases so that they can be used when calling 'scons -u' from a subdirectory. Add a directory runtests example to the build help message. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=2162 Modified: trunk/csp/SConstruct =================================================================== --- trunk/csp/SConstruct 2007-07-31 06:42:27 UTC (rev 2161) +++ trunk/csp/SConstruct 2007-07-31 06:43:40 UTC (rev 2162) @@ -109,12 +109,13 @@ """ COMMON TARGETS: - scons config check for necessary headers and libraries - scons all build everything - scons cspsim build the main flight simulator client - scons indexserver build the master server needed for multiplayer - scons dox generate doxygen documentation - scons runtests build and run all unittests + scons config check for necessary headers and libraries + scons all build everything + scons cspsim build the main flight simulator client + scons indexserver build the master server needed for multiplayer + scons dox generate doxygen documentation + scons runtests build and run all unittests + scons csplib.runtests build and run all unittests in csplib """ INCLUDE = ['#/..', build.GetPythonInclude()] Modified: trunk/csp/tools/build/registry.py =================================================================== --- trunk/csp/tools/build/registry.py 2007-07-31 06:42:27 UTC (rev 2161) +++ trunk/csp/tools/build/registry.py 2007-07-31 06:43:40 UTC (rev 2162) @@ -127,10 +127,11 @@ self._dir_tests[target._path] = [] self._dir_tests[target._path].append(object) run_alias = os.path.join(target._path, target._name) + '.run' - env.Command(run_alias, object, util.SilentAction(self._RunOneTest)) - env.Command('runtests', self._tests, util.SilentAction(self._RunTests)) + env.Alias(run_alias, env.Command(run_alias, object, util.SilentAction(self._RunOneTest))) + env.Alias('runtests', env.Command('runtests', self._tests, util.SilentAction(self._RunTests))) for path, targets in self._dir_tests.items(): - env.Command(path + '.runtests', targets, util.SilentAction(self._RunTests)) + alias = path + '.runtests' + env.Alias(alias, env.Command(alias, targets, util.SilentAction(self._RunTests))) # sample aliases for running tests: # $ scons runtests # $ scons cspsim.runtests |