Salome HOME
do not read .sh environment files anymore
[modules/kernel.git] / bin / appli_gen.py
index 838046cb4f521a539a6e54ab4fec6c2fd7be7cf1..4e04d1d3256f84712f93c8ac0c82fc4dbd295b5f 100644 (file)
@@ -43,6 +43,7 @@ import optparse
 appli_tag   = "application"
 prereq_tag  = "prerequisites"
 context_tag = "context"
+sha1_collect_tag = "sha1_collections"
 system_conf_tag  = "system_conf"
 modules_tag = "modules"
 module_tag  = "module"
@@ -93,6 +94,10 @@ class xml_parser:
         if self.space == [appli_tag, context_tag] and path_att in attrs.getNames():
             self.config["context_path"] = attrs.getValue( path_att )
             pass
+        # --- if we are analyzing "sha1_collection" element then store its "path" attribute
+        if self.space == [appli_tag, sha1_collect_tag] and path_att in attrs.getNames():
+            self.config["sha1_collect_path"] = attrs.getValue( path_att )
+            pass
         # --- if we are analyzing "system_conf" element then store its "path" attribute
         if self.space == [appli_tag, system_conf_tag] and path_att in attrs.getNames():
             self.config["system_conf_path"] = attrs.getValue( path_att )
@@ -227,16 +232,18 @@ def install(prefix, config_file, verbose=0):
             pass
         pass
 
+    # Generate CTestCustom.cmake to handle long output
+    ctest_custom = os.path.join(home_dir, 'bin', 'salome', 'test', "CTestCustom.cmake")
+    with open(ctest_custom, 'w') as f:
+      f.write("SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1048576) # 1MB\n")
+      f.write("SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 1048576) # 1MB\n")
+
     appliskel_dir = os.path.join(home_dir, 'bin', 'salome', 'appliskel')
 
     for fn in ('envd',
                'getAppliPath.py',
                'kill_remote_containers.py',
-               'runAppli',           # OBSOLETE (replaced by salome)
-               'runConsole',         # OBSOLETE (replaced by salome)
                'runRemote.sh',
-               'runSalomeScript',    # OBSOLETE (replaced by salome)
-               'runSession',         # OBSOLETE (replaced by salome)
                'salome',
                'update_catalogs.py',
                '.bashrc',
@@ -273,6 +280,14 @@ def install(prefix, config_file, verbose=0):
         print "WARNING: context file does not exist"
         pass
 
+    if _config.has_key("sha1_collect_path") and os.path.isfile(_config["sha1_collect_path"]):
+        shutil.copyfile(_config["sha1_collect_path"],
+                        os.path.join(home_dir, 'sha1_collections.txt'))
+        pass
+    else:
+        print "WARNING: context file does not exist"
+        pass
+
     if _config.has_key("system_conf_path") and os.path.isfile(_config["system_conf_path"]):
         shutil.copyfile(_config["system_conf_path"],
                         os.path.join(home_dir, 'env.d', 'envConfSystem.sh'))