Simon Glass | c405fc4 | 2016-07-04 11:58:41 -0600 | [diff] [blame] | 1 | # Copyright (c) 2016 Google, Inc |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0+ |
| 4 | |
| 5 | import pytest |
| 6 | |
| 7 | OF_PLATDATA_OUTPUT = ''' |
| 8 | of-platdata probe: |
| 9 | bool 1 |
| 10 | byte 05 |
| 11 | bytearray 06 00 00 |
| 12 | int 1 |
| 13 | intarray 2 3 4 0 |
| 14 | longbytearray 09 0a 0b 0c 0d 0e 0f 10 11 |
| 15 | string message |
| 16 | stringarray "multi-word" "message" "" |
| 17 | of-platdata probe: |
| 18 | bool 0 |
| 19 | byte 08 |
| 20 | bytearray 01 23 34 |
| 21 | int 3 |
| 22 | intarray 5 0 0 0 |
| 23 | longbytearray 09 00 00 00 00 00 00 00 00 |
| 24 | string message2 |
| 25 | stringarray "another" "multi-word" "message" |
| 26 | of-platdata probe: |
| 27 | bool 0 |
| 28 | byte 00 |
| 29 | bytearray 00 00 00 |
| 30 | int 0 |
| 31 | intarray 0 0 0 0 |
| 32 | longbytearray 00 00 00 00 00 00 00 00 00 |
| 33 | string <NULL> |
| 34 | stringarray "one" "" "" |
| 35 | ''' |
| 36 | |
Simon Glass | e0b0274 | 2016-07-16 18:36:44 -0600 | [diff] [blame] | 37 | @pytest.mark.buildconfigspec('spl_of_platdata') |
Simon Glass | c405fc4 | 2016-07-04 11:58:41 -0600 | [diff] [blame] | 38 | def 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 |