summaryrefslogtreecommitdiff
path: root/testsuite/driver/testutil.py
blob: ec45e939871953402b076ffe8249553ba5545d94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -----------------------------------------------------------------------------
# Utils
def version_to_ints(v):
    return [ int(x) for x in v.split('.') ]

def version_lt(x, y):
    return version_to_ints(x) < version_to_ints(y)

def version_le(x, y):
    return version_to_ints(x) <= version_to_ints(y)

def version_gt(x, y):
    return version_to_ints(x) > version_to_ints(y)

def version_ge(x, y):
    return version_to_ints(x) >= version_to_ints(y)