X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=test%2Fpy%2Ftests%2Ftest_fit.py;h=a0f9350411b49cddfbadb4652457b6302e8c9bc9;hb=dffd56d1d270e4797e43272a6c9000b8b8aeaf29;hp=4b32bb18b8b3d6b8296e1b403042379ef70a166e;hpb=002e91087c817f8281fccee327e0d8e98c691a2f;p=u-boot diff --git a/test/py/tests/test_fit.py b/test/py/tests/test_fit.py index 4b32bb18b8..a0f9350411 100755 --- a/test/py/tests/test_fit.py +++ b/test/py/tests/test_fit.py @@ -1,9 +1,10 @@ -# Copyright (c) 2013, Google Inc. -# # SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2013, Google Inc. # # Sanity check of the FIT handling in U-Boot +from __future__ import print_function + import os import pytest import struct @@ -154,7 +155,7 @@ def test_fit(u_boot_console): src = make_fname('u-boot.dts') dtb = make_fname('u-boot.dtb') with open(src, 'w') as fd: - print >> fd, base_fdt + print(base_fdt, file=fd) util.run_and_log(cons, ['dtc', src, '-O', 'dtb', '-o', dtb]) return dtb @@ -168,7 +169,7 @@ def test_fit(u_boot_console): """ its = make_fname('test.its') with open(its, 'w') as fd: - print >> fd, base_its % params + print(base_its % params, file=fd) return its def make_fit(mkimage, params): @@ -187,7 +188,7 @@ def test_fit(u_boot_console): its = make_its(params) util.run_and_log(cons, [mkimage, '-f', its, fit]) with open(make_fname('u-boot.dts'), 'w') as fd: - print >> fd, base_fdt + print(base_fdt, file=fd) return fit def make_kernel(filename, text): @@ -203,7 +204,7 @@ def test_fit(u_boot_console): for i in range(100): data += 'this %s %d is unlikely to boot\n' % (text, i) with open(fname, 'w') as fd: - print >> fd, data + print(data, file=fd) return fname def make_ramdisk(filename, text): @@ -217,7 +218,7 @@ def test_fit(u_boot_console): for i in range(100): data += '%s %d was seldom used in the middle ages\n' % (text, i) with open(fname, 'w') as fd: - print >> fd, data + print(data, file=fd) return fname def find_matching(text, match):