[PATCH 3/4] Add optional ignore_configs attribute

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Thu Mar 31 10:00:24 UTC 2016


On Wed, Mar 30, 2016 at 02:58:16PM +0200, msuraev at sysmocom.de wrote:
> From: Max <msuraev at sysmocom.de>
> 
> This attribute in osmoappdesc.py allows to ignore certain configs while
> running vty tests. It's handy for hardware-specific or otherwise special
> configuration examples.
> ---
>  osmopy/osmotestconfig.py | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py
> index ce47cf3..808048d 100644
> --- a/osmopy/osmotestconfig.py
> +++ b/osmopy/osmotestconfig.py
[...]
> @@ -155,8 +155,8 @@ def check_configs_tested(basedir, app_configs):
>  
>  
>  def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True,
> -                  confpath=".", rmtmp=False):
> -    check_configs_tested("doc/examples/", app_configs)
> +                  confpath=".", rmtmp=False, ignore_configs=[]):
> +    check_configs_tested("doc/examples/", app_configs, ignore_configs)
>      errors = 0
>      for app in apps:
>          if not app_exists(app):
> @@ -202,10 +202,11 @@ if __name__ == '__main__':
>  
>      apps = osmoappdesc.apps
>      configs = osmoappdesc.app_configs
> +    ignores = getattr(osmoappdesc, 'ignore_configs', [])
>  
>      if args.e1nitb:
>          configs['nitb'].extend(osmoappdesc.nitb_e1_configs)
>  
>      os.chdir(workdir)
> -    sys.exit(test_all_apps(apps, configs, confpath=confpath,
> -                           verbose=args.verbose))
> +    sys.exit(test_all_apps(apps, configs, ignore_configs=ignores,
> +                           confpath=confpath, verbose=args.verbose))

would have been slightly more beautiful to put ignore_configs at the end
like in the def above, and would have made for a slightly smaller diff,
too...  but whatever.

~Neels

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20160331/e21d846b/attachment.bin>


More information about the OpenBSC mailing list