[pytango] 199/483: Continuous Integration enhancement 11

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 29c5810922efe8ede3e6e86885fb3e51b2b6b5ef
Author: trogucki <trogucki at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Mon Jan 28 13:53:04 2013 +0000

    Continuous Integration enhancement 11
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@21956 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 tests/child/ci/ALBA/build.sh  | 12 ++++++++++++
 tests/child/ci/build.sh       | 20 ++++++++++++++++++++
 tests/child/test/child.py     | 13 +++++++++++++
 tests/parent/ci/ALBA/build.sh | 12 ++++++++++++
 tests/parent/ci/build.sh      | 20 ++++++++++++++++++++
 tests/parent/test/parent.py   | 27 +++++++++++++++++++++++++++
 6 files changed, 104 insertions(+)

diff --git a/tests/child/ci/ALBA/build.sh b/tests/child/ci/ALBA/build.sh
new file mode 100755
index 0000000..0dfb648
--- /dev/null
+++ b/tests/child/ci/ALBA/build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+cd ../..
+
+python test/child.py
+
+if [ $? -eq 0 ]
+then
+	exit 0
+else
+	exit 1
+fi
\ No newline at end of file
diff --git a/tests/child/ci/build.sh b/tests/child/ci/build.sh
new file mode 100755
index 0000000..a9ea5df
--- /dev/null
+++ b/tests/child/ci/build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ ! -z "$INSTITUTE" -a -d "$INSTITUTE" -a -f "$INSTITUTE/build.sh" ]
+then
+	echo "Executing build.sh for $INSTITUTE"
+	cd "$INSTITUTE"
+	./build.sh
+	exit 0
+else
+	if [ ! -z "$INSTITUTE" ]
+	then
+		echo "Failed to execute ci/$INSTITUTE/build.sh !"
+		echo "Make sure ci/$INSTITUTE/build.sh exists"
+	else
+		echo "Mr Jenkins needs additional configuration!"
+		echo "Go to Jenkins dashboard -> Manage Jenkins -> Global Properties, tick Environment Variables and add a key-value pair: name - INSTITUTE, value - YourInstituteName."
+		echo "Check out the project. Go to the 'ci' directory and create a 'YourInstituteName' subdirectory. In the 'YourInstituteName' subdirectory create a 'build.sh' file which will contain the recipe how to build your project. Make the 'build.sh' file executable. Commit changes."
+	fi
+	exit -1
+fi
\ No newline at end of file
diff --git a/tests/child/test/child.py b/tests/child/test/child.py
new file mode 100644
index 0000000..aeba0b4
--- /dev/null
+++ b/tests/child/test/child.py
@@ -0,0 +1,13 @@
+import sys
+
+directory = '/tmp/jenkins/jobs/Test/'
+
+try:
+    testString = open(directory + 'testfile', 'r').read()
+except:
+    print('File doesnt exist!')
+    exit(1)
+
+print(testString)
+
+exit(0)
\ No newline at end of file
diff --git a/tests/parent/ci/ALBA/build.sh b/tests/parent/ci/ALBA/build.sh
new file mode 100755
index 0000000..20e769b
--- /dev/null
+++ b/tests/parent/ci/ALBA/build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+cd ../..
+
+python test/parent.py
+
+if [ $? -eq 0 ]
+then
+	exit 0
+else
+	exit 1
+fi
\ No newline at end of file
diff --git a/tests/parent/ci/build.sh b/tests/parent/ci/build.sh
new file mode 100755
index 0000000..a9ea5df
--- /dev/null
+++ b/tests/parent/ci/build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ ! -z "$INSTITUTE" -a -d "$INSTITUTE" -a -f "$INSTITUTE/build.sh" ]
+then
+	echo "Executing build.sh for $INSTITUTE"
+	cd "$INSTITUTE"
+	./build.sh
+	exit 0
+else
+	if [ ! -z "$INSTITUTE" ]
+	then
+		echo "Failed to execute ci/$INSTITUTE/build.sh !"
+		echo "Make sure ci/$INSTITUTE/build.sh exists"
+	else
+		echo "Mr Jenkins needs additional configuration!"
+		echo "Go to Jenkins dashboard -> Manage Jenkins -> Global Properties, tick Environment Variables and add a key-value pair: name - INSTITUTE, value - YourInstituteName."
+		echo "Check out the project. Go to the 'ci' directory and create a 'YourInstituteName' subdirectory. In the 'YourInstituteName' subdirectory create a 'build.sh' file which will contain the recipe how to build your project. Make the 'build.sh' file executable. Commit changes."
+	fi
+	exit -1
+fi
\ No newline at end of file
diff --git a/tests/parent/test/parent.py b/tests/parent/test/parent.py
new file mode 100644
index 0000000..b4469a4
--- /dev/null
+++ b/tests/parent/test/parent.py
@@ -0,0 +1,27 @@
+from random import randint
+import sys
+import time
+import os
+
+exitCode = randint(0,1)
+
+T = time.asctime(time.localtime(time.time()))
+testString = 'Failure! ' + T
+successMessage = 'FAILED!'
+
+if exitCode == 1:
+    testString = 'Success! ' + T
+    successMessage = 'SUCCEEDED!'
+
+directory = '/tmp/jenkins/jobs/Test/'
+
+if not os.path.exists(directory):
+    os.makedirs(directory)
+
+file = open(directory + 'testfile', 'w')
+file.write(testString)
+file.close()
+
+print(successMessage)
+
+exit(exitCode)
\ No newline at end of file

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list