コード例 #1
0
ファイル: virtualbox.py プロジェクト: beauhoyt/critic
    def check_late_upgrade(self):
        # First of all: late upgrade testing is only meaningful if we're
        # upgrading at all.
        self.check_upgrade()

        changed_files = subprocess.check_output([
            "git", "diff", "--name-only",
            "%s..%s" % (self.install_commit, self.upgrade_commit), "--",
            "installation/migrations/"
        ]).splitlines()

        if not changed_files:
            raise testing.NotSupported(
                "no migration scripts added or modified")

        # This commit added testing/tests/002-late-upgrade/.  It's actually a
        # rather arbitrary point in the history to limit at, but it works, and
        # some really old commits don't.
        FIRST_LATE_UPGRADE = "80512c5a80b29d269fb6f955e1f757920e63d211"

        try:
            subprocess.check_call([
                "git", "merge-base", "--is-ancestor", FIRST_LATE_UPGRADE,
                self.install_commit
            ])
        except subprocess.CalledProcessError:
            raise testing.NotSupported(
                "installed commit predates late upgrade testing")
コード例 #2
0
 def check_extend(self, repository, pre_upgrade=False):
     commit = self.install_commit if pre_upgrade else self.tested_commit
     if not testing.exists_at(commit, "extend.py"):
         raise testing.NotSupported("tested commit lacks extend.py")
     if not self.arguments.test_extensions:
         raise testing.NotSupported("--test-extensions argument not given")
     if not repository.v8_jsshell_path:
         raise testing.NotSupported("v8-jsshell sub-module not initialized")
コード例 #3
0
 def check_upgrade(self):
     if not self.upgrade_commit:
         raise testing.NotSupported("--upgrade-from argument not given")
コード例 #4
0
ファイル: quickstart.py プロジェクト: ingemaradahl/critic
 def execute(self, *args, **kwargs):
     raise testing.NotSupported(
         "quick-started instance doesn't support execute()")
コード例 #5
0
ファイル: quickstart.py プロジェクト: ingemaradahl/critic
 def uninstall(self):
     raise testing.NotSupported(
         "quick-started instance can't be uninstalled")
コード例 #6
0
ファイル: quickstart.py プロジェクト: ingemaradahl/critic
 def restart(self):
     raise testing.NotSupported("quick-started instance can't be restarted")
コード例 #7
0
ファイル: quickstart.py プロジェクト: ingemaradahl/critic
 def check_extend(self, repository, pre_upgrade=False):
     raise testing.NotSupported(
         "quick-started instance doesn't support extensions")
コード例 #8
0
ファイル: quickstart.py プロジェクト: ingemaradahl/critic
 def check_upgrade(self):
     raise testing.NotSupported("quick-started instance can't be upgraded")