test/py: Drop importing utils as util
Now that we have a shorter name, we don't need this sort of thing.
Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # test_android
diff --git a/test/py/tests/test_trace.py b/test/py/tests/test_trace.py
index 6fa4229..72f65f2 100644
--- a/test/py/tests/test_trace.py
+++ b/test/py/tests/test_trace.py
@@ -6,7 +6,7 @@
import pytest
import re
-import utils as util
+import utils
# This is needed for Azure, since the default '..' directory is not writeable
TMPDIR = '/tmp/test_trace'
@@ -106,12 +106,12 @@
map_fname (str): Filename of System.map
trace_dat (str): Filename of output file
"""
- out = util.run_and_log(
+ out = utils.run_and_log(
cons, [proftool, '-t', fname, '-o', trace_dat, '-m', map_fname,
'dump-ftrace'])
# Check that trace-cmd can read it
- out = util.run_and_log(cons, ['trace-cmd', 'dump', trace_dat])
+ out = utils.run_and_log(cons, ['trace-cmd', 'dump', trace_dat])
# Tracing meta data in file /tmp/test_trace/trace.dat:
# [Initial format]
@@ -140,7 +140,7 @@
# Check that the trace has something useful
cmd = f"trace-cmd report -l {trace_dat} |grep -E '(initf_|initr_)'"
- out = util.run_and_log(cons, ['sh', '-c', cmd])
+ out = utils.run_and_log(cons, ['sh', '-c', cmd])
# Format:
# u-boot-1 0..... 60.805596: function: initf_malloc
@@ -182,13 +182,13 @@
"""
# Generate the funcgraph format
- out = util.run_and_log(
+ out = utils.run_and_log(
cons, [proftool, '-t', fname, '-o', trace_dat, '-m', map_fname,
'dump-ftrace', '-f', 'funcgraph'])
# Check that the trace has what we expect
cmd = f'trace-cmd report -l {trace_dat} |head -n 70'
- out = util.run_and_log(cons, ['sh', '-c', cmd])
+ out = utils.run_and_log(cons, ['sh', '-c', cmd])
# First look for this:
# u-boot-1 0..... 282.101360: funcgraph_entry: 0.004 us | initf_malloc();
@@ -230,7 +230,7 @@
# Now look for initf_dm() and dm_timer_init() so we can check the bootstage
# time
cmd = f"trace-cmd report -l {trace_dat} |grep -E '(initf_dm|dm_timer_init)'"
- out = util.run_and_log(cons, ['sh', '-c', cmd])
+ out = utils.run_and_log(cons, ['sh', '-c', cmd])
start_timestamp = None
end_timestamp = None
@@ -267,7 +267,7 @@
"""
# Generate the flamegraph format
- out = util.run_and_log(
+ out = utils.run_and_log(
cons, [proftool, '-t', fname, '-o', trace_fg, '-m', map_fname,
'dump-flamegraph'])
@@ -284,7 +284,7 @@
assert found == 2
# Generate the timing graph
- out = util.run_and_log(
+ utils.run_and_log(
cons, [proftool, '-t', fname, '-o', trace_fg, '-m', map_fname,
'dump-flamegraph', '-f', 'timing'])