This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Add network and efi_loader test coverage to Travis-CI #9
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import os | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eventually we should move this into some common location that all hosts can share, perhaps even into the U-Boot test/py source tree. However, putting it here is just fine for now. |
||
import binascii | ||
|
||
def file2env(file_name): | ||
file_full = os.environ['UBOOT_TRAVIS_BUILD_DIR'] + "/" + file_name | ||
|
||
return { | ||
"fn": file_name, | ||
"size": os.path.getsize(file_full), | ||
"crc32": hex(binascii.crc32(open(file_full, 'rb').read()) & 0xffffffff)[2:], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import travis_tftp | ||
|
||
env__net_uses_pci = True | ||
env__net_dhcp_server = True | ||
|
||
env__net_tftp_readable_file = travis_tftp.file2env('u-boot') | ||
env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi') | ||
|
||
env__efi_loader_check_smbios = True | ||
env__efi_loader_grub_file = travis_tftp.file2env('grub_x86.efi') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import travis_tftp | ||
|
||
env__net_dhcp_server = True | ||
|
||
env__net_tftp_readable_file = travis_tftp.file2env('u-boot') | ||
env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi') | ||
env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import travis_tftp | ||
|
||
env__net_dhcp_server = True | ||
|
||
env__net_tftp_readable_file = travis_tftp.file2env('u-boot') | ||
env__efi_loader_helloworld_file = travis_tftp.file2env('lib/efi_loader/helloworld.efi') | ||
env__efi_loader_grub_file = travis_tftp.file2env('grub_arm.efi') |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The x86 script has "-netdev user,id=net0" in qemu_extra_args. Is something similar not needed for the vexpress scripts too, or do they default to having an emulated NIC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The x86 script creates a new e1000 network device (-device e1000) and user space network as backend for it. The arm ones already have a network device as part of their board definition and the -tftp option modifies properties of the user space netdev that is spawned by the board.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is also another copy/paste example from my local setup. Telling QEMU to add a network device is more along the lines of "Add this type of thing here" rather than "add a sensible network device" sadly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it depends. You can use the old-style -net commands. qemu-system-arm -M vexpress-a15 -net nic -net user,... should give you a similar effect to the -device and -netdev commands, just that device creation happens explicitly in the board file rather than generic bus slot magic.
But this is diverging and going into QEMU internals. All of the variants should work to some extent (except for -device for sysbus devices). It doesn't actually matter which one we use, as long as the guest gets to see the correct network device.