diff options
author | Stuart Mackie <wsmackie@juniper.net> | 2016-01-21 17:41:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-01-21 17:41:39 +0000 |
commit | cafc625c72cdbfa2ab0a8a341895d72df6db3b73 (patch) | |
tree | addb8fe0fd1d1a18400c9268832f0b5dc91dd273 /Testcases/RunTests.sh | |
parent | 3f18aa7280898f435f3a76a491054b4f91e6aaa9 (diff) | |
parent | 04b52e3d980846288da476e40ef1cae26ae2d1f0 (diff) |
Merge "Add python helper scripts"
Diffstat (limited to 'Testcases/RunTests.sh')
-rwxr-xr-x | Testcases/RunTests.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Testcases/RunTests.sh b/Testcases/RunTests.sh index 7a916c7..8a915b9 100755 --- a/Testcases/RunTests.sh +++ b/Testcases/RunTests.sh @@ -1,6 +1,37 @@ #!/bin/bash PATH=${OVNO_COMMIT}/Testcases:$PATH +cd ${OVNO_COMMIT}/Testcases + +# Create the config wrapper +OCL_IP=`echo $OS_AUTH_URL | cut -d "/" -f3 | cut -d ":" -f1` + +cat <<EOF >config +#!/usr/bin/python + +import sys +import os +from config_shell import * +default_client_args = [ + ('--username', 'admin'), + ('--password', os.environ["OS_PASSWORD"]), + ('--region', 'RegionOne'), + ('--tenant', 'admin'), + ('--api-server', os.environ["OCL_IP"])] + + +if __name__ == '__main__': + for arg in default_client_args: + if not arg[0] in sys.argv: + sys.argv.insert(1, arg[0]) + sys.argv.insert(2, arg[1]) + ConfigShell().main() +EOF + +chmod 777 config + + + echo "Starting OpenContrail test suite" # Tests go here |