00_openmp.py 574 B

1234567891011121314151617181920
  1. import os, sys, mmap
  2. from regression import Regression
  3. loader = sys.argv[1]
  4. sgx = os.environ.get('SGX_RUN') == '1'
  5. # This test is only meaningful on SGX PAL because only SGX catches raw syscalls
  6. # and redirects to Graphene's LibOS. If we will add seccomp to Linux PAL, then
  7. # we should allow this test on Linux PAL as well.
  8. if not sgx:
  9. sys.exit(0)
  10. # Running OpenMP
  11. regression = Regression(loader, "openmp")
  12. regression.add_check(name="OpenMP simple for loop",
  13. check=lambda res: "first: 0, last: 9" in res[0].out)
  14. rv = regression.run_checks()
  15. if rv: sys.exit(rv)