Merge "Temporarily remove validate-autorelease for IoTDM"
[releng/builder.git] / jjb / packaging / include-raw-test-deb.sh
1 #!/bin/bash
2
3 # Options:
4 #   -x: Echo commands
5 #   -e: Fail on errors
6 #   -o pipefail: Fail on errors in scripts this calls, give stacktrace
7 set -ex -o pipefail
8
9 # Install ODL from .deb link or .repo url
10 if [[ $URL == *.deb ]]
11 then
12   sudo apt-get install -y "$URL"
13 elif [[ $URL == ppa:* ]]
14 then
15   sudo add-apt-repository "$REPO_FILE"
16   sudo apt-get update
17   sudo apt-get install -y opendaylight
18 else
19   echo "URL is not a link to a PPA repo or .deb"
20 fi
21
22 # Install expect to interact with karaf shell
23 sudo apt-get install -y expect
24
25 # Start OpenDaylight
26 sudo systemctl start opendaylight
27
28 # Check status of OpenDaylight
29 sudo systemctl status opendaylight
30
31 # Get process id of Java
32 pgrep java