Fix CheckGeneratedFiles bot.

It turns out previous builds may leave root-owned
files in the work cache, and sometimes those
contain '.fp' files, which touch will fail on, since
the recipe doesn't run as root.

Solution is to restrict 'touch fp files' to the src/ subdirectory.

Change-Id: Ic0d70a67548ec66dbd1d3905fd1cacfadde181f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359496
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This commit is contained in:
Joe Gregorio 2021-01-26 11:39:51 -05:00
parent a0c266283a
commit a6bff0c344
2 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,7 @@
"cmd": [
"python",
"-u",
"import os\nimport subprocess\n\nfor r, d, files in os.walk('[START_DIR]/cache/work/skia'):\n for f in files:\n if f.endswith('.fp'):\n path = os.path.join(r, f)\n print 'touch %s' % path\n subprocess.check_call(['touch', path])\n"
"import os\nimport subprocess\n\nfor r, d, files in os.walk(os.path.join('[START_DIR]/cache/work/skia', 'src')):\n for f in files:\n if f.endswith('.fp'):\n path = os.path.join(r, f)\n print 'touch %s' % path\n subprocess.check_call(['touch', path])\n"
],
"cwd": "[START_DIR]/cache/work/skia",
"env": {
@ -185,7 +185,7 @@
"@@@STEP_LOG_LINE@python.inline@import os@@@",
"@@@STEP_LOG_LINE@python.inline@import subprocess@@@",
"@@@STEP_LOG_LINE@python.inline@@@@",
"@@@STEP_LOG_LINE@python.inline@for r, d, files in os.walk('[START_DIR]/cache/work/skia'):@@@",
"@@@STEP_LOG_LINE@python.inline@for r, d, files in os.walk(os.path.join('[START_DIR]/cache/work/skia', 'src')):@@@",
"@@@STEP_LOG_LINE@python.inline@ for f in files:@@@",
"@@@STEP_LOG_LINE@python.inline@ if f.endswith('.fp'):@@@",
"@@@STEP_LOG_LINE@python.inline@ path = os.path.join(r, f)@@@",

View File

@ -50,7 +50,7 @@ def RunSteps(api):
program="""import os
import subprocess
for r, d, files in os.walk('%s'):
for r, d, files in os.walk(os.path.join('%s', 'src')):
for f in files:
if f.endswith('.fp'):
path = os.path.join(r, f)