angle/scripts/remove_files.py

32 строки
831 B
Python
Исходник Обычный вид История

Reland "Roll Vulkan repos" This reverts commit 3805122b0297b8208ff734a3bcdaa12850b60a00. Reason for revert: The OOM issue that coincidentally happened at the time this CL landed, and for which this CL was reverted, turned out to be irrelevant to this change. Original change's description: > Revert "Roll Vulkan repos" > > This reverts commit 55ea947c3bdd6c0ef68fc4b9ddbda26889f62622. > > Reason for revert: Seems to be causing a memory corruption on Windows/Intel bots. > > Original change's description: > > Roll Vulkan repos > > > > Bug: angleproject:3095 > > Change-Id: I6ae9d61304981223f9e2f1869ed32612aa38952c > > Reviewed-on: https://chromium-review.googlesource.com/c/1405714 > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Yuly Novikov <ynovikov@chromium.org> > > TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org > > Change-Id: I61879770c9bb16ac2231b081bda08e6211ba6831 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: angleproject:3095 > Reviewed-on: https://chromium-review.googlesource.com/c/1470605 > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@google.com,syoussefi@chromium.org Bug: angleproject:3095 Change-Id: Iabe8ea215b44c65c4c22b9b158c5dad3ffffdbb0 Reviewed-on: https://chromium-review.googlesource.com/c/1489153 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@google.com>
2019-02-26 18:00:54 +03:00
#!/usr/bin/python2
#
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# remove_files.py:
# This special action is used to cleanup old files from the build directory.
# Otherwise ANGLE will pick up the old file(s), causing build or runtime errors.
#
import glob
import os
import sys
if len(sys.argv) < 3:
print("Usage: " + sys.argv[0] + " <stamp_file> <remove_patterns>")
stamp_file = sys.argv[1]
for i in range(2, len(sys.argv)):
remove_pattern = sys.argv[i]
remove_files = glob.glob(remove_pattern)
for f in remove_files:
if os.path.isfile(f):
os.remove(f)
# touch a dummy file to keep a timestamp
with open(stamp_file, "w") as f:
f.write("blah")
f.close()