only publish testcases appear in testcases.py to save time
[releng.git] / utils / test / scripts / conf_utils.py
index e35d5ed..cf95998 100644 (file)
@@ -6,15 +6,19 @@ with open('./testcases.yaml') as f:
 f.close()
 
 
+def compose_format(fmt):
+    return 'format_' + fmt.strip()
+
+
 def get_format(project, case):
     testcases = testcases_yaml.get(project)
     if isinstance(testcases, list):
         for case_dict in testcases:
             if case_dict['name'] == case:
-                return 'format_' + case_dict['format'].strip()
+                return compose_format(case_dict['format'])
     return None
 
 
 if __name__ == '__main__':
     fmt = get_format('functest', 'vping_ssh')
-    print fmt
\ No newline at end of file
+    print fmt