Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vs]: fail the build when build kvm image fails #2297

Merged
merged 1 commit into from
Nov 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ elif [ "$IMAGE_TYPE" = "kvm" ]; then

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

if [ $? -ne 0 ]; then
echo "Error : build kvm image failed"
exit 1
fi

[ -r $KVM_IMAGE_DISK ] || {
echo "Error : $KVM_IMAGE_DISK not generated!"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion build_kvm_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ prepare_installer_disk
-vga std \
-drive file=$DISK,media=disk,if=virtio,index=0 \
-drive file=$INSTALLER_DISK,if=virtio,index=1 \
-serial telnet:localhost:$KVM_PORT,server > $kvm_log 2>&1 &
-serial telnet:127.0.0.1:$KVM_PORT,server > $kvm_log 2>&1 &

kvm_pid=$!

Expand Down
2 changes: 1 addition & 1 deletion check_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
cmd_prompt = "%s@sonic:~\$ $" % args.u
grub_selection = "The highlighted entry will be executed"

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

# select ONIE embed
p.expect(grub_selection)
Expand Down