Run the tests with cgo off and without the race detector (closes #538)
check / check (push) Waiting to run
check / check (push) Waiting to run
sneak ruled the race detector out (#538 (comment)), and on Linux it was the only reason the tests needed cgo. The test phase and the browser test binary now build with CGO_ENABLED=0 and without -race, so no test binary compiles mattn's C SQLite. The test phase keeps the builder stage's Debian Go image. Its comments, the README and the code comments that said the suite runs under -race now say what is true, and the README notes the exception to the vendored REPO_POLICIES.md. Model: opus-5-5
This commit is contained in:
@@ -21,8 +21,9 @@ const budget = 64
|
||||
|
||||
// batchRunes is how many consecutive code points the charge test logs
|
||||
// in one value from U+1000 up. Logging each of those on its own line
|
||||
// is too slow for the suite under the race detector; 4,096 at a time
|
||||
// is 271 batches, each logged on two lines, so 542 lines per handler.
|
||||
// was too slow for the suite when it ran under the race detector;
|
||||
// 4,096 at a time is 271 batches, each logged on two lines, so 542
|
||||
// lines per handler.
|
||||
const batchRunes = 4096
|
||||
|
||||
// newHandlers are the two handlers internal/logger can install. Time
|
||||
@@ -152,10 +153,10 @@ func TestEncodedBytes_ChargesAtLeastWhatTheHandlersEmit(t *testing.T) {
|
||||
batches = append(batches, batch.String())
|
||||
}
|
||||
|
||||
// What EncodedBytes charges for each batch. Under -race -cover this
|
||||
// takes longer than logging the batches, so it is worked out once,
|
||||
// by whichever handler finishes logging first, while the other is
|
||||
// still logging.
|
||||
// What EncodedBytes charges for each batch. When the suite ran
|
||||
// under -race -cover this took longer than logging the batches, so
|
||||
// it is worked out once, by whichever handler finishes logging
|
||||
// first, while the other is still logging.
|
||||
charged := sync.OnceValue(func() []int {
|
||||
costs := make([]int, len(batches))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user