skia2/tools/OverwriteLine.h
commit-bot@chromium.org 261c666682 Make tests output spin on the same line by default.
-v now gives a cleaned-up version of the existing output (every test timed, useless information removed)

Example output, default:
  [ 36/193] PathOpsCubicIntersectionOneOffTest
then later when finished...
  [193/193] BlurMaskFilter

Example output, -v:  (note, codereview is messing up my pretty spacing)
Skia UnitTests: --resourcePath resources SK_RELEASE SK_SCALAR_IS_FLOAT skia_arch_width=32
[  1/193]     0ms PathOpsSimplifyDontFailOneTest
[  2/193]     0ms PathOpsSimplifyFailOneTest
[  3/193]    30ms PathOpsSkpTest
[  4/193]    21ms PathOpsSimplifyFailTest
....
[182/193]  1026ms BlitRow
[183/193]   808ms AAClip
[184/193]  4333ms Math
[185/193]  5068ms PackBits
[186/193]  2265ms DrawText_DrawPosText
[187/193]  9163ms PathOpsRectsThreadedTest
[188/193]  5540ms GLPrograms
[189/193]     0ms GLInterfaceValidation
[190/193]     2ms DeferredCanvas
[191/193]     1ms ClipCache
[192/193]    30ms BlurMaskFilter
[193/193] 10396ms PathOpsOpCubicsThreadedTest
Finished 193 tests, 0 failures, 0 skipped.  (622610 internal tests)

BUG=
R=halcanary@google.com, mtklein@google.com, bungeman@google.com

Author: mtklein@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12860 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-02 16:19:53 +00:00

14 lines
336 B
C

#ifndef OverwriteLine_DEFINED
#define OverwriteLine_DEFINED
// Print this string to reset and clear your current terminal line.
static const char* kSkOverwriteLine =
#ifdef SK_BUILD_FOR_WIN32
"\r \r"
#else
"\r\033[K"
#endif
;
#endif//OverwriteLine_DEFINED