__init__.py 507 B

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