Add pathops and capture stderr so we can get SkDebugf output.

BUG=skia:
R=mtklein@google.com

Author: jcgregorio@google.com

Review URL: https://codereview.chromium.org/252863002

git-svn-id: http://skia.googlecode.com/svn/trunk@14402 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
commit-bot@chromium.org 2014-04-28 14:56:32 +00:00
Родитель 9c9005a347
Коммит 15b29811ca
3 изменённых файлов: 11 добавлений и 15 удалений

Просмотреть файл

@ -1,6 +1,6 @@
// To regenerate this list of includes run the following command from skia/include: // To regenerate this list of includes run the following command from skia/include:
// //
// find core effects -maxdepth 1 -name "*.h" | sed "s#^[^\/]*\/##g" | sed "s/\(.*\)/#include \"\1\"/" | sort // find core effects pathops -maxdepth 1 -name "*.h" | sed "s#^[^\/]*\/##g" | sed "s/\(.*\)/#include \"\1\"/" | sort
// //
#include "Sk1DPathEffect.h" #include "Sk1DPathEffect.h"
#include "Sk2DPathEffect.h" #include "Sk2DPathEffect.h"
@ -9,6 +9,7 @@
#include "SkAnnotation.h" #include "SkAnnotation.h"
#include "SkArithmeticMode.h" #include "SkArithmeticMode.h"
#include "SkAvoidXfermode.h" #include "SkAvoidXfermode.h"
#include "SkBBHFactory.h"
#include "SkBicubicImageFilter.h" #include "SkBicubicImageFilter.h"
#include "SkBitmapDevice.h" #include "SkBitmapDevice.h"
#include "SkBitmap.h" #include "SkBitmap.h"
@ -101,10 +102,12 @@
#include "SkPathEffect.h" #include "SkPathEffect.h"
#include "SkPath.h" #include "SkPath.h"
#include "SkPathMeasure.h" #include "SkPathMeasure.h"
#include "SkPathOps.h"
#include "SkPathRef.h" #include "SkPathRef.h"
#include "SkPerlinNoiseShader.h" #include "SkPerlinNoiseShader.h"
#include "SkPicture.h" #include "SkPicture.h"
#include "SkPictureImageFilter.h" #include "SkPictureImageFilter.h"
#include "SkPictureRecorder.h"
#include "SkPixelRef.h" #include "SkPixelRef.h"
#include "SkPixelXorXfermode.h" #include "SkPixelXorXfermode.h"
#include "SkPoint.h" #include "SkPoint.h"
@ -119,6 +122,7 @@
#include "SkRefCnt.h" #include "SkRefCnt.h"
#include "SkRegion.h" #include "SkRegion.h"
#include "SkRRect.h" #include "SkRRect.h"
#include "SkRTreePicture.h"
#include "SkScalar.h" #include "SkScalar.h"
#include "SkShader.h" #include "SkShader.h"
#include "SkSize.h" #include "SkSize.h"

Просмотреть файл

@ -258,8 +258,7 @@ type response struct {
} }
// doCmd executes the given command line string in either the out/Debug // doCmd executes the given command line string in either the out/Debug
// directory or the inout directory. Returns the stdout, and stderr in the case // directory or the inout directory. Returns the stdout and stderr.
// of a non-zero exit code.
func doCmd(commandLine string, moveToDebug bool) (string, error) { func doCmd(commandLine string, moveToDebug bool) (string, error) {
log.Printf("Command: %q\n", commandLine) log.Printf("Command: %q\n", commandLine)
programAndArgs := strings.SplitN(commandLine, " ", 2) programAndArgs := strings.SplitN(commandLine, " ", 2)
@ -283,21 +282,13 @@ func doCmd(commandLine string, moveToDebug bool) (string, error) {
cmd.Dir = abs cmd.Dir = abs
} }
log.Printf("Run in directory: %q\n", cmd.Dir) log.Printf("Run in directory: %q\n", cmd.Dir)
var stdOut bytes.Buffer message, err := cmd.CombinedOutput()
cmd.Stdout = &stdOut log.Printf("StdOut + StdErr: %s\n", string(message))
var stdErr bytes.Buffer
cmd.Stderr = &stdErr
cmd.Start()
err = cmd.Wait()
message := stdOut.String()
log.Printf("StdOut: %s\n", message)
if err != nil { if err != nil {
log.Printf("Exit status: %s\n", err.Error()) log.Printf("Exit status: %s\n", err.Error())
log.Printf("StdErr: %s\n", stdErr.String()) return string(message), fmt.Errorf("Failed to run command.")
message += stdErr.String()
return message, fmt.Errorf("Failed to run command.")
} }
return message, nil return string(message), nil
} }
// reportError formats an HTTP error response and also logs the detailed error message. // reportError formats an HTTP error response and also logs the detailed error message.

Просмотреть файл

@ -7,6 +7,7 @@
'include_dirs' : [ 'include_dirs' : [
'../src/core', '../src/core',
'../src/images', '../src/images',
'../src/pathops',
], ],
'sources': [ 'sources': [
'../experimental/webtry/result.cpp', '../experimental/webtry/result.cpp',