autopkgtest
Your friendly package test runner
Martin Pitt <martin.pitt@ubuntu.com>
July 23, 2014
Metadata for Debian packages
debian/tests/rev:
#!/bin/sh -e
RES=$(echo Hello | rev)
if [ "$RES" != "olleH" ]; then
echo "rev broken: got $RES" >&2; exit 1
fi
debian/tests/control:
Tests: rev
Depends: coreutils
# check that root has a password
Test-Command: grep -q ^root /etc/shadow
Restrictions: needs-root
Metadata for Click packages
manifest:
"x-test": {
"smoke": {
"path": "debian/tests/smoke",
"depends": ["coreutils"]
},
"rootpw": {
"command": "grep -q ^root /etc/shadow",
"restrictions": ["needs-root"]
}
}
Autopilot click testing
"x-test": {
"ap": {
"autopilot_module": "calendar_tests",
"depends": ["python3-dateutil", "python3-tz"]
}
}
Autopilot even simpler
"x-test": {
"autopilot": "calendar_tests"
}
Testbeds
Supported runners:
• QEMU
• LXC
• schroot
• null
• ssh (current setup scripts: adb, nova)
Running tests: Debian
$ adt-run systemd --- qemu adt-utopic-amd64.img
[... installing deps ...]
adt-run [11:31:04]: test timedated: - - - - results - - - -
timedated PASS
[... installing deps ...]
adt-run [11:33:43]: test api: [-----------------------
loginmonitor build: OK
loginmonitor run: OK
adt-run [11:33:44]: test api: -----------------------]
adt-run [11:33:45]: test api: - - - - results - - - -
api PASS
$ adt-run systemd_208-0ubuntu1.dsc --- schroot utopic
$ adt-run -B src/systemd/ --- lxc -es adt-utopic
Running tests: Click
bzr checkout --lightweight lp:ubuntu-calculator-app
adt-run ubuntu-calculator-app/ --click com.ubuntu.calculator ---
ssh -s adb
adt-run ubuntu-calculator-app/ calculator_1.3.297_all.click ---
ssh -s adb
Running tests: Click
adt-run ubuntu-calculator-app/ calculator_1.3.297_all.click
--setup-commands ubuntu-touch-session --- lxc -es adt-utopic
Questions?
IRC: pitti on Freenode, #ubuntu-quality
martin.pitt@ubuntu.com
http://lists.alioth.debian.org/mailman/listinfo/
autopkgtest-devel

autopkgtest lightning talk

  • 1.
    autopkgtest Your friendly packagetest runner Martin Pitt <martin.pitt@ubuntu.com> July 23, 2014
  • 2.
    Metadata for Debianpackages debian/tests/rev: #!/bin/sh -e RES=$(echo Hello | rev) if [ "$RES" != "olleH" ]; then echo "rev broken: got $RES" >&2; exit 1 fi debian/tests/control: Tests: rev Depends: coreutils # check that root has a password Test-Command: grep -q ^root /etc/shadow Restrictions: needs-root
  • 3.
    Metadata for Clickpackages manifest: "x-test": { "smoke": { "path": "debian/tests/smoke", "depends": ["coreutils"] }, "rootpw": { "command": "grep -q ^root /etc/shadow", "restrictions": ["needs-root"] } }
  • 4.
    Autopilot click testing "x-test":{ "ap": { "autopilot_module": "calendar_tests", "depends": ["python3-dateutil", "python3-tz"] } }
  • 5.
    Autopilot even simpler "x-test":{ "autopilot": "calendar_tests" }
  • 6.
    Testbeds Supported runners: • QEMU •LXC • schroot • null • ssh (current setup scripts: adb, nova)
  • 7.
    Running tests: Debian $adt-run systemd --- qemu adt-utopic-amd64.img [... installing deps ...] adt-run [11:31:04]: test timedated: - - - - results - - - - timedated PASS [... installing deps ...] adt-run [11:33:43]: test api: [----------------------- loginmonitor build: OK loginmonitor run: OK adt-run [11:33:44]: test api: -----------------------] adt-run [11:33:45]: test api: - - - - results - - - - api PASS
  • 8.
    $ adt-run systemd_208-0ubuntu1.dsc--- schroot utopic $ adt-run -B src/systemd/ --- lxc -es adt-utopic
  • 9.
    Running tests: Click bzrcheckout --lightweight lp:ubuntu-calculator-app adt-run ubuntu-calculator-app/ --click com.ubuntu.calculator --- ssh -s adb adt-run ubuntu-calculator-app/ calculator_1.3.297_all.click --- ssh -s adb
  • 10.
    Running tests: Click adt-runubuntu-calculator-app/ calculator_1.3.297_all.click --setup-commands ubuntu-touch-session --- lxc -es adt-utopic
  • 11.
    Questions? IRC: pitti onFreenode, #ubuntu-quality martin.pitt@ubuntu.com http://lists.alioth.debian.org/mailman/listinfo/ autopkgtest-devel