1. 17 Mar, 2021 5 commits
  2. 16 Mar, 2021 1 commit
  3. 05 Mar, 2021 2 commits
  4. 04 Mar, 2021 4 commits
  5. 03 Mar, 2021 2 commits
  6. 27 Feb, 2021 2 commits
  7. 23 Feb, 2021 20 commits
  8. 17 Feb, 2021 4 commits
    • Harald Seiler's avatar
      context: Allow enabling reset_on_error by default · 5dc32202
      Harald Seiler authored
      Add the option to configure a Context to turn the `reset_on_error`
      feature on by default, unless explicitly disabled.
      Signed-off-by: Harald Seiler's avatarHarald Seiler <hws@denx.de>
    • Harald Seiler's avatar
      context: Add reset_on_error request configuration · 483f6c5b
      Harald Seiler authored
      In some situations, it makes sense to not keep an instance around if an
      exception occured while it was active.  Especially with the new
      `keep_alive` Context mode, this ensure we won't leave dirty/broken
      instances alive.
      Introduce a new `reset_on_error` configurable parameter to the request()
      function which, when enabled, instructs the Context to tear down an
      instance if the context-manager was exited abnormally with an exception.
      Signed-off-by: Harald Seiler's avatarHarald Seiler <hws@denx.de>
    • Harald Seiler's avatar
      context: Add keep_alive mode · f1766999
      Harald Seiler authored
      Add a configurable mode which changes the behavior of the Context:
      Instead of de-initializing an instance once the last requesting
      context-manager exits, the instance is "kept alive" so it can be
      immediately reaquired by a following request, without
      a re-initialization.  To demonstrate this, consider the following code:
          with ctx.request(tbot.role.LabHost) as lh:
              lh.env("TEST_VAR", "1234")
          with ctx.request(tbot.role.LabHost) as lh2:
      With the default and previous behavior, the message would be empty.
      With keep-alive mode enabled, the message would print `1234`.
      This is meant to allow testcases running in sequence to re-use previous
      instances instead of initializing their own each time.
      This new mode can be enabled by passing `keep_alive=True` to the
      constructor of `Context`.
      Signed-off-by: Harald Seiler's avatarHarald Seiler <hws@denx.de>
    • Harald Seiler's avatar
      context: Document the add_defaults parameter · e0edec1b
      Harald Seiler authored
      Signed-off-by: Harald Seiler's avatarHarald Seiler <hws@denx.de>