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
1=== modified file 'scripts/base.sh'
2--- scripts/base.sh 2014-04-08 07:40:25 +0000
3+++ scripts/base.sh 2017-07-17 14:38:37 +0000
4@@ -8,15 +8,21 @@
5 options:
6 -h Show this help and exit
7 -i IMAGE Path/URL to image to be used
8+ -n NAME Machine name to provision
9 EOF
10 }
11
12 parse_args()
13 {
14- while getopts :i: OPTION; do
15+ while getopts :i:n: OPTION; do
16 case $OPTION in
17 i)
18 IMAGE=$OPTARG
19+ shift 2
20+ ;;
21+ n)
22+ NAME=$OPTARG
23+ shift 2
24 ;;
25 ?)
26 usage
27@@ -40,13 +46,11 @@
28 exit
29 fi
30
31- if [ -z "$BOOT_ARGS" ]; then
32- CMD="run_utah_tests.py -i $IMAGE -p $PRESEED $RUNLIST -f /var/log/installer"
33- else
34- CMD="run_utah_tests.py -i $IMAGE -p $PRESEED -b $BOOT_ARGS $RUNLIST -f /var/log/installer"
35- fi
36-
37- if [ -n "$EXTRA_ARGS" ]; then
38- CMD="$CMD $EXTRA_ARGS"
39- fi
40+ CMD="run_utah_tests.py -i $IMAGE -p $PRESEED $RUNLIST -f /var/log/installer -n --poweroff"
41+
42+ [ -n "$NAME" ] && CMD="$CMD --name $NAME"
43+
44+ [ -n "$BOOT_ARGS" ] && CMD="$CMD -b $BOOT_ARGS"
45+
46+ [ -n "$EXTRA_ARGS" ] && CMD="$CMD $EXTRA_ARGS"
47 }

Subscribers

People subscribed via source and target branches