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

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

Issue 800553003: Update PNaCl to LLVM/Clang/Libcxx 223109 (nacl-change) (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: fix rebase Created 5 years, 10 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/pnacl-ld.py ('k') | pnacl/prune_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pnacl/driver/tests/path_length_test.py
diff --git a/pnacl/driver/tests/path_length_test.py b/pnacl/driver/tests/path_length_test.py
index 39d4077233f027cc044f7bae32d156a8598da249..45dc390704f10c5db8688efad1398fe701c5e314 100644
--- a/pnacl/driver/tests/path_length_test.py
+++ b/pnacl/driver/tests/path_length_test.py
@@ -33,12 +33,17 @@ class TestPathNames(driver_test_utils.DriverTesterCommon):
self.cwd_backup = os.getcwd()
self.LongTempDir = os.path.join(self.cwd_backup, 'a' * dir_len)
os.mkdir(self.LongTempDir)
+ # Create a directory whose path will be exactly 235 chars long
Karl 2015/02/20 16:30:43 Should there be a check to verify that the path is
jvoung (off chromium) 2015/02/23 22:12:00 Added an assert that it's exactly 235 (if that's w
Karl 2015/02/23 22:18:18 Actually, what I meant (both here and with path te
jvoung (off chromium) 2015/02/23 22:41:22 I see, I added another check for cwd's len.
+ shorter_dir_len = 235 - cwd_len - 1
+ self.ShorterTempDir = os.path.join(self.cwd_backup, 'a' * shorter_dir_len)
+ os.mkdir(self.ShorterTempDir)
def tearDown(self):
super(TestPathNames, self).tearDown()
os.chdir(self.cwd_backup)
sys.exit = self.backup_exit
shutil.rmtree(self.LongTempDir)
+ shutil.rmtree(self.ShorterTempDir)
def WriteCFile(self, filename):
with open(filename, 'w') as f:
@@ -56,7 +61,7 @@ class TestPathNames(driver_test_utils.DriverTesterCommon):
if not driver_test_utils.CanRunHost():
return
- name = os.path.join(self.LongTempDir, 'a file')
+ name = os.path.join(self.ShorterTempDir, 'a file')
self.WriteCFile(name + '.c')
driver_tools.RunDriver('pnacl-clang',
[name + '.c', '-c', '-o', name + '.o'])
« no previous file with comments | « pnacl/driver/pnacl-ld.py ('k') | pnacl/prune_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698