don't have fm_bot send fm empty sources to run
Running fm_bot at head I'm confronted with a puzzling error: 2019/04/03 10:26:01 out/fm -b cpu -w foo -s big_rrect_rect_aa_effect filterbitmap_image_mandrill_512.png #failed (exit status 1): Don't understand --source ... bailing out. 2019/04/03 10:26:05 1 invocations of out/fm failed And of course running that command works fine. Puzzling! To fix this, we must take care not to subslice sources past its end, which fills with defaults, a bunch of extra "" sources. And add some '' around the unknown source to make the error message easier to parse. Serves me right for not testing this before I landed that tweak... Change-Id: I5c2abb35733b32a1142b0f42c4323112969ad2bb Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205825 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
1cc7874152
commit
408c3eaada
@ -414,7 +414,7 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(stderr, "Don't understand --source %s... bailing out.\n", source.c_str());
|
||||
fprintf(stderr, "Don't understand source '%s'... bailing out.\n", source.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,11 @@ func main() {
|
||||
sourcesPerBatch := (len(sources) + *processLimit - 1) / *processLimit
|
||||
|
||||
for i := 0; i < len(sources); i += sourcesPerBatch {
|
||||
batch := sources[i : i+sourcesPerBatch]
|
||||
end := i+sourcesPerBatch
|
||||
if end > len(sources) {
|
||||
end = len(sources)
|
||||
}
|
||||
batch := sources[i : end]
|
||||
|
||||
queue <- struct {
|
||||
Sources []string
|
||||
|
Loading…
Reference in New Issue
Block a user