Skip to content

Commit

Permalink
Merge "Removing distribute from test-requirements, becaause distribut…
Browse files Browse the repository at this point in the history
…e is deprecated in favour of setuptools" into R2.21.x
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Mar 29, 2016
2 parents a9ef2db + 2d6a398 commit a4450ae
Show file tree
Hide file tree
Showing 31 changed files with 284 additions and 143 deletions.
4 changes: 2 additions & 2 deletions src/api-lib/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ function run_tests {
then
# subunit-2to1 is present, testr subunit stream should be in version 2
# format. Convert to version one before colorizing.
bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py"
bash -c "set -o pipefail && ${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py"
else
bash -c "${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py"
bash -c "set -o pipefail && ${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py"
fi
RESULT=$?
set -e
Expand Down
4 changes: 3 additions & 1 deletion src/api-lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def initialize_options(self):
def finalize_options(self):
pass
def run(self):
os.system('./run_tests.sh -V')
rc_sig = os.system('./run_tests.sh -V')
if rc_sig >> 8:
os._exit(rc_sig>>8)
with open('test.log') as f:
if not re.search('\nOK', ''.join(f.readlines())):
os._exit(1)
Expand Down
2 changes: 0 additions & 2 deletions src/api-lib/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ flexmock
coverage
pyaml
httpretty==0.8.10
distribute>=0.7.3

2 changes: 1 addition & 1 deletion src/config/api-server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ discoveryclient
sandesh
sandesh-common
lxml>=2.3.3
gevent
gevent==1.1a2
geventhttpclient==1.0a
pycassa>=1.7.2
netaddr>=0.7.5
Expand Down
4 changes: 2 additions & 2 deletions src/config/api-server/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ function run_tests {
then
# subunit-2to1 is present, testr subunit stream should be in version 2
# format. Convert to version one before colorizing.
bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} ${tools_path}/tools/colorizer.py"
bash -c "set -o pipefail && ${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} ${tools_path}/tools/colorizer.py"
else
bash -c "${wrapper} $TESTRTESTS | ${wrapper} ${tools_path}/tools/colorizer.py"
bash -c "set -o pipefail && ${wrapper} $TESTRTESTS | ${wrapper} ${tools_path}/tools/colorizer.py"
fi
RESULT=$?
set -e
Expand Down
4 changes: 3 additions & 1 deletion src/config/api-server/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ def initialize_options(self):
def finalize_options(self):
self.cwd = os.getcwd()
def run(self):
os.system('./run_tests.sh -V')
rc_sig = os.system('./run_tests.sh -V')
if rc_sig >> 8:
os._exit(rc_sig>>8)
with open('test.log') as f:
if not re.search('\nOK', ''.join(f.readlines())):
os._exit(1)
Expand Down
2 changes: 1 addition & 1 deletion src/config/api-server/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ flexmock
coverage
webtest
pyaml
distribute>=0.7.3
keystonemiddleware
2 changes: 1 addition & 1 deletion src/config/api-server/tests/test_crud_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ def __init__(self, *args, **kwargs):
('KEYSTONE', 'admin_password', 'bar'),])

def setup_flexmock(self):
from keystoneclient.middleware import auth_token
from keystonemiddleware import auth_token
class FakeAuthProtocol(object):
def __init__(self, app, *args, **kwargs):
self._app = app
Expand Down

0 comments on commit a4450ae

Please sign in to comment.