--- /dev/null
+#!/usr/bin/expect
+# This script starts the karaf shell and sends the password for SSH auth.
+# Further tests in karaf shell can be done here
+
+# Default password
+set password "karaf"
+# Default prompt
+set prompt "opendaylight-user@root>"
+
+# OpenDaylight service requires some time after it starts for a successful
+# SSH connection
+sleep 10
+
+# SSH into Karaf shell
+spawn ssh -p 8101 -o StrictHostKeyChecking=no karaf@127.0.0.1
+expect "Password: "
+send "$password\r"
+
+# Verify expected features
+expect "$prompt"
+send "feature:list | grep netvirt-openstack\r"
+expect "$prompt"
+
+# TODO Add further tests here
--- /dev/null
+#!/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
+
+# Remove opendaylight if already installed
+if rpm -q opendaylight > /dev/null;
+then
+ sudo yum remove -y opendaylight;
+fi
+
+# Install ODL from .rpm link or .repo url
+if [[ $URL == *.rpm ]]
+then
+ sudo yum install -y "$URL"
+elif [[ $URL == *.repo ]]
+then
+ sudo curl --silent -o "$REPO_FILE" "$URL"
+ sudo yum install -y opendaylight
+else
+ echo "URL is not a link to .rpm or .repo"
+fi
+
+# Install expect to interact with karaf shell
+sudo yum install -y expect
+
+# Start OpenDaylight
+sudo systemctl start opendaylight
+
+# Check status of OpenDaylight
+sudo systemctl status opendaylight
+
+# Get process id of Java
+pgrep java
- '{project-name}-verify-python-{stream}'
- '{project-name}-build-rpm-{stream}'
- '{project-name}-build-rpm-snap-{stream}'
+ - '{project-name}-test-rpm-{stream}'
- '{project-name}-build-deb-{stream}'
project: 'integration/packaging'
- archive-artifacts:
artifacts: '**/*.rpm'
+- job-template:
+ name: '{project-name}-test-rpm-{stream}'
+
+ node: dynamic_verify
+
+ parameters:
+ - opendaylight-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+ - string:
+ name: URL
+ default: 'https://raw.githubusercontent.com/opendaylight/integration-packaging/master/rpm/example_repo_configs/opendaylight-51-release.repo'
+ description: 'Link to .repo or .rpm file'
+ - string:
+ name: REPO_FILE
+ default: '/etc/yum.repos.d/opendaylight-51-release.repo'
+ description: 'Name of the .repo file'
+
+ scm:
+ - integration-gerrit-scm:
+ basedir: 'packaging'
+ refspec: '$GERRIT_REFSPEC'
+ branch: 'master'
+
+ wrappers:
+ - opendaylight-infra-wrappers:
+ build-timeout: '{build-timeout}'
+
+ builders:
+ - shell: !include-raw: include-raw-test-rpm.sh
+ - shell: !include-raw: include-raw-test-karaf.sh
+
+ publishers:
+ - archive-artifacts:
+ artifacts: '**'
+
- job-template:
name: '{project-name}-build-deb-{stream}'