Loading...
1# SPDX-License-Identifier: GPL-2.0
2"""
3Set random values recursively in nested choices.
4
5Kconfig can create a choice-in-choice structure by using 'if' statement.
6randconfig should correctly set random choice values.
7
8Related Linux commit: 3b9a19e08960e5cdad5253998637653e592a3c29
9"""
10
11
12def test(conf):
13 for i in range(20):
14 assert conf.randconfig() == 0
15 assert (conf.config_contains('expected_stdout0') or
16 conf.config_contains('expected_stdout1') or
17 conf.config_contains('expected_stdout2'))
1"""
2Set random values recursively in nested choices.
3
4Kconfig can create a choice-in-choice structure by using 'if' statement.
5randconfig should correctly set random choice values.
6
7Related Linux commit: 3b9a19e08960e5cdad5253998637653e592a3c29
8"""
9
10
11def test(conf):
12 for i in range(20):
13 assert conf.randconfig() == 0
14 assert (conf.config_contains('expected_stdout0') or
15 conf.config_contains('expected_stdout1') or
16 conf.config_contains('expected_stdout2'))