Skip to content

Commit f094884

Browse files
authored
[vs]: fail the build when build kvm image fails (#2297)
Signed-off-by: Guohan Lu <[email protected]>
1 parent 9c6ba94 commit f094884

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

build_image.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ elif [ "$IMAGE_TYPE" = "kvm" ]; then
8787

8888
SONIC_USERNAME=$USERNAME PASSWD=$PASSWORD sudo -E ./build_kvm_image.sh $KVM_IMAGE_DISK $onie_recovery_image $OUTPUT_ONIE_IMAGE $KVM_IMAGE_DISK_SIZE
8989

90+
if [ $? -ne 0 ]; then
91+
echo "Error : build kvm image failed"
92+
exit 1
93+
fi
94+
9095
[ -r $KVM_IMAGE_DISK ] || {
9196
echo "Error : $KVM_IMAGE_DISK not generated!"
9297
exit 1

build_kvm_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ prepare_installer_disk
5656
-vga std \
5757
-drive file=$DISK,media=disk,if=virtio,index=0 \
5858
-drive file=$INSTALLER_DISK,if=virtio,index=1 \
59-
-serial telnet:localhost:$KVM_PORT,server > $kvm_log 2>&1 &
59+
-serial telnet:127.0.0.1:$KVM_PORT,server > $kvm_log 2>&1 &
6060

6161
kvm_pid=$!
6262

check_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
cmd_prompt = "%s@sonic:~\$ $" % args.u
2525
grub_selection = "The highlighted entry will be executed"
2626

27-
p = pexpect.spawn("telnet localhost %s" % args.p, timeout=600, logfile=sys.stdout)
27+
p = pexpect.spawn("telnet 127.0.0.1 %s" % args.p, timeout=600, logfile=sys.stdout)
2828

2929
# select ONIE embed
3030
p.expect(grub_selection)

0 commit comments

Comments
 (0)