snap/squashsh: skip TestBuildDate on Debian
authorZygmunt Krynicki <me@zygoon.pl>
Mon, 21 Jan 2019 15:54:44 +0000 (16:54 +0100)
committerMichael Hudson-Doyle <mwhudson@debian.org>
Thu, 24 Jan 2019 03:11:17 +0000 (03:11 +0000)
On Debian the reported build date of a squashfs file is about two days
back from what the test expected.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Gbp-Pq: Name 0008-snap-squashsh-skip-TestBuildDate-on-Debian.patch

snap/squashfs/squashfs_test.go

index 61613e7a04bed64c5ac150401d6a8ada365f08ce..70f52c2344fce43ae5351ed4edaf1c27d601766f 100644 (file)
@@ -35,6 +35,7 @@ import (
 
        "github.com/snapcore/snapd/dirs"
        "github.com/snapcore/snapd/osutil"
+       "github.com/snapcore/snapd/release"
        "github.com/snapcore/snapd/snap/snapdir"
        "github.com/snapcore/snapd/snap/squashfs"
        "github.com/snapcore/snapd/testutil"
@@ -590,6 +591,10 @@ func (s *SquashfsTestSuite) TestUnsquashfsStderrWriter(c *C) {
 }
 
 func (s *SquashfsTestSuite) TestBuildDate(c *C) {
+       if release.ReleaseInfo.ID == "debian" {
+               c.Skip("on Debian the reported build time was (presumably) that of source files")
+       }
+
        // make a directory
        d := c.MkDir()
        // set its time waaay back