summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/jenkins-jnlp-connect.sh47
-rwxr-xr-xutils/test/reporting/functest/reporting-status.py8
2 files changed, 26 insertions, 29 deletions
diff --git a/utils/jenkins-jnlp-connect.sh b/utils/jenkins-jnlp-connect.sh
index 9ef4298ef..56ce61e17 100755
--- a/utils/jenkins-jnlp-connect.sh
+++ b/utils/jenkins-jnlp-connect.sh
@@ -30,8 +30,6 @@ EOF
}
main () {
- dir=$(cd $(dirname $0); pwd)
-
#tests
if [[ -z $jenkinsuser || -z $jenkinshome ]]; then
echo "jenkinsuser or home not defined, please edit this file to define it"
@@ -60,17 +58,6 @@ main () {
fi
fi
-
- if [ -d /etc/monit/conf.d ]; then
- monitconfdir="/etc/monit/conf.d/"
- elif [ -d /etc/monit.d ]; then
- monitconfdir="/etc/monit.d"
- else
- echo "Could not determine the location of the monit configuration file."
- echo "Make sure monit is installed."
- exit 1
- fi
-
#make pid dir
pidfile="/var/run/$jenkinsuser/jenkins_jnlp_pid"
if ! [ -d /var/run/$jenkinsuser/ ]; then
@@ -94,29 +81,39 @@ main () {
exit 1
fi
fi
- fi
- makemonit () {
- echo "Writing the following as monit config:"
+ if [ -d /etc/monit/conf.d ]; then
+ monitconfdir="/etc/monit/conf.d/"
+ elif [ -d /etc/monit.d ]; then
+ monitconfdir="/etc/monit.d"
+ else
+ echo "Could not determine the location of the monit configuration file."
+ echo "Make sure monit is installed."
+ exit 1
+ fi
+
+ makemonit () {
+ echo "Writing the following as monit config:"
cat << EOF | tee $monitconfdir/jenkins
check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid
-start program = "/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $dir; export started_monit=true; $0 $@' with timeout 60 seconds"
+start program = "/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $jenkinshome; export started_monit=true; $0 $@' with timeout 60 seconds"
stop program = "/bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)'"
EOF
- }
+ }
- if [[ -f $monitconfdir/jenkins ]]; then
- #test for diff
- if [[ "$(diff $monitconfdir/jenkins <(echo "\
+ if [[ -f $monitconfdir/jenkins ]]; then
+ #test for diff
+ if [[ "$(diff $monitconfdir/jenkins <(echo "\
check process jenkins with pidfile /var/run/$jenkinsuser/jenkins_jnlp_pid
-start program = \"/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $dir; export started_monit=true; $0 $@' with timeout 60 seconds\"
+start program = \"/usr/bin/sudo -u $jenkinsuser /bin/bash -c 'cd $jenkinshome; export started_monit=true; $0 $@' with timeout 60 seconds\"
stop program = \"/bin/bash -c '/bin/kill \$(/bin/cat /var/run/$jenkinsuser/jenkins_jnlp_pid)'\"\
") )" ]]; then
- echo "Updating monit config..."
+ echo "Updating monit config..."
+ makemonit $@
+ fi
+ else
makemonit $@
fi
- else
- makemonit $@
fi
if [[ $started_monit == "true" ]]; then
diff --git a/utils/test/reporting/functest/reporting-status.py b/utils/test/reporting/functest/reporting-status.py
index cb13b099c..66bdd57c1 100755
--- a/utils/test/reporting/functest/reporting-status.py
+++ b/utils/test/reporting/functest/reporting-status.py
@@ -55,25 +55,25 @@ logger.info("*******************************************")
# Retrieve test cases of Tier 1 (smoke)
config_tiers = functest_yaml_config.get("tiers")
-# we consider Tier 1 (smoke),2 (sdn suites) and 3 (features)
+# we consider Tier 1 (smoke),2 (features)
# to validate scenarios
# Tier > 4 are not used to validate scenarios but we display the results anyway
# tricky thing for the API as some tests are Functest tests
# other tests are declared directly in the feature projects
for tier in config_tiers:
- if tier['order'] > 0 and tier['order'] < 3:
+ if tier['order'] > 0 and tier['order'] < 2:
for case in tier['testcases']:
if case['name'] not in blacklist:
testValid.append(tc.TestCase(case['name'],
"functest",
case['dependencies']))
- elif tier['order'] == 3:
+ elif tier['order'] == 2:
for case in tier['testcases']:
if case['name'] not in blacklist:
testValid.append(tc.TestCase(case['name'],
case['name'],
case['dependencies']))
- elif tier['order'] > 3:
+ elif tier['order'] > 2:
for case in tier['testcases']:
if case['name'] not in blacklist:
otherTestCases.append(tc.TestCase(case['name'],