all: reformat code

This commit is contained in:
Dmitry Vyukov 2020-05-08 14:02:16 +02:00
parent 2b98fdbcbc
commit f40567d255
5 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ var executorOpts = Options{
func testTarget(t *testing.T, target *prog.Target, full bool) {
seed := time.Now().UnixNano()
if os.Getenv( "CI") != "" {
if os.Getenv("CI") != "" {
seed = 0 // required for deterministic coverage reports
}
rs := rand.NewSource(seed)
@ -98,7 +98,7 @@ func testOne(t *testing.T, p *prog.Prog, opts Options) {
// Frequently lots of tests fail at the same, which produces/tmp/log
// tens of thounds of lines of output. Limit amount of output.
maxFailures := uint32(10)
if os.Getenv( "CI") != "" {
if os.Getenv("CI") != "" {
maxFailures = 1
}
if atomic.LoadUint32(&failedTests) > maxFailures {

View File

@ -38,7 +38,7 @@ func initTest(t *testing.T) (*prog.Target, rand.Source, int, bool, bool) {
iters = 10
}
seed := time.Now().UnixNano()
if os.Getenv( "CI") != "" {
if os.Getenv("CI") != "" {
seed = 0 // required for deterministic coverage reports
}
rs := rand.NewSource(seed)

View File

@ -19,7 +19,7 @@ func initTest(t *testing.T) (*rand.Rand, int) {
iters = 100
}
seed := time.Now().UnixNano()
if os.Getenv( "CI") != "" {
if os.Getenv("CI") != "" {
seed = 0 // required for deterministic coverage reports
}
rs := rand.NewSource(seed)

View File

@ -25,7 +25,7 @@ var (
func randSource(t *testing.T) rand.Source {
seed := time.Now().UnixNano()
if os.Getenv( "CI") != "" {
if os.Getenv("CI") != "" {
seed = 0 // required for deterministic coverage reports
}
t.Logf("seed=%v", seed)

View File

@ -547,7 +547,7 @@ func checkFlagSupported(target *Target, flag string) bool {
return cmd.Run() == nil
}
var runningOnCI = os.Getenv( "CI") != ""
var runningOnCI = os.Getenv("CI") != ""
// <algorithm> is included by executor, so we test is as well.
const simpleProg = `