Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use yaml for buildbot steps #325

Merged
merged 12 commits into from Apr 20, 2016

Add test for buildbot configuration passing flake8

This test requires the flake8 python module; to ensure it is installed,
add a requirements.txt file. Travis-CI will automatically install the
dependencies specified in that file.
  • Loading branch information
aneeshusa committed Apr 20, 2016
commit bab18c34cabc88a9d270a1e1eba04258dba13084
@@ -0,0 +1,3 @@
# Python modules needed for testing
# (Travis-CI will auto-install them from this file)
flake8 == 2.5.4
@@ -0,0 +1,20 @@
import os
import subprocess

from tests.util import Failure, Success, project_path


def run():
CONF_DIR = os.path.join(project_path(),
'buildbot', 'master', 'files', 'config')
# Have to specify master.cfg separately because it is not a .py file
command = ['flake8', CONF_DIR, os.path.join(CONF_DIR, 'master.cfg')]
ret = subprocess.run(command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True)

if ret.returncode == 0:
return Success("Buildbot master config passed linting")
else:
return Failure("Buildbot master config lint check failed:", ret.stdout)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.