mirror of https://github.com/Icinga/icinga2.git
parent
0e086118ca
commit
378b0bca03
|
@ -0,0 +1 @@
|
|||
These scripts are used by build.icinga.org to set up a test VM.
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
if [ "$1" != "run-by-jenkins" ]; then
|
||||
echo "This script should not be run manually."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "10.10.27.1 packages.icinga.org" >> /etc/hosts
|
||||
|
||||
groupadd vagrant
|
||||
|
||||
rmdir /vagrant && ln -s /root/icinga2 /vagrant
|
||||
puppet apply --modulepath=/vagrant/.vagrant-puppet/modules /vagrant/.vagrant-puppet/manifests/default.pp
|
||||
|
||||
exit 0
|
|
@ -0,0 +1,34 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
from xml.dom.minidom import getDOMImplementation
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
impl = getDOMImplementation()
|
||||
result = impl.createDocument(None, "testsuite", None)
|
||||
testsuite = result.documentElement
|
||||
|
||||
for fn in sys.argv[1:]:
|
||||
process = Popen(["./" + fn], stdout=PIPE, stderr=PIPE)
|
||||
(stdoutdata, stderrdata) = process.communicate()
|
||||
|
||||
testcase = result.createElement("testcase")
|
||||
testcase.setAttribute("classname", "vm")
|
||||
testcase.setAttribute("name", fn)
|
||||
|
||||
systemout = result.createElement("system-out")
|
||||
systemout.appendChild(result.createTextNode(stdoutdata))
|
||||
testcase.appendChild(systemout)
|
||||
|
||||
systemerr = result.createElement("system-err")
|
||||
systemerr.appendChild(result.createTextNode(stderrdata))
|
||||
testcase.appendChild(systemerr)
|
||||
|
||||
if process.returncode != 0:
|
||||
failure = result.createElement("failure")
|
||||
failure.setAttribute("type", "returncode")
|
||||
failure.appendChild(result.createTextNode("code: " + str(process.returncode)))
|
||||
testcase.appendChild(failure)
|
||||
|
||||
testsuite.appendChild(testcase)
|
||||
|
||||
print result.toxml()
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
echo "Hello World!"
|
||||
exit 1
|
Loading…
Reference in New Issue