Merge "Revert "Use eval command to append mail options""
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 8 Dec 2017 23:43:36 +0000 (23:43 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 8 Dec 2017 23:43:36 +0000 (23:43 +0000)
jjb/integration/csit-jobs-oxygen.lst
jjb/integration/integration-deploy-openstack-run-test.sh
jjb/p4plugin/p4plugin-csit-basic.yaml [new file with mode: 0644]
jjb/packaging/packaging.yaml
jjb/packaging/test-rpm-deps.sh [new file with mode: 0644]

index 84a47c6ec86420b663853477390f848ae923e10f..06344c1094bd6e9eb5094043a595af1e993b6424 100644 (file)
@@ -76,6 +76,7 @@ openflowplugin-csit-3node-clustering-only-oxygen,
 openflowplugin-csit-3node-clustering-perf-bulkomatic-only-oxygen,
 ovsdb-csit-1node-upstream-southbound-all-oxygen,
 ovsdb-csit-3node-upstream-clustering-only-oxygen,
+p4plugin-csit-1node-basic-all-oxygen,
 packetcable-csit-1node-pcmm-all-oxygen,
 sdninterfaceapp-csit-1node-basic-only-oxygen,
 sfc-csit-3node-docker-full-deploy-all-oxygen,
index 4d331abd32f15dc9c71fef12054c5c56152f5fdc..5e3421dcfb2774cfb1111e5403e17f9d9400f1a2 100644 (file)
@@ -1,4 +1,4 @@
-#@IgnoreInspection BashAddShebang
+#!/bin/bash
 # Activate robotframework virtualenv
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
@@ -869,14 +869,14 @@ done
 # AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
 # Compare that timestamp to this log in the control stack.log: sudo rabbitmqctl set_permissions -p nova_cell1 stackrabbit
 # If the n-cpu.log is earlier than the control stack.log timestamp then the failure condition is likely hit.
-
-echo "Wait a maximum of 30m until rabbitmq is ready to allow the controller to create nova_cell1 before the computes need it"
-retry 30 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}"
+WAIT_FOR_RABBITMQ_MINUTES=60
+echo "Wait a maximum of ${WAIT_FOR_RABBITMQ_MINUTES}m until rabbitmq is ready to allow the controller to create nova_cell1 before the computes need it"
+retry ${WAIT_FOR_RABBITMQ_MINUTES} 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}"
 rc=$?
 if ((${rc} == 0)); then
     echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)"
 else
-    echo "rabbitmq was not ready in "
+    echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m"
     collect_logs
     exit 1
 fi
@@ -1173,10 +1173,16 @@ source /tmp/os_netvirt_client_rc
 
 echo "Starting Robot test suites ${SUITES} ..."
 # please add pybot -v arguments on a single line and alphabetized
+suite_num=0
 for suite in ${SUITES}; do
-    log_name_ext=$(basename ${suite} | cut -d. -f1)
-    pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \
-    --log log_${log_name_ext}.html --report None --output output_${log_name_ext}.xml \
+    # prepend a incrmental counter to the suite name so that the full robot log combining all the suites as is done
+    # in the rebot step below will list all the suites in chronological order as rebot seems to alphabatize them
+    let "suite_num = suite_num + 1"
+    suite_index="$(printf %02d ${suite_num})"
+    suite_name="$(basename ${suite} | cut -d. -f1)"
+    log_name="${suite_index}_${suite_name}"
+    pybot -N ${log_name} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \
+    --log log_${log_name}.html --report None --output output_${log_name}.xml \
     -v BUNDLEFOLDER:${BUNDLEFOLDER} \
     -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \
     -v CONTROLLER_USER:${USER} \
@@ -1225,7 +1231,7 @@ for suite in ${SUITES}; do
     ${TESTOPTIONS} ${suite} || true
 done
 #rebot exit codes seem to be different
-rebot --output ${WORKSPACE}/output.xml --log None --report None output_*.xml || true
+rebot --output ${WORKSPACE}/output.xml --log log_full.html --report None -N openstack output_*.xml || true
 
 echo "Examining the files in data/log and checking file size"
 ssh ${ODL_SYSTEM_IP} "ls -altr /tmp/${BUNDLEFOLDER}/data/log/"
diff --git a/jjb/p4plugin/p4plugin-csit-basic.yaml b/jjb/p4plugin/p4plugin-csit-basic.yaml
new file mode 100644 (file)
index 0000000..a9215e6
--- /dev/null
@@ -0,0 +1,26 @@
+---
+- project:
+    name: p4plugin-csit-basic
+    jobs:
+      - '{project}-csit-1node-{functionality}-{install}-{stream}'
+
+    # The project name
+    project: 'p4plugin'
+
+    # The functionality under test
+    functionality: 'basic'
+
+    # Project branches
+    stream:
+      - oxygen:
+          branch: 'master'
+
+    install:
+      - all:
+          scope: 'all'
+
+    # Features to install
+    install-features: 'odl-p4plugin-all'
+
+    # Robot custom options
+    robot-options: ''
index e9d49f02b8cb5e147b773f3e320bb42a7d4e6b99..ec2200683212139e568b9b8f657df5cb18d3fb0e 100644 (file)
@@ -80,6 +80,7 @@
 
     builders:
       - shell: !include-raw: build-rpm.sh
+      - shell: !include-raw: test-rpm-deps.sh
       - lf-infra-deploy-maven-file:
           global-settings-file: 'global-settings'
           settings-file: 'packaging-settings'
diff --git a/jjb/packaging/test-rpm-deps.sh b/jjb/packaging/test-rpm-deps.sh
new file mode 100644 (file)
index 0000000..987d4ce
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Options:
+#   -x: Echo commands
+#   -e: Fail on errors
+#   -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Requirements for package where SRPM was built into noarch on CentOS CBS
+# rpm -qp opendaylight-8.0.0-0.1.20171125rel2049.el7.noarch.rpm --requires
+# shellcheck disable=SC2034
+declare -a expected_deps=( "/bin/bash"
+                           "/bin/sh"
+                           "/usr/bin/env"
+                           "java >= 1:1.8.0"
+                           "rpmlib(CompressedFileNames) <= 3.0.4-1"
+                           "rpmlib(FileDigests) <= 4.6.0-1"
+                           "rpmlib(PartialHardlinkSets) <= 4.0.4-1"
+                           "rpmlib(PayloadFilesHavePrefix) <= 4.0-1"
+                           "shadow-utils"
+                           "rpmlib(PayloadIsXz) <= 5.2-1" )
+
+# shellcheck disable=SC2034
+mapfile -t actual_deps < <( rpm -qp /home/$USER/rpmbuild/RPMS/noarch/*.rpm --requires )
+# shellcheck disable=SC2154 disable=SC2145
+printf '%s\n' "${{actual_deps[@]}}"
+
+# shellcheck disable=SC2154 disable=SC2145 disable=SC2034
+diff_deps=(`echo "${{expected_deps[@]}}" "${{actual_deps[@]}}" | tr ' ' '\n' | sort | uniq -u `)
+# shellcheck disable=SC2154 disable=SC2145 disable=SC2068 disable=SC2170 disable=SC1083
+if [ ${{#diff_deps[*]}} -eq 0 ]; then
+    echo "RPM requirements are as expected"
+else
+    echo "RPM requirements don't match the expected requirements"
+    # shellcheck disable=SC2154 disable=SC2145
+    printf '%s\n' "${{diff_deps[@]}}"
+    exit 1
+fi