[U-Boot] [PATCH v2 4/8] test: py: add option to select device tree used during compilation

Stephen Warren swarren at wwwdotorg.org
Tue May 21 21:10:07 UTC 2019


On 5/21/19 12:32 PM, Patrick DELAUNAY wrote:
> Hi Stephen,
> 
> For information after the remarksSimon's  remark,
> I simplify the test, so this part is no more needed
> See http://patchwork.ozlabs.org/patch/1102938/
> 
> But I will answer with my status and my tests done on the python code.
> 
>>
>> On 5/20/19 7:00 AM, Patrick Delaunay wrote:
>>> Only used for spl compilation which include the device tree (with
>>> platdata or embedded device tree).
>>> For U-boot, test use config.dtb, by default :
>>>      "build_dir + '/arch/sandbox/dts/test.dtb'"
>>>
>>> Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
>>> ---
>>> I need to force o_dt = 'all' to avoid make error:
>>>
>>> make: *** empty string invalid as file name.  Stop.
>>>
>>> But, I don't sure that it is the better solution for pytest.
>>
>> This feels a bit odd. What board are you compiling for? I would expect the same
>> compilation commands to "just work" for all boards, and would initially claim that if
>> they don't, it's a bug in the makefiles that should be fixed there.
> 
> Yes, it is strange.
> 
> When I compile the board I have not the problem, I have issue only when I use pytest.
...
> But if I use =
...
>          if device_tree:
>              o_dt = 'DEVICE_TREE=%s' % device_tree
>          else:
>              o_dt = ''
...
> But the second command I have got the next error:
> 
> ./test/py/test.py --bd sandbox --build  -k 'test_000_version'
> +make O=/local/home/frq07632/views/u-boot/u-boot/build-sandbox -s sandbox_defconfig
> +make O=/local/home/frq07632/views/u-boot/u-boot/build-sandbox  -s -j8
> make: *** empty string invalid as file name.  Stop.

Right, o_dt is '' so there's an extra zero-length parameter between the 
"O=" and "-s" argument in that last command, which is what the error 
message complains about.

But this is all with your patch applied. I still don't understand what 
issue this was trying to solve in the first place, i.e. what is/was 
wrong with u-boot.git's master branch. I can run test/py for both 
sandbox and sandbox_spl with unmodified u-boot.git master branch; see 
logs below. Is there still some bug I need to fix, that exists without 
your patch series?

> [swarren at swarren-lx1 u-boot]$ ./test/py/test.py --bd sandbox --build -k test_000_version
> +make O=/home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot/build-sandbox -s sandbox_defconfig
> +make O=/home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot/build-sandbox -s -j8
> ============================= test session starts ==============================
> platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
> rootdir: /home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot, inifile: 
> collected 503 items 
> 
> test/py/tests/test_000_version.py .
> 
> ================= 502 tests deselected by '-ktest_000_version' =================
> =================== 1 passed, 502 deselected in 0.17 seconds ===================

> [swarren at swarren-lx1 u-boot]$ ./test/py/test.py --bd sandbox_spl --build -k test_000_version
> +make O=/home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot/build-sandbox_spl -s sandbox_spl_defconfig
> +make O=/home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot/build-sandbox_spl -s -j8
> ============================= test session starts ==============================
> platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
> rootdir: /home/swarren/shared/git_wa/tegra-uboot-flasher/u-boot, inifile: 
> collected 492 items 
> 
> test/py/tests/test_000_version.py .
> 
> ================= 491 tests deselected by '-ktest_000_version' =================
> =================== 1 passed, 491 deselected in 0.31 seconds ===================


More information about the U-Boot mailing list