Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: client/common_lib/cartesian_config.py

Issue 6883246: Merge autotest upstream from @5318 ~ @5336 (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | client/profilers/perf/perf.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/common_lib/cartesian_config.py
diff --git a/client/tests/kvm/kvm_config.py b/client/common_lib/cartesian_config.py
old mode 100755
new mode 100644
similarity index 96%
rename from client/tests/kvm/kvm_config.py
rename to client/common_lib/cartesian_config.py
index 4dbb1d49b508643dc7935dbc6ed988f811725b6c..ac04c24c3cec8f742a04835c2a3b69ffa951603f
--- a/client/tests/kvm/kvm_config.py
+++ b/client/common_lib/cartesian_config.py
@@ -1,37 +1,35 @@
#!/usr/bin/python
"""
-KVM test configuration file parser
+Cartesian configuration format file parser.
+
+ Filter syntax:
+ , means OR
+ .. means AND
+ . means IMMEDIATELY-FOLLOWED-BY
+
+ Example:
+ qcow2..Fedora.14, RHEL.6..raw..boot, smp2..qcow2..migrate..ide
+ means match all dicts whose names have:
+ (qcow2 AND (Fedora IMMEDIATELY-FOLLOWED-BY 14)) OR
+ ((RHEL IMMEDIATELY-FOLLOWED-BY 6) AND raw AND boot) OR
+ (smp2 AND qcow2 AND migrate AND ide)
+
+ Note:
+ 'qcow2..Fedora.14' is equivalent to 'Fedora.14..qcow2'.
+ 'qcow2..Fedora.14' is not equivalent to 'qcow2..14.Fedora'.
+ 'ide, scsi' is equivalent to 'scsi, ide'.
+
+ Filters can be used in 3 ways:
+ only <filter>
+ no <filter>
+ <filter>:
+ The last one starts a conditional block.
@copyright: Red Hat 2008-2011
"""
import re, os, sys, optparse, collections
-
-# Filter syntax:
-# , means OR
-# .. means AND
-# . means IMMEDIATELY-FOLLOWED-BY
-
-# Example:
-# qcow2..Fedora.14, RHEL.6..raw..boot, smp2..qcow2..migrate..ide
-# means match all dicts whose names have:
-# (qcow2 AND (Fedora IMMEDIATELY-FOLLOWED-BY 14)) OR
-# ((RHEL IMMEDIATELY-FOLLOWED-BY 6) AND raw AND boot) OR
-# (smp2 AND qcow2 AND migrate AND ide)
-
-# Note:
-# 'qcow2..Fedora.14' is equivalent to 'Fedora.14..qcow2'.
-# 'qcow2..Fedora.14' is not equivalent to 'qcow2..14.Fedora'.
-# 'ide, scsi' is equivalent to 'scsi, ide'.
-
-# Filters can be used in 3 ways:
-# only <filter>
-# no <filter>
-# <filter>:
-# The last one starts a conditional block.
-
-
class ParserError:
def __init__(self, msg, line=None, filename=None, linenum=None):
self.msg = msg
@@ -190,11 +188,11 @@ class NegativeCondition(OnlyFilter):
class Parser(object):
"""
- Parse an input file or string that follows the KVM Test Config File format
+ Parse an input file or string that follows the Cartesian Config File format
and generate a list of dicts that will be later used as configuration
- parameters by the KVM tests.
+ parameters by autotest tests that use that format.
- @see: http://www.linux-kvm.org/page/KVM-Autotest/Test_Config_File
+ @see: http://autotest.kernel.org/wiki/CartesianConfig
"""
def __init__(self, filename=None, debug=False):
« no previous file with comments | « no previous file | client/profilers/perf/perf.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698