02_Pipe.py 819 B

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