02_Pipe.py 801 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/python
  2. import os, sys, mmap
  3. from regression import Regression
  4. loader = '../src/pal'
  5. regression = Regression(loader, "Pipe")
  6. regression.add_check(name="Pipe Creation",
  7. check=lambda res: "Pipe Creation 1 OK" in res[0].log)
  8. regression.add_check(name="Pipe Attributes",
  9. check=lambda res: "Pipe Attribute Query 1 on pipesrv returned OK" in res[0].log)
  10. regression.add_check(name="Pipe Connection",
  11. check=lambda res: "Pipe Connection 1 OK" in res[0].log)
  12. regression.add_check(name="Pipe Transmission",
  13. check=lambda res: "Pipe Write 1 OK" in res[0].log and
  14. "Pipe Read 1: Hello World 1" in res[0].log and
  15. "Pipe Write 2 OK" in res[0].log and
  16. "Pipe Read 2: Hello World 2" in res[0].log)
  17. regression.run_checks()