diff options
author | EKR <ekr@rtfm.com> | 2016-07-29 16:52:49 +0300 |
---|---|---|
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | 2016-07-29 20:00:24 +0300 |
commit | 173bf938271e2f3c35d97af580936564ae04e13b (patch) | |
tree | ec8edb5063568466219e156cf0d991c1b7743a01 | |
parent | ccd511e499d14f03d52c1d1d9159264a15974b56 (diff) |
Accept the special token 'UNTRANSLATED_ERROR' instead of the expected error code when -loose-errors argument is used. Usable for non-bssl shims
Change-Id: I7e85a2677fe28a22103a975d517bbee900c44ac3
Reviewed-on: https://boringssl-review.googlesource.com/9050
Reviewed-by: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
-rw-r--r-- | ssl/test/runner/runner.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go index 35fe585e..c3bdc9a6 100644 --- a/ssl/test/runner/runner.go +++ b/ssl/test/runner/runner.go @@ -58,6 +58,7 @@ var ( idleTimeout = flag.Duration("idle-timeout", 15*time.Second, "The number of seconds to wait for a read or write to bssl_shim.") deterministic = flag.Bool("deterministic", false, "If true, uses a deterministic PRNG in the runner.") allowUnimplemented = flag.Bool("allow-unimplemented", false, "If true, report pass even if some tests are unimplemented.") + looseErrors = flag.Bool("loose-errors", false, "If true, allow shims to report an untranslated error code.") ) type testCert int @@ -911,7 +912,9 @@ func runTest(test *testCase, shimPath string, mallocNumToFail int64) error { } failed := err != nil || childErr != nil - correctFailure := len(test.expectedError) == 0 || strings.Contains(stderr, test.expectedError) + correctFailure := len(test.expectedError) == 0 || strings.Contains(stderr, test.expectedError) || + (*looseErrors && strings.Contains(stderr, "UNTRANSLATED_ERROR")) + localError := "none" if err != nil { localError = err.Error() |