Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: pnacl/driver/tests/driver_test_utils.py

Issue 12459004: Adjust pnacl-translate sbtc flag override mechanism to append. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: do cpu check Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pnacl/driver/tests/build.scons ('k') | pnacl/driver/tests/driver_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/driver/tests/driver_test_utils.py
diff --git a/pnacl/driver/tests/driver_test_utils.py b/pnacl/driver/tests/driver_test_utils.py
index d59d33fa266163fd17c344b535b4fb005da4f8cf..1f4e1f82de496af1e69195c7efd582bba576a722 100644
--- a/pnacl/driver/tests/driver_test_utils.py
+++ b/pnacl/driver/tests/driver_test_utils.py
@@ -30,6 +30,17 @@ def _SetupLinuxHostDir(env, nacl_dir):
dir_64 = dir_template % 'x86_64'
env.set('BASE_HOST', dir_32 if os.path.exists(dir_32) else dir_64)
+def SetupNaClDir(env):
+ test_dir = os.path.abspath(dirname(__file__))
+ nacl_dir = dirname(dirname(dirname(test_dir)))
+ env.set('BASE_NACL', nacl_dir)
+
+def SetupToolchainDir(env):
+ test_dir = os.path.abspath(dirname(__file__))
+ nacl_dir = dirname(dirname(dirname(test_dir)))
+ toolchain_dir = os.path.join(nacl_dir, 'toolchain')
+ env.set('BASE_TOOLCHAIN', toolchain_dir)
+
def SetupHostDir(env):
# Some of the tools require 'BASE_HOST' to be set, because they end up
# running one of the host binaries.
@@ -49,7 +60,6 @@ def SetupHostDir(env):
'host_%s' % host_arch)
env.set('BASE_HOST', host_dir)
-
# A collection of override methods that mock driver_env.Environment.
# One thing is we prevent having to read a driver.conf file,
@@ -61,9 +71,10 @@ def TestEnvReset(self):
# The overrides.
self.set('LIBMODE', 'newlib')
self.set('PNACL_RUNNING_UNITTESTS', '1')
+ SetupNaClDir(self)
+ SetupToolchainDir(self)
SetupHostDir(self)
-
def ApplyTestEnvOverrides(env):
"""Register all the override methods and reset the env to a testable state.
"""
« no previous file with comments | « pnacl/driver/tests/build.scons ('k') | pnacl/driver/tests/driver_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698