80_udp.py 724 B

123456789101112131415161718192021222324
  1. import sys
  2. from regression import Regression
  3. loader = sys.argv[1]
  4. # Running udp
  5. regression = Regression(loader, "udp", None)
  6. regression.add_check(name="udp",
  7. check=lambda res:
  8. "Data: This is packet 0" in res[0].out and
  9. "Data: This is packet 1" in res[0].out and
  10. "Data: This is packet 2" in res[0].out and
  11. "Data: This is packet 3" in res[0].out and
  12. "Data: This is packet 4" in res[0].out and
  13. "Data: This is packet 5" in res[0].out and
  14. "Data: This is packet 6" in res[0].out and
  15. "Data: This is packet 7" in res[0].out and
  16. "Data: This is packet 8" in res[0].out and
  17. "Data: This is packet 9" in res[0].out)
  18. rv = regression.run_checks()
  19. if rv:
  20. sys.exit(rv)