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

Unified Diff: trunk/src/native_client_sdk/src/test_all.py

Issue 238783004: Revert 263791 "Remove dependency of NaCl untarred toolchain from..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | « no previous file | trunk/src/native_client_sdk/src/tools/lib/tests/get_shared_deps_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/native_client_sdk/src/test_all.py
===================================================================
--- trunk/src/native_client_sdk/src/test_all.py (revision 263903)
+++ trunk/src/native_client_sdk/src/test_all.py (working copy)
@@ -4,27 +4,15 @@
# found in the LICENSE file.
import os
-import shutil
import sys
-import tarfile
import unittest
# add tools folder to sys.path
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-TOOLS_DIR = os.path.join(SCRIPT_DIR, 'tools')
-BUILD_TOOLS_DIR = os.path.join(SCRIPT_DIR, 'build_tools')
-sys.path.append(TOOLS_DIR)
-sys.path.append(os.path.join(TOOLS_DIR, 'tests'))
-sys.path.append(os.path.join(TOOLS_DIR, 'lib', 'tests'))
-sys.path.append(BUILD_TOOLS_DIR)
-sys.path.append(os.path.join(BUILD_TOOLS_DIR, 'tests'))
+sys.path.append(os.path.join(SCRIPT_DIR, 'tools', 'tests'))
+sys.path.append(os.path.join(SCRIPT_DIR, 'tools', 'lib', 'tests'))
+sys.path.append(os.path.join(SCRIPT_DIR, 'build_tools', 'tests'))
-import build_paths
-import getos
-
-TOOLCHAIN_OUT = os.path.join(build_paths.OUT_DIR, 'sdk_tests', 'toolchain')
-NACL_X86_GLIBC_TOOLCHAIN = os.path.join(TOOLCHAIN_OUT, 'nacl_x86_glibc')
-
TEST_MODULES = [
'create_html_test',
'create_nmf_test',
@@ -47,45 +35,7 @@
'verify_ppapi_test',
]
-def ExtractToolchain():
- # TODO(dyen): This function is basically all temporary code. After the DEPS
- # roll, replace this untar with package_version.py which will do the
- # untarring and be able to check whether or not the toolchain is out of date.
- platform_name = getos.GetPlatform()
- nacl_x86_glibc_tar = os.path.join(build_paths.NACL_DIR, 'toolchain', '.tars',
- 'toolchain_%s_x86.tar.bz2' % platform_name)
- assert os.path.isfile(nacl_x86_glibc_tar), 'Could not locate toolchain tar'
-
- stamp_file = os.path.join(NACL_X86_GLIBC_TOOLCHAIN, 'extract.stamp')
- if (not os.path.isfile(stamp_file) or
- os.path.getmtime(stamp_file) < os.path.getmtime(nacl_x86_glibc_tar)):
-
- print 'Extracting nacl_x86_glibc...'
- temp_dir = os.path.join(TOOLCHAIN_OUT, 'temp')
- if os.path.isdir(temp_dir):
- shutil.rmtree(temp_dir)
- os.makedirs(temp_dir)
- with tarfile.open(nacl_x86_glibc_tar) as f:
- f.extractall(temp_dir)
-
- if os.path.isdir(NACL_X86_GLIBC_TOOLCHAIN):
- shutil.rmtree(NACL_X86_GLIBC_TOOLCHAIN)
- parent_dir = os.path.dirname(NACL_X86_GLIBC_TOOLCHAIN)
- if not os.path.isdir(parent_dir):
- os.makedirs(parent_dir)
-
- extracted_path = os.path.join(temp_dir, 'toolchain',
- '%s_x86' % platform_name)
- os.rename(extracted_path, NACL_X86_GLIBC_TOOLCHAIN)
-
- with open(stamp_file, 'wt') as f:
- f.write(nacl_x86_glibc_tar)
-
def main():
- # Some of the unit tests utilize nacl_x86_glibc. Untar a copy in the output
- # directory for the tests to use.
- ExtractToolchain()
-
suite = unittest.TestSuite()
for module_name in TEST_MODULES:
module = __import__(module_name)
« no previous file with comments | « no previous file | trunk/src/native_client_sdk/src/tools/lib/tests/get_shared_deps_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698