diff options
author | Stuart Mackie <wsmackie@juniper.net> | 2016-01-21 12:36:48 -0500 |
---|---|---|
committer | Stuart Mackie <wsmackie@juniper.net> | 2016-01-21 12:36:48 -0500 |
commit | 04b52e3d980846288da476e40ef1cae26ae2d1f0 (patch) | |
tree | f5c1b505da330707e8e72d535ecfdc1a42dfe455 /Testcases/RunTests.sh | |
parent | e8244c89ecf6e79d5178a195bc52f8f6756ac7fb (diff) |
Add python helper scripts
Change-Id: I83b378941082d8f9aeae88f6cf9e586d8eb7458d
Signed-off-by: Stuart Mackie <wsmackie@juniper.net>
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 |