From 41838833a83e2ed058d99bc7b6bfefa6bc402de6 Mon Sep 17 00:00:00 2001 From: Edileuton Henrique de Oliveira <eho09@c3sl.ufpr.br> Date: Thu, 24 Apr 2014 10:54:22 -0300 Subject: [PATCH] Add test option on the agent generation This option does with which the agent point to the test server. Signed-off-by: Edileuton Henrique de Oliveira <eho09@c3sl.ufpr.br> --- build-agent.sh | 13 +++++++++++++ windows-installer/Makefile | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/build-agent.sh b/build-agent.sh index a066655..94042e1 100755 --- a/build-agent.sh +++ b/build-agent.sh @@ -22,6 +22,15 @@ build_dir="build" agent_dir="agent" +case "$1" in + -t|--test) + cp "${agent_dir}/conf/datasid.conf" "/tmp/datasid.conf" + sed "s/WEBSERVICE=\"http:\/\/simmc.c3sl.ufpr.br\/axis2\/services\/DataSID\"\ +/WEBSERVICE=\"http:\/\/bisimmcdev.c3sl.ufpr.br\/axis2\/services\/DataSID\"/g" \ + "/tmp/datasid.conf" > "${agent_dir}/conf/datasid.conf" + ;; +esac + cd "${build_dir}" sudo bash env-manager.sh --no-confirm delete sudo bash env-manager.sh --no-confirm create @@ -31,3 +40,7 @@ cd /home/user/build/agent sudo -u user /bin/bash autobuild.sh EOF cd - + +if [ -f "/tmp/datasid.conf" ]; then + mv "/tmp/datasid.conf" "${agent_dir}/conf/" +fi \ No newline at end of file diff --git a/windows-installer/Makefile b/windows-installer/Makefile index e0e5dee..4c83c34 100644 --- a/windows-installer/Makefile +++ b/windows-installer/Makefile @@ -16,6 +16,7 @@ GSOAP = gsoap-$(GSOAPVER) INSTALLERSRC = ./src/installer.nsi COLLECTDIR = $(WININSTDIR)/../windows-collect +AGENT = $(COLLECTDIR)/src/datasidAgent.py WINGSOAP = "wine win-build/$(GSOAP)/gsoap/bin/win32/" all: client collect installer @@ -40,3 +41,12 @@ installer: @mkdir -p "windows-agent" @cp build/DataSID.exe "windows-agent" @cp 7zS.sfx "windows-agent" + +test: /tmp/datasidAgent.py all + @mv $< $(AGENT) + +/tmp/datasidAgent.py: + @cp $(AGENT) $@ + @sed "s/URL = \"http:\/\/simmc.c3sl.ufpr.br\/axis2\/services\/DataSID\"\ + /URL = \"http:\/\/bisimmcdev.c3sl.ufpr.br\/axis2\/services\/DataSID\"/g" \ + $@ > $(AGENT) -- GitLab