Config files can be specified in python.

If the config file is not specified in the file under test saru will look for `saruconf.py`, then `saru.conf`.

If a config file is specified in the file under test saru will first look for `XYZ.py`
then `XYZ`

The file is loaded as a module, and needs to export one function: `update_settings(testdir, settings)`. This function will be passed the directory of the file under test, and will be passed the list of settings obtained directly from that file. It can change any of the settings, and must return any extra settings that it needs. The following two examples are equivalent.

Config that modifies the existing settings

~~~{.py}
# A saru config file.
def update_settings( testdir, settings ):
  if "CxxInclude" not in settings:
    settings['CxxInclude'] = []
  settings['CxxInclude'].append("/usr/local/mylib/include")
  if "CxxLibs" not in settings:
    settings['CxxLibs'] = []
  settings['CxxLibs'].append("-L/usr/local/mylib/libs -lmylib")
  return {}
~~~

Config that returns extra settings

~~~{.py}
# A saru config file.
def update_settings( testdir, settings ):
  retval = {}
  retval['CxxInclude']=["/usr/local/mylib/include"]
  retval['CxxLibs']=["-L/usr/local/mylib/libs -lmylib"]
  return retval
~~~

Personally I like to extract helper methods and classes, and then use
them to configure the settings correctly, something that was impossible
using the old style config files.

For example with test files like this (using a custom `Requires` setting)
~~~{.cpp}
// SARU : Requires FeatureX
...
~~~

I can then have a config file like this which selects the right includes
for the tests using `FeatureX` on each platform.

~~~{.py}
# A saru config file.
import platform

def update_settings( testdir, settings ):
  retval = {}
  if ('Requires' in settings) and 'FeatureX' in settings['Requires']:
    if platform.system() == 'Linux':
      retval['CxxInclude']=["/usr/local/mylib/include"]
      retval['CxxLibs']=["-L/usr/local/mylib/libs -lmylib"]
    elif platform.system() == ... :
  ...
  return retval
~~~