02_Misc.py 718 B

1234567891011121314151617181920212223
  1. #!/usr/bin/python
  2. import os, sys, mmap
  3. from regression import Regression
  4. loader = os.environ['PAL_LOADER']
  5. regression = Regression(loader, "Misc", timeout=5000)
  6. regression.add_check(name="Query System Time",
  7. check=lambda res: "Query System Time OK" in res[0].log)
  8. regression.add_check(name="Delay Execution for 10000 Microseconds",
  9. check=lambda res: "Delay Execution for 10000 Microseconds OK" in res[0].log)
  10. regression.add_check(name="Delay Execution for 3 Seconds",
  11. check=lambda res: "Delay Execution for 3 Seconds OK" in res[0].log)
  12. regression.add_check(name="Generate Random Bits",
  13. check=lambda res: "Generate Random Bits OK" in res[0].log)
  14. rv = regression.run_checks()
  15. if rv: sys.exit(rv)