Add run_tests.sh and x configs

This commit is contained in:
Przemyslaw Kaminski 2015-05-13 11:59:24 +02:00
parent 4750ecc21c
commit d7884cdb37
4 changed files with 29 additions and 1 deletions

1
jenkins-config.yaml Normal file
View File

@ -0,0 +1 @@
clients-data-file: /tmp/clients.json

24
run_tests.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
set -e
VENV=x-venv
CONFIG_FILE=$WORKSPACE/jenkins-config.yaml
# Setup a proper path, I call my virtualenv dir "$VENV" and
# I've got the virtualenv command installed in /usr/local/bin
PATH=$WORKSPACE/venv/bin:/usr/local/bin:$PATH
if [ ! -d "$VENV" ]; then
virtualenv -p python2 $VENV
fi
. $VENV/bin/activate
pip install -r requirements.txt --download-cache=/tmp/$JOB_NAME
pushd x
PYTHONPATH=$WORKSPACE CONFIG_FILE=$CONFIG_FILE python test/test_signals.py
popd

View File

@ -309,6 +309,7 @@ input-types:
)
'''
class TestMultiInput(base.BaseResourceTest):
def test_multi_input(self):
sample_meta_dir = self.make_resource_meta("""
@ -338,6 +339,7 @@ input:
(sample.args['ip'], sample.args['port']),
receiver.args['server'],
)
'''
if __name__ == '__main__':

View File

@ -24,7 +24,8 @@ def load_file(fpath):
def read_config():
return load_file('/vagrant/config.yaml')
CONFIG_FILE = os.environ.get('CONFIG_FILE') or '/vagrant/config.yaml'
return load_file(CONFIG_FILE)
def read_config_file(key):