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")
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")
def check_upgrade(self): if not self.upgrade_commit: raise testing.NotSupported("--upgrade-from argument not given")
def execute(self, *args, **kwargs): raise testing.NotSupported( "quick-started instance doesn't support execute()")
def uninstall(self): raise testing.NotSupported( "quick-started instance can't be uninstalled")
def restart(self): raise testing.NotSupported("quick-started instance can't be restarted")
def check_extend(self, repository, pre_upgrade=False): raise testing.NotSupported( "quick-started instance doesn't support extensions")
def check_upgrade(self): raise testing.NotSupported("quick-started instance can't be upgraded")