~ubuntu-core-dev/ubuntu/xenial/ubuntu-release-upgrader/xenial

« back to all changes in this revision

Viewing changes to AutoUpgradeTester/UpgradeTestBackendSimulate.py

  • Committer: Michael Terry
  • Date: 2012-06-06 21:23:35 UTC
  • mto: This revision was merged to the branch mainline in revision 2509.
  • Revision ID: michael.terry@canonical.com-20120606212335-dt5xyu2v3ct5hcey
first pass at converting update-manager source into ubuntu-release-upgrader

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# UpgradeTestBackendSimulate.py
2
 
#
3
 
# test backend
4
 
#
5
 
 
6
 
from __future__ import absolute_import, print_function
7
 
 
8
 
import tempfile
9
 
 
10
 
from .UpgradeTestBackend import UpgradeTestBackend
11
 
 
12
 
class UpgradeTestBackendSimulate(UpgradeTestBackend):
13
 
 
14
 
    def __init__(self, profiledir, resultdir=""):
15
 
        tmpdir = tempfile.mkdtemp()
16
 
        super(UpgradeTestBackendSimulate, self).__init__(profiledir, resultdir=tmpdir)
17
 
 
18
 
    def installPackages(self, pkgs):
19
 
        print("simulate installing packages: %s" % ",".join(pkgs))
20
 
 
21
 
    def bootstrap(self):
22
 
        " bootstaps a pristine install"
23
 
        print("simulate running bootstrap")
24
 
        return True
25
 
 
26
 
    def upgrade(self):
27
 
        " upgrade a given install "
28
 
        print("simulate running upgrade")
29
 
        return True
30
 
 
31
 
    def test(self):
32
 
        " test if the upgrade was successful "
33
 
        print("running post upgrade test")
34
 
        return True