Skip to content

Commit

Permalink
Test travis config
Browse files Browse the repository at this point in the history
Change-Id: I3dabb9e17d9ad4686a19336e121b1aceb925cf0d
  • Loading branch information
jrha committed Jun 4, 2018
1 parent c949523 commit 2aaf2e7
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: python
python:
- "2.7"
install:
- wget https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -O /tmp/protoc.zip
- cd /tmp && unzip /tmp/protoc.zip
- sudo cp bin/protoc /usr/bin/ && sudo chmod ugo+x /usr/bin/protoc
- cd /tmp && git clone https://github.com/quattor/aquilon-protocols.git
- cd aquilon-protocols && git checkout upstream
- ./setup.py build && sudo ./setup.py install
script:
- cd $TRAVIS_BUILD_DIR && tests/runtests.py -c tests/unittest.conf.noms -f --assume_yes
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Twisted >= 12.2.0
coverage
ipaddress
jsonschema
lxml
mako
psycopg2 >= 2.5.1
python-dateutil
six >= 1.7.3
sqlalchemy >= 0.9.7
zope-interface
7 changes: 7 additions & 0 deletions tests/fakebin/fake_klist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo "Ticket cache: FILE:/tmp/krb5cc_$(id -u)
Default principal: $USER@EXAMPLE.QUATTOR.ORG
Valid starting Expires Service principal
$(date +'%m/%d/%Y %H:%M:%S') $(date --date '6 hours' +'%m/%d/%Y %H:%M:%S') krbtgt/EXAMPLE.QUATTOR.ORG@EXAMPLE.QUATTOR.ORG"
17 changes: 10 additions & 7 deletions tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@

def force_yes(msg):
print(msg, file=sys.stderr)
print("""
Please confirm by typing yes (three letters) and pressing enter.
""", file=sys.stderr)
answer = sys.stdin.readline()
if not answer.startswith("yes"):
print("""Aborting.""", file=sys.stderr)
sys.exit(1)
if not opts.assume_yes:
print("""
Please confirm by typing yes (three letters) and pressing enter.
""", file=sys.stderr)
answer = sys.stdin.readline()
if not answer.startswith("yes"):
print("""Aborting.""", file=sys.stderr)
sys.exit(1)

parser = argparse.ArgumentParser(description="Run the broker test suite.",
epilog=epilog)
Expand All @@ -91,6 +92,8 @@ def force_yes(msg):
parser.add_argument('-f', '--failfast', action='store_true',
help='Add failfast=True option to TestRunner. This will stop '
'unittests immediatelly if any failure.')
parser.add_argument('--assume_yes', action='store_true',
help='Assume yes to all questions, only use for continuous integration')


opts = parser.parse_args()
Expand Down
1 change: 1 addition & 0 deletions tests/unittest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ checkedm = %(srcdir)s/tests/fakebin/fake_checkedm
#aqd_checkedm = /ms/dist/aquilon/PROJ/edmtools/dev/bin/aqd_checkedm
aqd_checkedm = %(srcdir)s/tests/fakebin/fake_aqd_checkedm
location_uri_validator = /ms/dist/aquilon/PROJ/aqd-scripts/qa/bin/location_uri_validator
klist = %(srcdir)s/tests/fakebin/fake_klist

[location_feeds]
building_feed = %(srcdir)s/tests/fakebin/user-data/location_feed.csv
Expand Down
4 changes: 3 additions & 1 deletion tests/unittest.conf.noms
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,11 @@ get_camtable = %(srcdir)s/tests/fakebin/fake_macdata
checkedm = %(srcdir)s/tests/fakebin/fake_checkedm
aqd_checkedm = %(srcdir)s/tests/fakebin/fake_aqd_checkedm
location_uri_validator = %(srcdir)s/tests/fakebin/location_uri_validator
klist = %(srcdir)s/tests/fakebin/fake_klist
git = /usr/bin/git

# Alternative tool locations outside MS
git_daemon = /usr/libexec/git-core/git-daemon
git_daemon = /usr/lib/git-core/git-daemon
ant_contrib_jar = /usr/share/java/ant/ant-contrib.jar

[location_feeds]
Expand Down

0 comments on commit 2aaf2e7

Please sign in to comment.