tests: add missing test cleanup (#4163)

- Changes BuildFixture so that fixtures are not built multiple times
- Add some missing calls to AddPathToRemove
This commit is contained in:
Alessandro Arzilli
2025-09-25 22:42:18 +02:00
committed by GitHub
parent fa07b65188
commit d44aa4b65a
3 changed files with 29 additions and 17 deletions

View File

@ -85,6 +85,7 @@ func stripAndCopyDebugInfo(f protest.Fixture, t *testing.T) {
if err := copyCmd.Run(); err != nil {
t.Fatal(err)
}
protest.AddPathToRemove(f.Path + ".debug")
// Strip the original binary of the debug information.
stripCmd := exec.Command("strip", "--strip-debug", "--strip-unneeded", name)