コード例 #1
0
def run_tests_main():
    if len(sys.argv) >= 2 and sys.argv[1] == '--version':
        utils.log("GA4GH run_tests version {}".format(
            ga4gh_common.__version__))
        return
    travisSimulator = TravisSimulator()
    travisSimulator.runTests()
コード例 #2
0
    def _getProtoc(self, server):
        protocs = [
            os.path.realpath(x) for x in
            "{}/protobuf/src/protoc".format(server),
            self._find_in_path("protoc")
            if x is not None]
        protoc = None
        for c in protocs:
            if not os.path.exists(c):
                continue
            output = subprocess.check_output([c, "--version"]).strip()
            try:
                (lib, version) = output.split(" ")
                if lib != "libprotoc":
                    raise Exception("lib didn't match 'libprotoc'")
                if self._version_compare("3.0.0", version) > 0:
                    raise Exception("version < 3.0.0")
                protoc = c
                break
            except Exception:
                utils.log(
                    "Not using {path} because it returned " +
                    "'{version}' rather than \"libprotoc <version>\", where " +
                    "<version> >= 3.0.0").format(path=c, format=output)

        if protoc is None:
            raise Exception("Can't find a good protoc. Tried {}".format(
                protocs))
        utils.log("Using protoc: '{}'".format(protoc))
        return protoc
コード例 #3
0
 def log(self, logStr):
     utils.log("{0} {1}".format(self.logStrPrefix, logStr))
コード例 #4
0
ファイル: test_utils.py プロジェクト: saupchurch/ga4gh-common
 def testLog(self):
     utils.log("message")
     self.assertEquals(self.printMock.call_count, 1)