diff -Nru initramfs-tools-0.136ubuntu5/debian/changelog initramfs-tools-0.136ubuntu6/debian/changelog --- initramfs-tools-0.136ubuntu5/debian/changelog 2020-04-08 20:22:40.000000000 +0000 +++ initramfs-tools-0.136ubuntu6/debian/changelog 2020-04-09 07:35:46.000000000 +0000 @@ -1,3 +1,11 @@ +initramfs-tools (0.136ubuntu6) focal; urgency=medium + + * Adjust testsuite for correct expected netplan output. + * Add tests to parse netplan.yaml with netplan generate. + * Run unittests during autopkgtests. + + -- Dimitri John Ledkov Thu, 09 Apr 2020 08:35:46 +0100 + initramfs-tools (0.136ubuntu5) focal; urgency=medium * Emit empty dictionary in the ethernets section, for static vlan diff -Nru initramfs-tools-0.136ubuntu5/debian/control initramfs-tools-0.136ubuntu6/debian/control --- initramfs-tools-0.136ubuntu5/debian/control 2020-02-18 01:19:14.000000000 +0000 +++ initramfs-tools-0.136ubuntu6/debian/control 2020-04-09 07:35:46.000000000 +0000 @@ -4,7 +4,7 @@ Uploaders: Michael Prokop , Ben Hutchings Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian kernel team -Build-Depends: debhelper-compat (= 12), bash-completion, shellcheck [!i386] , pkg-config, libudev-dev +Build-Depends: debhelper-compat (= 12), bash-completion, shellcheck [!i386] , pkg-config, libudev-dev, netplan.io [!i386] Rules-Requires-Root: no Standards-Version: 4.1.5 Vcs-Browser: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/initramfs-tools/ diff -Nru initramfs-tools-0.136ubuntu5/debian/tests/control initramfs-tools-0.136ubuntu6/debian/tests/control --- initramfs-tools-0.136ubuntu5/debian/tests/control 2020-02-18 01:19:14.000000000 +0000 +++ initramfs-tools-0.136ubuntu6/debian/tests/control 2020-04-09 07:35:46.000000000 +0000 @@ -2,6 +2,10 @@ Depends: @, shellcheck Restrictions: superficial +Test-Command: ./tests/run-tests +Depends: netplan.io +Restrictions: allow-stderr + Tests: net Depends: curl, initramfs-tools, diff -Nru initramfs-tools-0.136ubuntu5/tests/test_netinfo.d/vlan/netplan/example1.1.yaml initramfs-tools-0.136ubuntu6/tests/test_netinfo.d/vlan/netplan/example1.1.yaml --- initramfs-tools-0.136ubuntu5/tests/test_netinfo.d/vlan/netplan/example1.1.yaml 2020-02-14 14:29:00.000000000 +0000 +++ initramfs-tools-0.136ubuntu6/tests/test_netinfo.d/vlan/netplan/example1.1.yaml 2020-04-09 07:35:34.000000000 +0000 @@ -3,6 +3,7 @@ renderer: networkd ethernets: example1: + {} vlans: example1.1: id: 1 diff -Nru initramfs-tools-0.136ubuntu5/tests/test_netinfo.sh initramfs-tools-0.136ubuntu6/tests/test_netinfo.sh --- initramfs-tools-0.136ubuntu5/tests/test_netinfo.sh 2020-02-14 14:29:00.000000000 +0000 +++ initramfs-tools-0.136ubuntu6/tests/test_netinfo.sh 2020-04-09 07:35:46.000000000 +0000 @@ -64,6 +64,26 @@ pass_on_nodiff "$tname" "$expected_d" "$found_d" } +run_netplan_generate() { + local bname="$1" testdir="$2" results_d="$3" + local tname="$bname-netplan-generate" + shift 3 + local expected_d="$testdir/netplan" + [ -d "$expected_d" ] || return $RET_SKIP + type netplan >/dev/null 2>/dev/null || return $RET_SKIP + + mkdir -p $results_d/lib/ + cp -r $expected_d $results_d/lib + netplan generate --root-dir $results_d + r=$? + if [ $r -eq 0 ]; then + logpass "$tname" + else + logfail "$tname: netplan generate failed" + return $RET_FAIL + fi +} + record() { local ret="$1" case "$ret" in @@ -88,6 +108,9 @@ run_netinfo_to_netplan "$dname" "$testdir" "$results_d" $confs record $? + run_netplan_generate "$dname" "$testdir" "$results_d" $confs + record $? + rm -Rf "${results_d}" done