02_Event.py 458 B

123456789101112131415
  1. import os, sys
  2. from regression import Regression
  3. loader = os.environ['PAL_LOADER']
  4. regression = Regression(loader, "Event")
  5. regression.add_check(name="Wait for event with too short timeout",
  6. check=lambda res: "Wait with too short timeout ok." in res[0].log)
  7. regression.add_check(name="Wait for event with long enough timeout",
  8. check=lambda res: "Wait with long enough timeout ok." in res[0].log)
  9. rv = regression.run_checks()
  10. if rv: sys.exit(rv)