1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-08 17:51:57 +00:00

courier: Skip test if test/util/exitcode is not found

When building the Debian package, the tests are run in such a way that
test/util/exitcode is not found, which causes them to fail.

This patch is a workaround which skips the test if test/util/exitcode is
not found; for now we should consider it temporary, until either the
Debian packaging is fixed, or we decide that its environment is
reasonably enough to make it permanent.
:
This commit is contained in:
Alberto Bertogli
2016-11-20 18:30:30 +00:00
parent db130639c2
commit 249831064f

View File

@@ -66,6 +66,13 @@ func TestProcmailBadCommandLine(t *testing.T) {
// Test that local delivery failures are considered permanent or not
// according to the exit code.
func TestExitCode(t *testing.T) {
// TODO: This can happen when building under unusual circumstances, such
// as Debian package building. Are they reasonable enough for us to keep
// this?
if _, err := os.Stat("../../test/util/exitcode"); os.IsNotExist(err) {
t.Skipf("util/exitcode not found, running from outside repo?")
}
cases := []struct {
cmd string
args []string