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.delau...@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.

diff --git a/test/py/conftest.py b/test/py/conftest.py

+        if device_tree:
+            o_dt = 'DEVICE_TREE=%s' % device_tree
+        else:
+            o_dt = 'all'

You might want to make o_dt be a list that's either empty or contains one string. Then ...

          cmds = (
              ['make', o_opt, '-s', board_type + '_defconfig'],
-            ['make', o_opt, '-s', '-j8'],
+            ['make', o_opt, o_dt, '-s', '-j8'],
          )

... you can modify that line so that it doesn't add any additional options if o_dt is empty, so there's no change to the command-line except in the case where a DT is specified, to avoid the potential for any change to the existing flow:

            ['make', o_opt, *o_dt, '-s', '-j8'],

or:

            ['make', o_opt, '-s', '-j8'] + o_dt,
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to