Index: lnt/trunk/lnt/testing/util/compilers.py =================================================================== --- lnt/trunk/lnt/testing/util/compilers.py +++ lnt/trunk/lnt/testing/util/compilers.py @@ -77,25 +77,25 @@ if not m: fatal("unable to determine cc1 binary: %r: %r" % (cc, ln)) cc1_binary, = m.groups() + if cc1_binary is None: + error("unable to find compiler cc1 binary: %r: %r" % (cc, cc_version)) if version_ln is None: error("unable to find compiler version: %r: %r" % (cc, cc_version)) - if cc1_binary is None: - error("unable to find compiler cc1 binary: %r: %r" % ( - cc, cc_version)) - m = re.match(r'(.*) version ([^ ]*) +(\([^(]*\))(.*)', version_ln) - if m is not None: - cc_name,cc_version_num,cc_build_string,cc_extra = m.groups() else: - # If that didn't match, try a more basic pattern. - m = re.match(r'(.*) version ([^ ]*)', version_ln) + m = re.match(r'(.*) version ([^ ]*) +(\([^(]*\))(.*)', version_ln) if m is not None: - cc_name,cc_version_num = m.groups() - cc_build_string = cc_extra = "" + cc_name,cc_version_num,cc_build_string,cc_extra = m.groups() else: - error("unable to determine compiler version: %r: %r" % ( - cc, version_ln)) - cc_name = "unknown" - cc_version_num = cc_build_string = cc_extra = "" + # If that didn't match, try a more basic pattern. + m = re.match(r'(.*) version ([^ ]*)', version_ln) + if m is not None: + cc_name,cc_version_num = m.groups() + cc_build_string = cc_extra = "" + else: + error("unable to determine compiler version: %r: %r" % ( + cc, version_ln)) + cc_name = "unknown" + cc_version_num = cc_build_string = cc_extra = "" # Compute normalized compiler name and type. We try to grab source # revisions, branches, and tags when possible.