Add newline to each generated bash script in rbe_test.go.
"exec format error" showed up on Mac when running the rbe_test.go. The generated bash scripts did not have a newline at the end of the file. Bug: b/162600461 Fixes: b/162600461 Test: "m blueprint_tools" on Android Mac builder. Change-Id: I425fa5f428733b6569c3fcdaa312023f9761d020
This commit is contained in:
parent
6aed6a385e
commit
79dcf732cc
|
@ -36,13 +36,13 @@ func TestDumpRBEMetrics(t *testing.T) {
|
||||||
env: []string{
|
env: []string{
|
||||||
"NOSTART_RBE=true",
|
"NOSTART_RBE=true",
|
||||||
},
|
},
|
||||||
}, /*{
|
}, {
|
||||||
description: "rbe metrics generated",
|
description: "rbe metrics generated",
|
||||||
env: []string{
|
env: []string{
|
||||||
"USE_RBE=true",
|
"USE_RBE=true",
|
||||||
},
|
},
|
||||||
generated: true,
|
generated: true,
|
||||||
}*/}
|
}}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.description, func(t *testing.T) {
|
t.Run(tt.description, func(t *testing.T) {
|
||||||
|
@ -91,17 +91,17 @@ func TestDumpRBEMetricsErrors(t *testing.T) {
|
||||||
description: "output_dir not defined",
|
description: "output_dir not defined",
|
||||||
bootstrapProgram: rbeBootstrapProgram,
|
bootstrapProgram: rbeBootstrapProgram,
|
||||||
expectedErr: "RBE output dir variable not defined",
|
expectedErr: "RBE output dir variable not defined",
|
||||||
}, /*{
|
}, {
|
||||||
description: "stopRBE failed",
|
description: "stopRBE failed",
|
||||||
rbeOutputDirDefined: true,
|
rbeOutputDirDefined: true,
|
||||||
bootstrapProgram: "#!/bin/bash\nexit 1",
|
bootstrapProgram: "#!/bin/bash\nexit 1\n",
|
||||||
expectedErr: "shutdown failed",
|
expectedErr: "shutdown failed",
|
||||||
}, {
|
}, {
|
||||||
description: "failed to copy metrics file",
|
description: "failed to copy metrics file",
|
||||||
rbeOutputDirDefined: true,
|
rbeOutputDirDefined: true,
|
||||||
bootstrapProgram: "#!/bin/bash",
|
bootstrapProgram: "#!/bin/bash\n",
|
||||||
expectedErr: "failed to copy",
|
expectedErr: "failed to copy",
|
||||||
}*/}
|
}}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.description, func(t *testing.T) {
|
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