176
176
def test_project_tocd3_1(self):
177
177
self.assertProjectEqual("tocd", "tocd3.1", "breezy")
179
def test_project_ubuntu_touch_custom(self):
180
self.assertProjectEqual("ubuntu-touch", "ubuntu-touch-custom", "vivid")
179
182
def test_ubuntu_dvd(self):
180
183
for series in all_series[:7]:
181
184
self.assertProjectEqual(
351
354
self.assertEqual(
352
355
["-f", "plain"], live_build_options(self.config, "i386"))
357
def test_ubuntu_base(self):
358
self.config["PROJECT"] = "ubuntu-base"
360
["-f", "plain"], live_build_options(self.config, "i386"))
354
362
def test_ubuntu_touch(self):
355
363
self.config["PROJECT"] = "ubuntu-touch"
356
364
self.assertEqual(
357
365
["-f", "plain"], live_build_options(self.config, "armhf"))
359
def test_ubuntu_pd(self):
360
self.config["PROJECT"] = "ubuntu-pd"
367
def test_ubuntu_touch_custom(self):
368
self.config["PROJECT"] = "ubuntu-touch-custom"
361
369
self.assertEqual(
362
370
["-f", "plain"], live_build_options(self.config, "armhf"))
935
943
for series in all_series[:15]:
936
944
self.assertFlavoursEqual(
937
945
"powerpc powerpc64-smp", "powerpc", "ubuntu", series)
938
for series in all_series[15:]:
946
for series in all_series[15:24]:
939
947
self.assertFlavoursEqual(
940
948
"powerpc-smp powerpc64-smp", "powerpc", "ubuntu", series)
949
for series in all_series[24:]:
950
self.assertFlavoursEqual(
951
"powerpc-smp generic", "powerpc", "ubuntu", series)
941
952
self.assertFlavoursEqual("cell", "powerpc+ps3", "ubuntu", "gutsy")
942
953
for series in all_series[7:15]:
943
954
self.assertFlavoursEqual(
991
1002
def test_desktop_items(self):
993
1004
"cloop", "squashfs", "manifest", "manifest-desktop",
994
"manifest-remove", "size", "ext2", "ext3", "ext4", "rootfs.tar.gz",
995
"custom.tar.gz", "tar.xz", "iso", "device.tar.gz",
996
"azure.device.tar.gz", "plano.device.tar.gz",
1005
"manifest-remove", "manifest-minimal-remove", "size", "ext2",
1006
"ext3", "ext4", "rootfs.tar.gz", "custom.tar.gz", "tar.xz", "iso",
1007
"device.tar.gz", "azure.device.tar.gz", "plano.device.tar.gz",
997
1008
"raspi2.device.tar.gz",
999
1010
self.assertPathsEqual(
1005
1016
"current/livecd.ubuntu-ps3.%s" % item],
1006
1017
"powerpc+ps3", item, "ubuntu", "hardy")
1019
def test_imgxz(self):
1020
for item in ("img.xz", "model-assertion"):
1021
self.assertPathsEqual(
1022
["http://kapok.buildd/~buildd/LiveCD/artful/ubuntu-core/"
1023
"current/livecd.ubuntu-core.%s" % item],
1024
"amd64", item, "ubuntu-core", "artful")
1025
self.assertPathsEqual(
1026
["http://kishi00.buildd/~buildd/LiveCD/artful/"
1027
"ubuntu-core-raspi2/current/"
1028
"livecd.ubuntu-core-raspi2.%s" % item],
1029
"armhf+raspi2", item, "ubuntu-core", "artful")
1008
1031
def test_kernel_items(self):
1009
1032
for item in ("kernel", "initrd", "bootimg"):
1010
1033
root = "http://kapok.buildd/~buildd/LiveCD/precise/kubuntu/current"
1148
1171
@mock.patch("cdimage.osextras.fetch")
1172
def test_download_live_items_diskimg(self, mock_fetch):
1173
self.config["PROJECT"] = "ubuntu-server"
1174
self.config["DIST"] = "xenial"
1175
self.config["IMAGE_TYPE"] = "daily-preinstalled"
1176
self.assertTrue(download_live_items(self.config, "armhf+raspi2",
1178
mock_fetch.assert_called_once_with(
1180
"http://kishi00.buildd/~buildd/LiveCD/xenial/ubuntu-cpc-raspi2"
1181
"/current/livecd.ubuntu-cpc.disk1.img.xz",
1183
self.temp_dir, "scratch", "ubuntu-server", "xenial",
1184
"daily-preinstalled", "live", "armhf+raspi2.disk1.img.xz"))
1186
@mock.patch("cdimage.osextras.fetch")
1187
def test_download_live_items_xzimg(self, mock_fetch):
1188
self.config["PROJECT"] = "ubuntu-core"
1189
self.config["DIST"] = "xenial"
1190
self.config["IMAGE_TYPE"] = "daily-live"
1191
self.assertTrue(download_live_items(self.config, "armhf+raspi3",
1193
mock_fetch.assert_called_once_with(
1195
"http://kishi00.buildd/~buildd/LiveCD/xenial/ubuntu-core-raspi3"
1196
"/current/livecd.ubuntu-core-raspi3.img.xz",
1198
self.temp_dir, "scratch", "ubuntu-core", "xenial",
1199
"daily-live", "live", "armhf+raspi3.img.xz"))
1201
@mock.patch("cdimage.osextras.fetch")
1149
1202
def test_download_live_items_initrd(self, mock_fetch):
1150
1203
self.config["PROJECT"] = "ubuntu"
1151
1204
self.config["DIST"] = "raring"
1267
1320
mock_fetch.assert_called_once_with(
1268
1321
self.config, url, os.path.join(target_dir, "i386.server-squashfs"))
1323
@mock.patch("cdimage.osextras.fetch")
1324
def test_download_live_items_installer_squashfs(self, mock_fetch):
1325
self.config["PROJECT"] = "ubuntu-server"
1326
self.config["SUBPROJECT"] = "live"
1327
self.config["DIST"] = "xenial"
1328
self.config["IMAGE_TYPE"] = "daily-live"
1330
download_live_items(self.config, "amd64", "installer.squashfs"))
1331
url = ("http://kapok.buildd/~buildd/LiveCD/xenial/ubuntu-server-live/"
1332
"current/livecd.ubuntu-server.installer.squashfs")
1333
target_dir = os.path.join(
1334
self.temp_dir, "scratch", "ubuntu-server", "xenial", "daily-live",
1336
mock_fetch.assert_called_once_with(
1337
self.config, url, os.path.join(target_dir,
1338
"amd64.installer.squashfs"))
1270
1340
def test_write_autorun(self):
1271
1341
self.config["PROJECT"] = "ubuntu"
1272
1342
self.config["DIST"] = "raring"
1296
1366
tail = os.path.basename(target).split(".", 1)[1]
1298
1368
"squashfs", "kernel-generic", "kernel-generic.efi.signed",
1299
"initrd-generic", "manifest", "manifest-remove", "size",
1369
"initrd-generic", "manifest", "manifest-remove",
1370
"manifest-minimal-remove", "size", "wubi.exe",