Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Issue 39523002: Add harness for running Unicode.org Bidi tests. (Closed)

Created:
7 years, 1 month ago by eseidel
Modified:
7 years, 1 month ago
CC:
blink-reviews, igor.o, behdad_google, jww
Visibility:
Public.

Description

Add harness for running Unicode.org Bidi tests. This depends on having the BidiTest.txt file in your $CWD when executing blink_platform_unittests: http://www.unicode.org/Public/6.3.0/ucd/BidiTest.txt checked in: src/third_party/icu/source/test/testdata/BidiTest.txt Unfortunately since we can't depend on base/ directly from Blink we can't use base/path_service.h and thus can't reliably find the checked-in BidiTest.txt file to run this unittest on the bots. For now if BidiTest.txt is not in $CWD it just logs an ERROR and bails without failing. To run locally: ninja -C out/Debug blink_platform_unittests ./out/Debug/blink_platform_unittests \ --gtest_filter=BidiResolver.BidiTest_txt Currently this skips all the tests for the new isolate control characters in Unicode 6.3. Even still, it looks like we may have a bunch of corner cases in our UBA to fix. WARNING: Skipped 418143 tests. Ran 352098 tests: 44887 level failures, 19153 order failures. I suspect there are a couple harness-integration issues causing unnecessary level failures. Order failures are more likely to represent user-observable bugs. I'm interested in getting this checked in so we can iterate on these failures. We should consider checking in a golden file as well and comparing the output between runs instead of just the gtest asserts I added. (Revisions for a later patch!) I split the BidiTest.txt parsing code out into its own header which hopefully we can upstream to Unicode.org since it seems silly for everyone to write this (non-trivial) logic themselves. We have no business maintaining this parsing code (especially since the test format has changed between unicode versions). There is another bidi test file from unicode.org: http://www.unicode.org/Public/6.3.0/ucd/BidiCharacterTest.txt But that will require another separate parser. :( BUG=311432 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161046

Patch Set 1 #

Patch Set 2 : Not completely busted #

Patch Set 3 : Closer, still needs paragraph direction support to pass tests #

Patch Set 4 : Split the parsing harness into its own file #

Patch Set 5 : Actually seems to work. I think I'm setting the paragraph direction incorrectly still #

Patch Set 6 : Cleaned up a little #

Patch Set 7 : Much simpler error-reporting, I think this is actually useable #

Patch Set 8 : Close to being useful #

Patch Set 9 : Closer #

Patch Set 10 : Fix AutoLTR support and generation of ordering values" #

Patch Set 11 : Make it possible to skip tests for features we don't yet support #

Patch Set 12 : Don't fail when we can't find BidiTest.txt, ready for review #

Patch Set 13 : AppEngine 500s... #

Total comments: 3

Patch Set 14 : Add a comment as to why we can't use Platform::current()->unitTestSupport() #

Patch Set 15 : update comments about reference implementations #

Total comments: 5

Patch Set 16 : Removed most of the stream usage and fixed header comments and license #

Total comments: 25

Patch Set 17 : Updated per jyasskin's review #

Total comments: 7

Patch Set 18 : For landing #

Patch Set 19 : Fix mac build? #

Patch Set 20 : Another attempt to fix mac #

Patch Set 21 : #

Patch Set 22 : Fix another warning #

Patch Set 23 : Fix GCC build #

Patch Set 24 : remove stray change #

Patch Set 25 : Some day this change will land #

Patch Set 26 : Avoid std::isspace to make msvc 2010 happy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -0 lines) Patch
M Source/platform/text/BidiResolverTest.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +192 lines, -0 lines 0 comments Download
A Source/platform/text/BidiTestHarness.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +273 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (0 generated)
eseidel
7 years, 1 month ago (2013-10-24 06:54:03 UTC) #1
eseidel
I wonder if someone with actual std-library experience (newer than my last usage which was ...
7 years, 1 month ago (2013-10-24 07:08:08 UTC) #2
eseidel
Ha! My example characters look completely wrong. Will fix and then tests might actually start ...
7 years, 1 month ago (2013-10-24 07:13:21 UTC) #3
eseidel
I suspect the next step is to make the failure counting/understanding code more specific to ...
7 years, 1 month ago (2013-10-24 07:48:05 UTC) #4
behdad_google
FWIW here's my implementation for testing fribidi: https://github.com/googlei18n/fribidi-vs-unicode/blob/master/test.c
7 years, 1 month ago (2013-10-24 11:13:02 UTC) #5
eseidel
There are still some harness bugs, but when running the full suite, I currently get: ...
7 years, 1 month ago (2013-10-25 18:47:17 UTC) #6
eseidel
Latest patch: Ran 770241 tests: 320196 level failures, 123737 order failures.
7 years, 1 month ago (2013-10-25 22:45:11 UTC) #7
eseidel
So the major issue blocking landing this is me figuring out how this is expected ...
7 years, 1 month ago (2013-10-25 22:48:11 UTC) #8
Nico
In chrome land there's test data in content/test/data/ . I don't think that's usually bundled ...
7 years, 1 month ago (2013-10-25 23:06:34 UTC) #9
eseidel
https://code.google.com/p/chromium/codesearch#chromium/src/third_party/icu/source/data/unidata/ is likely where it would be if we had it. A couple problems though: ...
7 years, 1 month ago (2013-10-25 23:18:30 UTC) #10
eseidel
Nevermind, we already have this in our checkout. :) https://code.google.com/p/chromium/codesearch#chromium/src/third_party/icu/source/test/testdata/BidiTest.txt
7 years, 1 month ago (2013-10-25 23:19:37 UTC) #11
eseidel
It looks like Chrome has crazy sophisticated architecture for looking up test-paths from the test ...
7 years, 1 month ago (2013-10-25 23:28:33 UTC) #12
eseidel
Taught the harness how to skip tests with the new isolate directives (which Blink's UBA ...
7 years, 1 month ago (2013-10-27 20:09:14 UTC) #13
eseidel
PTAL. I think we can actually get this reviewed and landed now. These tests unfortunately ...
7 years, 1 month ago (2013-10-27 22:02:16 UTC) #14
abarth-chromium
Neat. https://codereview.chromium.org/39523002/diff/380001/Source/platform/text/BidiResolverTest.cpp File Source/platform/text/BidiResolverTest.cpp (right): https://codereview.chromium.org/39523002/diff/380001/Source/platform/text/BidiResolverTest.cpp#newcode74 Source/platform/text/BidiResolverTest.cpp:74: void runTest(const std::basic_string<UChar>& input, const std::vector<int>& reorder, std::basic_string<UChar> ...
7 years, 1 month ago (2013-10-28 00:26:46 UTC) #15
eseidel
On 2013/10/28 00:26:46, abarth wrote: > Neat. > > https://codereview.chromium.org/39523002/diff/380001/Source/platform/text/BidiResolverTest.cpp > File Source/platform/text/BidiResolverTest.cpp (right): > ...
7 years, 1 month ago (2013-10-28 01:08:43 UTC) #16
abarth-chromium
On 2013/10/28 01:08:43, eseidel wrote: > Tell me more! Currently webkit_support.h isn't included by any ...
7 years, 1 month ago (2013-10-28 01:33:08 UTC) #17
eseidel
I tried that, but unfortunately that depends on being part of webkit_unit_tests, which this test ...
7 years, 1 month ago (2013-10-28 04:34:46 UTC) #18
abarth-chromium
On 2013/10/28 04:34:46, eseidel wrote: > I tried that, but unfortunately that depends on being ...
7 years, 1 month ago (2013-10-28 04:54:26 UTC) #19
eseidel
If igor or levi could review the BidiResolver hooks, abarth I'm sure is happy to ...
7 years, 1 month ago (2013-10-28 04:55:36 UTC) #20
eseidel
I'm not quite sure who should review my crazy std:: c++... but anyone is welcome ...
7 years, 1 month ago (2013-10-28 04:56:33 UTC) #21
eseidel
Crap. I just found http://www.unicode.org/Public/PROGRAMS/BidiReferenceC/6.3.0/source/brtest.c I wonder if that would have worked instead of writing ...
7 years, 1 month ago (2013-10-28 05:05:08 UTC) #22
eseidel
It doesn't look like that would be a drop-in replacement (it too is rather tied ...
7 years, 1 month ago (2013-10-28 05:19:06 UTC) #23
leviw_travelin_and_unemployed
Adding jyasskin to take a look at the C++ stl kung fu. I'm really excited ...
7 years, 1 month ago (2013-10-28 21:33:10 UTC) #24
eseidel
Updated the license per levi's review. I also spoke with jyasskin briefly offline and he ...
7 years, 1 month ago (2013-10-29 00:55:14 UTC) #25
Jeffrey Yasskin
https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h File Source/platform/text/BidiTestHarness.h (right): https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h#newcode34 Source/platform/text/BidiTestHarness.h:34: #include <fstream> I don't think you use this header: ...
7 years, 1 month ago (2013-10-29 20:03:21 UTC) #26
eseidel
Thanks for the fantastic comments. Posting an update shortly. https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h File Source/platform/text/BidiTestHarness.h (right): https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h#newcode34 Source/platform/text/BidiTestHarness.h:34: ...
7 years, 1 month ago (2013-10-29 20:49:43 UTC) #27
eseidel
Updated, PTAL.
7 years, 1 month ago (2013-10-29 20:58:10 UTC) #28
Jeffrey Yasskin
lgtm https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h File Source/platform/text/BidiTestHarness.h (right): https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h#newcode228 Source/platform/text/BidiTestHarness.h:228: line = originalLine; On 2013/10/29 20:49:44, eseidel wrote: ...
7 years, 1 month ago (2013-10-29 23:16:02 UTC) #29
eseidel
On 2013/10/29 23:16:02, Jeffrey Yasskin wrote: > lgtm > > https://codereview.chromium.org/39523002/diff/770001/Source/platform/text/BidiTestHarness.h > File Source/platform/text/BidiTestHarness.h (right): ...
7 years, 1 month ago (2013-10-30 22:59:34 UTC) #30
eseidel
https://codereview.chromium.org/39523002/diff/810001/Source/platform/text/BidiTestHarness.h File Source/platform/text/BidiTestHarness.h (right): https://codereview.chromium.org/39523002/diff/810001/Source/platform/text/BidiTestHarness.h#newcode113 Source/platform/text/BidiTestHarness.h:113: size_t lastPos = str.find_first_not_of(seperators); // skip leading spaces On ...
7 years, 1 month ago (2013-10-30 23:04:10 UTC) #31
Jeffrey Yasskin
On 2013/10/30 22:59:34, eseidel wrote: > On 2013/10/29 23:16:02, Jeffrey Yasskin wrote: > > std::string ...
7 years, 1 month ago (2013-10-30 23:24:21 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/860002
7 years, 1 month ago (2013-10-30 23:29:24 UTC) #33
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-30 23:59:46 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1060001
7 years, 1 month ago (2013-10-31 00:29:00 UTC) #35
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-31 00:56:19 UTC) #36
leviw_travelin_and_unemployed
On 2013/10/31 00:56:19, I haz the power (commit-bot) wrote: > Sorry for I got bad ...
7 years, 1 month ago (2013-10-31 00:58:37 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1210001
7 years, 1 month ago (2013-10-31 03:27:56 UTC) #38
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-31 03:52:21 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1340001
7 years, 1 month ago (2013-10-31 04:04:38 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1420001
7 years, 1 month ago (2013-10-31 04:15:03 UTC) #41
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-31 05:06:17 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1550001
7 years, 1 month ago (2013-10-31 06:38:52 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1370002
7 years, 1 month ago (2013-10-31 06:41:46 UTC) #44
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-31 07:00:40 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1670001
7 years, 1 month ago (2013-10-31 07:17:04 UTC) #46
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 1 month ago (2013-10-31 08:09:43 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/eseidel@chromium.org/39523002/1740001
7 years, 1 month ago (2013-10-31 09:22:16 UTC) #48
commit-bot: I haz the power
7 years, 1 month ago (2013-10-31 10:33:14 UTC) #49
Message was sent while issue was closed.
Change committed as 161046

Powered by Google App Engine
This is Rietveld 408576698