create a config_no_omf wrapper so we can drop the no_omf branch
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 11 Dec 2013 10:08:15 +0000 (11:08 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 11 Dec 2013 10:08:15 +0000 (11:08 +0100)
system/Makefile
system/config_default.py
system/config_no_omf.py [new file with mode: 0644]

index 35dd05e..61be534 100644 (file)
@@ -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)
 
index 4a6a9ec..49e165b 100644 (file)
@@ -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 (file)
index 0000000..cdb4ce0
--- /dev/null
@@ -0,0 +1,19 @@
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# 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 ]
+