blob: 457c4055af783c22ebfc34354a597663486cb4f4 [file] [log] [blame]
Simon Glassc405fc42016-07-04 11:58:41 -06001# Copyright (c) 2016 Google, Inc
2#
3# SPDX-License-Identifier: GPL-2.0+
4
5import pytest
6
7OF_PLATDATA_OUTPUT = '''
8of-platdata probe:
9bool 1
10byte 05
11bytearray 06 00 00
12int 1
13intarray 2 3 4 0
14longbytearray 09 0a 0b 0c 0d 0e 0f 10 11
15string message
16stringarray "multi-word" "message" ""
17of-platdata probe:
18bool 0
19byte 08
20bytearray 01 23 34
21int 3
22intarray 5 0 0 0
23longbytearray 09 00 00 00 00 00 00 00 00
24string message2
25stringarray "another" "multi-word" "message"
26of-platdata probe:
27bool 0
28byte 00
29bytearray 00 00 00
30int 0
31intarray 0 0 0 0
32longbytearray 00 00 00 00 00 00 00 00 00
33string <NULL>
34stringarray "one" "" ""
35'''
36
Simon Glasse0b02742016-07-16 18:36:44 -060037@pytest.mark.buildconfigspec('spl_of_platdata')
Simon Glassc405fc42016-07-04 11:58:41 -060038def test_ofplatdata(u_boot_console):
39 """Test that of-platdata can be generated and used in sandbox"""
40 cons = u_boot_console
41 output = cons.get_spawn_output().replace('\r', '')
42 assert OF_PLATDATA_OUTPUT in output