~canonical-platform-qa/ubuntu-system-tests/qemu-build-snap

« back to all changes in this revision

Viewing changes to ubuntu_system_tests/host/qemu-scripts/qemu-setup.py

  • Committer: Tarmac
  • Author(s): Richard Huddie
  • Date: 2016-11-11 16:55:51 UTC
  • mfrom: (477.1.1 ubuntu-system-tests)
  • Revision ID: tarmac-20161111165551-bjkw2i2bkmd6u3el
Fix vivid flake8 indentation warnings for qemu helpers.

Approved by platform-qa-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
    """Setup root shell service on ttyS1 for use by autopkgtest."""
134
134
    if os.path.exists('/dev/ttyS1'):
135
135
        create_file(
136
 
                AUTOPKGTEST_SERVICE,
137
 
                '[Unit]\n'
138
 
                'Description=Autopkgtest root shell on ttyS1\n\n'
139
 
                '[Service]\n'
140
 
                'Type=forking\n'
141
 
                'ExecStart='
142
 
                '/bin/sh -c "(setsid sh </dev/ttyS1 >/dev/ttyS1 2>&1) &"\n\n'
143
 
                '[Install]\n'
144
 
                'WantedBy=multi-user.target\n'
145
 
            )
 
136
            AUTOPKGTEST_SERVICE,
 
137
            '[Unit]\n'
 
138
            'Description=Autopkgtest root shell on ttyS1\n\n'
 
139
            '[Service]\n'
 
140
            'Type=forking\n'
 
141
            'ExecStart='
 
142
            '/bin/sh -c "(setsid sh </dev/ttyS1 >/dev/ttyS1 2>&1) &"\n\n'
 
143
            '[Install]\n'
 
144
            'WantedBy=multi-user.target\n'
 
145
        )
146
146
        os.chmod(AUTOPKGTEST_SERVICE, 0o644)
147
147
        subprocess.check_call(['systemctl', 'enable', AUTOPKGTEST_NAME])
148
148