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

Unified Diff: test/test262/archive.py

Issue 2034713005: [gn] Port test262 archiving to gn (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« test/test262/BUILD.gn ('K') | « test/test262/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test262/archive.py
diff --git a/test/test262/archive.py b/test/test262/archive.py
index c265b324215a9e76f3202bb11ad1bd42392ad152..9a52d6cb0c842b601af83e3cc0bed887776ab145 100755
--- a/test/test262/archive.py
+++ b/test/test262/archive.py
@@ -4,7 +4,13 @@
# found in the LICENSE file.
import os
+import sys
import tarfile
+import time
+
+# In GN we expect the path to a stamp file as an argument.
+if len(sys.argv) == 2:
+ STAMP_FILE = os.path.abspath(sys.argv[1])
os.chdir(os.path.dirname(os.path.abspath(__file__)))
@@ -21,3 +27,10 @@ def filter_git(tar_info):
with tarfile.open('data.tar', 'w') as tar:
tar.add('data', filter=filter_git)
+
+# Workaround for GN. We can't specify the tarfile as output because it's
vogelheim 2016/06/06 08:48:26 Can we get around this workaround once the gyp dep
Michael Achenbach 2016/06/06 08:51:21 Not because of the deprecation. Only by investing
+# not in the product directory. Therefore we track running of this script
+# with an extra stamp file in the product directory.
+if len(sys.argv) == 2:
+ with open(STAMP_FILE, 'w') as f:
+ f.write(str(time.time()))
« test/test262/BUILD.gn ('K') | « test/test262/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698