sandbox: test: Provide an easy way to use the other FDT
authorSimon Glass <sjg@chromium.org>
Wed, 7 Sep 2022 02:27:11 +0000 (20:27 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 29 Sep 2022 20:11:14 +0000 (16:11 -0400)
commit8d468a188f69424b3461ba681a26b95bb9679f53
tree138ca8a47a3cdfb49dc88affb0453ababdd30fad
parent756c01422dfa193097aa3d43c083b8b23e4b2301
sandbox: test: Provide an easy way to use the other FDT

Add a test flag which indicates that the 'other' FDT should be set up
ready for use. Handle this by copying in the FDT, unflattening it for
livetree tests. Free the structures when the tests have run.

We cannot use the other FDT unless we are using live tree or
OFNODE_MULTI_TREE is enabled, since only one tree is supported by the
ofnode interface in that case. Add this condition into
ut_run_test_live_flat() and update the comments.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/test/test.h
test/test-main.c