From a49f5c7b6b99fc18709ce2615875c1f456c81f03 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 11 Dec 2013 11:08:15 +0100 Subject: [PATCH] create a config_no_omf wrapper so we can drop the no_omf branch --- system/Makefile | 4 ++-- system/config_default.py | 1 + system/config_no_omf.py | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 system/config_no_omf.py diff --git a/system/Makefile b/system/Makefile index 35dd05e..61be534 100644 --- a/system/Makefile +++ b/system/Makefile @@ -1,5 +1,5 @@ tags: - find . '(' -name '*.py' -o -name 'qemu-*' ')' | grep -v '.svn/' | xargs etags + find . '(' -name '*.py' -o -name 'qemu-*' ')' | grep -v '.git/' | xargs etags .PHONY: tags @@ -13,7 +13,7 @@ PLCSSH:=root@$(TESTMASTER):$(BUILD) endif LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' --exclude 'arg*' --exclude LocalTestResources.py -RSYNC_EXCLUDES := --exclude .svn --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) +RSYNC_EXCLUDES := --exclude .git --exclude CVS --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES) RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,) RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) diff --git a/system/config_default.py b/system/config_default.py index 4a6a9ec..49e165b 100644 --- a/system/config_default.py +++ b/system/config_default.py @@ -404,6 +404,7 @@ def slices (options,index): slice_spec['initscriptstamp']='the_script_name' # 3rd one is omf-friendly else: + # potentially turned off with config_no_omf slice_spec ['omf-friendly'] = True return slice_spec # usual index is 1, additional plc's then get 2... diff --git a/system/config_no_omf.py b/system/config_no_omf.py new file mode 100644 index 0000000..cdb4ce0 --- /dev/null +++ b/system/config_no_omf.py @@ -0,0 +1,19 @@ +# Thierry Parmentelat +# Copyright (C) 2010 INRIA +# +# remove slice_spec['omf-friendly'] +# +# this is for testing the system with a broken OMF-friendly feature +# as it happens the lxc builds can't build rvm +# in a first step I had created a no_omf branch but that was definitely a wrong idea + +def remove_omf (plc_spec): + for slice in plc_spec['slices']: + if 'omf-friendly' in slice: + print 'Turning off omf-friendly in slice',slice['slice_fields']['name'] + del slice['omf-friendly'] + return plc_spec + +def config (plc_specs, options): + return [ remove_omf(plc) for plc in plc_specs ] + -- 2.43.0