Files
gnatstudio/examples/python/remote_server_assign_variable.py
Jerome Lambourg f40ac348a9 Script example for automatically assigning a scenario variable when the build
server changes.
Example sent to customer for F808-028


git-svn-id: svn+ssh://svn.eu/Dev/importfromcvs/trunk@98636 936e1b1b-40f2-da11-902a-00137254ae57
2006-08-09 08:51:54 +00:00

13 lines
480 B
Python

# This script automatically assigns the scenario variable "target" upon
# assignment of the build server.
my_linux_server_nickname="foo"
def server_changed (hook, server_type, nickname):
if server_type == "BUILD_SERVER":
if nickname == "my_linux_server_nickname":
GPS.Project.set_scenario_variable ("target", "Linux-remote")
else:
GPS.Project.set_scenario_variable ("target", "Windows")
GPS.Hook ("server_config_hook").add (server_changed)