Skip to content
Snippets Groups Projects
Commit b28c5fcc authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Tom Rini
Browse files

test-fit.py: Minor grammar/spelling/clarification tweaks


* Add note that execution needs Python development package installed
* Standardize on upper case "FIT", "FDT" as necessary for clarity
* Fix "tempoerary", "linex" typos

Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
parent e7dd02e3
No related branches found
No related tags found
No related merge requests found
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
# make O=sandbox sandbox_config # make O=sandbox sandbox_config
# make O=sandbox # make O=sandbox
# ./test/image/test-fit.py -u sandbox/u-boot # ./test/image/test-fit.py -u sandbox/u-boot
#
# Note: The above testing requires the Python development package, typically
# called python-devel or something similar.
import doctest import doctest
from optparse import OptionParser from optparse import OptionParser
...@@ -115,8 +118,8 @@ base_fdt = ''' ...@@ -115,8 +118,8 @@ base_fdt = '''
}; };
''' '''
# This is the U-Boot script that is run for each test. First load the fit, # This is the U-Boot script that is run for each test. First load the FIT,
# then do the 'bootm' command, then save out memory from the places where # then run the 'bootm' command, then save out memory from the places where
# we expect 'bootm' to write things. Then quit. # we expect 'bootm' to write things. Then quit.
base_script = ''' base_script = '''
sb load hostfs 0 %(fit_addr)x %(fit)s sb load hostfs 0 %(fit_addr)x %(fit)s
...@@ -266,7 +269,7 @@ def find_matching(text, match): ...@@ -266,7 +269,7 @@ def find_matching(text, match):
>>> find_matching('first line:10\\nsecond_line:20', 'first line:') >>> find_matching('first line:10\\nsecond_line:20', 'first line:')
'10' '10'
>>> find_matching('first line:10\\nsecond_line:20', 'second linex') >>> find_matching('first line:10\\nsecond_line:20', 'second line')
Traceback (most recent call last): Traceback (most recent call last):
... ...
ValueError: Test aborted ValueError: Test aborted
...@@ -389,7 +392,7 @@ def run_fit_test(mkimage, u_boot): ...@@ -389,7 +392,7 @@ def run_fit_test(mkimage, u_boot):
fail('Ramdisk loaded but should not be', stdout) fail('Ramdisk loaded but should not be', stdout)
# Find out the offset in the FIT where U-Boot has found the FDT # Find out the offset in the FIT where U-Boot has found the FDT
line = find_matching(stdout, 'Booting using the fdt blob at ') line = find_matching(stdout, 'Booting using the FDT blob at ')
fit_offset = int(line, 16) - params['fit_addr'] fit_offset = int(line, 16) - params['fit_addr']
fdt_magic = struct.pack('>L', 0xd00dfeed) fdt_magic = struct.pack('>L', 0xd00dfeed)
data = read_file(fit) data = read_file(fit)
...@@ -469,7 +472,7 @@ def run_tests(): ...@@ -469,7 +472,7 @@ def run_tests():
print '\nTests passed' print '\nTests passed'
print 'Caveat: this is only a sanity check - test coverage is poor' print 'Caveat: this is only a sanity check - test coverage is poor'
# Remove the tempoerary directory unless we are asked to keep it # Remove the temporary directory unless we are asked to keep it
if options.keep: if options.keep:
print "Output files are in '%s'" % base_dir print "Output files are in '%s'" % base_dir
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment