Merge lp:~heber013/ubuntu-test-cases/addind-options-desktop-tests into lp:ubuntu-test-cases/desktop

Proposed by Heber Parrucci
Status: Merged
Approved by: Jean-Baptiste Lallement
Approved revision: 55
Merged at revision: 54
Proposed branch: lp:~heber013/ubuntu-test-cases/addind-options-desktop-tests
Merge into: lp:ubuntu-test-cases/desktop
Diff against target: 47 lines (+14/-10)
1 file modified
scripts/base.sh (+14/-10)
To merge this branch: bzr merge lp:~heber013/ubuntu-test-cases/addind-options-desktop-tests
Reviewer Review Type Date Requested Status
Jean-Baptiste Lallement Approve
Review via email: mp+326956@code.launchpad.net

Commit message

Adding option to provide machine name.
Poweroff VM after tests have run.

Description of the change

Adding option to provide machine name.
Poweroff VM after tests have run.

Make sure we have utah changes (1) landed before landing it.

(1) https://code.launchpad.net/~heber013/utah/adding-setup-for-autopkgtest/+merge/326954

To post a comment you must log in.
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

2 style comments to fix

Revision history for this message
Jean-Baptiste Lallement (jibel) :
review: Needs Fixing
55. By Heber Parrucci

Make if statements shorter

Revision history for this message
Heber Parrucci (heber013) wrote :

Comments have been addressed.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks. Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/base.sh'
--- scripts/base.sh 2014-04-08 07:40:25 +0000
+++ scripts/base.sh 2017-07-17 14:38:37 +0000
@@ -8,15 +8,21 @@
8options:8options:
9 -h Show this help and exit9 -h Show this help and exit
10 -i IMAGE Path/URL to image to be used10 -i IMAGE Path/URL to image to be used
11 -n NAME Machine name to provision
11EOF12EOF
12}13}
1314
14parse_args()15parse_args()
15{16{
16 while getopts :i: OPTION; do17 while getopts :i:n: OPTION; do
17 case $OPTION in18 case $OPTION in
18 i)19 i)
19 IMAGE=$OPTARG20 IMAGE=$OPTARG
21 shift 2
22 ;;
23 n)
24 NAME=$OPTARG
25 shift 2
20 ;;26 ;;
21 ?)27 ?)
22 usage28 usage
@@ -40,13 +46,11 @@
40 exit46 exit
41 fi47 fi
4248
43 if [ -z "$BOOT_ARGS" ]; then49 CMD="run_utah_tests.py -i $IMAGE -p $PRESEED $RUNLIST -f /var/log/installer -n --poweroff"
44 CMD="run_utah_tests.py -i $IMAGE -p $PRESEED $RUNLIST -f /var/log/installer"50
45 else51 [ -n "$NAME" ] && CMD="$CMD --name $NAME"
46 CMD="run_utah_tests.py -i $IMAGE -p $PRESEED -b $BOOT_ARGS $RUNLIST -f /var/log/installer"52
47 fi53 [ -n "$BOOT_ARGS" ] && CMD="$CMD -b $BOOT_ARGS"
4854
49 if [ -n "$EXTRA_ARGS" ]; then55 [ -n "$EXTRA_ARGS" ] && CMD="$CMD $EXTRA_ARGS"
50 CMD="$CMD $EXTRA_ARGS"
51 fi
52}56}

Subscribers

People subscribed via source and target branches