summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2020-02-26 15:45:39 +0100
committerMichael Vogt <mvo@ubuntu.com>2020-03-10 17:31:34 +0100
commit9016680bc8c91c572063ff92573e98407ced95b9 (patch)
tree0173dc16d637f227e415fd6abc230a95f11ca744
parent1ec5b9d0eb290e227e3398b42814616f0b44a288 (diff)
travis.yml: run unit tests on arm64 as welltravis-arm64
Use the new travis feature to run unit tests on arm64. This would have caught the segfault in the rawstocketstopper code. This also fixes two issues in usersession tests that fail often in arm. One is the timeout of TestAgentTimeout that is not high enough for slow arm systems for the "regular" case that should not hit this timeout. And then there is a "sleep 99999" in the mock for kdialog which will cause travis to wait forever for this process to exit.
-rw-r--r--.travis.yml23
-rw-r--r--usersession/client/client_test.go2
-rw-r--r--usersession/userd/ui/kdialog_test.go2
3 files changed, 25 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index d546c6a545..a8902d6761 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,6 +17,29 @@ matrix:
- set -e
- ./run-checks --static
- ./run-checks --short-unit
+ # slightly sad that the arm64 section duplicates most of the amd64
+ # section above. But it looks like doing "arch: [amd64, arm64]"
+ # does not work for some reason so this duplication is necessary.
+ - stage: quick
+ name: ARM64 unit tests
+ os: linux
+ arch: arm64
+ dist: xenial
+ # go1.10 here because that is what we use to build arm64 snaps/debs
+ go: "1.10.x"
+ before_install:
+ # no "deb-src" entries in the lxd arm64 container so we need to add
+ # it here
+ - echo "deb-src http://ports.ubuntu.com/ubuntu-ports xenial-updates main" | sudo tee -a /etc/apt/sources.list
+ - sudo apt --quiet -o Dpkg::Progress-Fancy=false update
+ install:
+ - sudo apt --quiet -o Dpkg::Progress-Fancy=false build-dep snapd
+ - ./get-deps.sh
+ script:
+ - set -e
+ - ./run-checks --static
+ - ./run-checks --short-unit
+
- stage: quick
go: "1.10.x"
name: OSX build and minimal runtime sanity check
diff --git a/usersession/client/client_test.go b/usersession/client/client_test.go
index da4401c78d..db5ae43136 100644
--- a/usersession/client/client_test.go
+++ b/usersession/client/client_test.go
@@ -120,7 +120,7 @@ func (s *clientSuite) TestAgentTimeout(c *C) {
}`))
})
- ctx, cancel := context.WithTimeout(context.Background(), 20*time.Millisecond)
+ ctx, cancel := context.WithTimeout(context.Background(), 80*time.Millisecond)
defer cancel()
si, err := s.cli.SessionInfo(ctx)
diff --git a/usersession/userd/ui/kdialog_test.go b/usersession/userd/ui/kdialog_test.go
index e3f17a3ce9..610fafa339 100644
--- a/usersession/userd/ui/kdialog_test.go
+++ b/usersession/userd/ui/kdialog_test.go
@@ -69,7 +69,7 @@ func (s *kdialogSuite) TestYesNoSimpleFooter(c *C) {
}
func (s *kdialogSuite) TestYesNoSimpleTimeout(c *C) {
- mock := testutil.MockCommand(c, "kdialog", "sleep 9999999")
+ mock := testutil.MockCommand(c, "kdialog", "sleep 30")
defer mock.Restore()
z := &ui.KDialog{}