title: Boost Build: Use a feature or a variable
body: <p>I have a DB integration test that I'm running using Boost Build. The test needs some commandline args (DB username, password). What's the best way to set that via Boost Build in a way that's configurable by the user (via environment variables, bjam commandline, user-config.jam)?</p>
  
  <p>I know I can do this with variables:</p>
  
  <pre><code>import os ;
  local DB_PASS = [ os.environ DB_PASS ] ;
  run dbtest : test.cpp : --dbpass $(DB_PASS) ;
  </code></pre>
  
  <p>This can be set via a the commandline (<code>bjam -s DB_PASS=pass</code>) or via an environment variable.</p>
  
  <p>On the other hand, Boost Build tends to do most of its configuration via the feature mechanism. I could probably define a new feature and get the configuration data to the right place that way.</p>
  
  <p>What's the pros and cons of each approach? Which one should I take? If features: how would I do that?</p>
  
  <p>NB: The actual test is within a Jamfile that's used by the Jamroot, so not directly in the root file.</p>