Add newline to each generated bash script in rbe_test.go. am: 79dcf732cc
am: b3ae45225e
am: 30010ea43f
am: 7757aa3778
am: 9ef5df8fd9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1384901 Change-Id: I24f378da6e8cebb70ebcb72c977ad94f9a8cd2e0
This commit is contained in:
commit
a7323d483d
|
@ -36,13 +36,13 @@ func TestDumpRBEMetrics(t *testing.T) {
|
|||
env: []string{
|
||||
"NOSTART_RBE=true",
|
||||
},
|
||||
}, /*{
|
||||
}, {
|
||||
description: "rbe metrics generated",
|
||||
env: []string{
|
||||
"USE_RBE=true",
|
||||
},
|
||||
generated: true,
|
||||
}*/}
|
||||
}}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.description, func(t *testing.T) {
|
||||
|
@ -91,17 +91,17 @@ func TestDumpRBEMetricsErrors(t *testing.T) {
|
|||
description: "output_dir not defined",
|
||||
bootstrapProgram: rbeBootstrapProgram,
|
||||
expectedErr: "RBE output dir variable not defined",
|
||||
}, /*{
|
||||
}, {
|
||||
description: "stopRBE failed",
|
||||
rbeOutputDirDefined: true,
|
||||
bootstrapProgram: "#!/bin/bash\nexit 1",
|
||||
bootstrapProgram: "#!/bin/bash\nexit 1\n",
|
||||
expectedErr: "shutdown failed",
|
||||
}, {
|
||||
description: "failed to copy metrics file",
|
||||
rbeOutputDirDefined: true,
|
||||
bootstrapProgram: "#!/bin/bash",
|
||||
bootstrapProgram: "#!/bin/bash\n",
|
||||
expectedErr: "failed to copy",
|
||||
}*/}
|
||||
}}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.description, func(t *testing.T) {
|
||||
|
@ -139,4 +139,4 @@ func TestDumpRBEMetricsErrors(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
var rbeBootstrapProgram = fmt.Sprintf("#!/bin/bash\necho 1 > $RBE_output_dir/%s", rbeMetricsPBFilename)
|
||||
var rbeBootstrapProgram = fmt.Sprintf("#!/bin/bash\necho 1 > $RBE_output_dir/%s\n", rbeMetricsPBFilename)
|
||||
|
|
Loading…
Reference in New Issue