As suggested by @yamahata in PR #612.
@@ -2,10 +2,7 @@ import os, sys, mmap
from regression import Regression
loader = sys.argv[1]
-try:
- sgx = os.environ['SGX_RUN']
-except KeyError:
- sgx = False
+sgx = os.environ.get('SGX_RUN') == '1'
# Running Bootstrap
regression = Regression(loader, "mmap-file", None, 60000)
@@ -2,10 +2,10 @@ import os, sys, mmap
loader = os.environ['PAL_LOADER']
-is_sgx = 'SGX_RUN' in os.environ and os.environ['SGX_RUN'] == '1'
def manifest_file(file):
- if is_sgx:
+ if sgx:
return file + '.manifest.sgx'
else:
return file + '.manifest'
@@ -2,13 +2,10 @@ import os, sys, mmap
- if 'SGX_RUN' in os.environ and os.environ['SGX_RUN'] == '1':
- sgx = 0
regression = Regression(loader, "Memory")
if sgx:
print("Bulk IPC not supported on SGX")
@@ -3,7 +3,7 @@ from regression import Regression
-sgx = os.environ.get('SGX_RUN', False)