title: scons - how to run something /after/ all targets have been built
body: <p>I've recently picked up scons to implement a multi-platform build framework for a medium sized C++ project. The build generates a bunch of unit-tests which should be invoked at the end of it all. How does one achieve that sort of thing? </p>
  
  <p>For example in my top level sconstruct, I have</p>
  
  <pre><code>subdirs=['list', 'of', 'my', 'subprojects']
  for subdir in subdirs:
      SConscript(dirs=subdir, exports='env', name='sconscript',
         variant_dir=subdir+os.sep+'build'+os.sep+mode, duplicate=0)
  </code></pre>
  
  <p>Each of the subdir has its unit-tests, however, since there are dependencies between the dlls and executables built inside them - i want to hold the running of tests until all the subdirs have been built and installed (I mean, using env.Install).</p>
  
  <p>Where should I write the loop to iterate through the built tests and execute them? I tried putting it just after this loop - but since scons doesn't let you control the order of execution - it gets executed well before I want it to.</p>
  
  <p>Please help a scons newbie. :)</p>
  
  <p>thanks,</p>