02_Pipe.py 670 B

12345678910111213141516171819202122
  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 Connection",
  9. check=lambda res: "Pipe Connection 1 OK" in res[0].log)
  10. regression.add_check(name="Pipe Transmission",
  11. check=lambda res: "Pipe Write 1 OK" in res[0].log and
  12. "Pipe Read 1: Hello World 1" in res[0].log and
  13. "Pipe Write 2 OK" in res[0].log and
  14. "Pipe Read 2: Hello World 2" in res[0].log)
  15. regression.run_checks()