2

I have a very complex scons project. One of the targets include running a unittest application that is generated as part of the build.

I would like to be able to say:

scons <target> <some magic: arguments>

where some magic is something that will tell scons for which execution step the arguments are and the arguments are completely arbitrary arguments that the unittest application knows how to interpret.

the question is, is there already mechanism to do this, or I need to add code in my scons to achieve this - in both cases a pointers how to do it will be great.

gsf
  • 6,612
  • 7
  • 35
  • 64

1 Answers1

2

Please check the User Guide at http://scons.org/doc/production/HTML/scons-user.html . You'll be interested in chapter 10 "Controlling a Build From the Command Line", which describes ways how to propagate values from the command-line to your SConscripts. Reserve an Environment Variable, e.g. "UNITTST_ARGS", and use it to transport your arguments through to your SConscript, where you actually call your external unittest application.

dirkbaechle
  • 3,984
  • 14
  • 17