public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob 81f94f700c4633f005d743903e2ea4743b3b28bd 9488 bytes (raw)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
 
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tests makefile
#
# Copyright Red Hat
# Author: David Gibson <david@gibson.dropbear.id.au>

WGET = wget -c
FLAKE8 = flake8-3
PYCODESTYLE = pycodestyle-3

DEBIAN_IMGS = debian-8.11.0-openstack-amd64.qcow2 \
	debian-9-nocloud-amd64-daily-20200210-166.qcow2 \
	debian-10-nocloud-amd64.qcow2 \
	debian-10-generic-arm64.qcow2 \
	debian-10-generic-ppc64el-20220911-1135.qcow2 \
	debian-11-nocloud-amd64.qcow2 \
	debian-11-generic-arm64.qcow2 \
	debian-11-generic-ppc64el.qcow2 \
	debian-sid-nocloud-amd64-daily.qcow2 \
	debian-sid-nocloud-arm64-daily.qcow2 \
	debian-sid-nocloud-ppc64el-daily.qcow2

FEDORA_IMGS = Fedora-Cloud-Base-26-1.5.x86_64.qcow2 \
	Fedora-Cloud-Base-27-1.6.x86_64.qcow2 \
	Fedora-Cloud-Base-28-1.1.x86_64.qcow2 \
	Fedora-Cloud-Base-28-1.1.aarch64.qcow2 \
	Fedora-Cloud-Base-29-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-29-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-30-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-30-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-31-1.9.x86_64.qcow2 \
	Fedora-Cloud-Base-31-1.9.aarch64.qcow2 \
	Fedora-Cloud-Base-32-1.6.x86_64.qcow2 \
	Fedora-Cloud-Base-32-1.6.aarch64.qcow2 \
	Fedora-Cloud-Base-33-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-33-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-34-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-34-1.2.aarch64.qcow2 \
	Fedora-Cloud-Base-35-1.2.x86_64.qcow2 \
	Fedora-Cloud-Base-35-1.2.aarch64.qcow2

OPENSUSE_IMGS = openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2 \
	openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2 \
	openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2 \
	openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz \
	openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz \
	openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2

UBUNTU_OLD_IMGS = trusty-server-cloudimg-amd64-disk1.img \
	trusty-server-cloudimg-i386-disk1.img \
	trusty-server-cloudimg-ppc64el-disk1.img
UBUNTU_NEW_IMGS = xenial-server-cloudimg-powerpc-disk1.img \
	jammy-server-cloudimg-s390x.img
UBUNTU_IMGS = $(UBUNTU_OLD_IMGS) $(UBUNTU_NEW_IMGS)

DOWNLOAD_ASSETS = exeter mbuto podman \
	$(DEBIAN_IMGS) $(FEDORA_IMGS) $(OPENSUSE_IMGS) $(UBUNTU_IMGS)
TESTDATA_ASSETS = small.bin big.bin medium.bin
LOCAL_ASSETS = mbuto.img mbuto.mem.img podman/bin/podman QEMU_EFI.fd \
	$(DEBIAN_IMGS:%=prepared-%) $(FEDORA_IMGS:%=prepared-%) \
	$(UBUNTU_NEW_IMGS:%=prepared-%) \
	nstool guest-key guest-key.pub \
	$(TESTDATA_ASSETS)

ASSETS = $(DOWNLOAD_ASSETS) $(LOCAL_ASSETS)

EXETER_SH = build/static_checkers.sh
EXETER_PY = build/build.py
EXETER_JOBS = $(EXETER_SH:%.sh=%.json) $(EXETER_PY:%.py=%.json)
AVOCADO_JOBS = $(EXETER_JOBS) avocado/static_checkers.json

TASST_SRCS = __init__.py __main__.py

EXETER_META = meta/lint.json meta/tasst.json
META_JOBS = $(EXETER_META)

PYPKGS = tasst $(EXETER_PY)

PYTHON = python3
VENV = venv
PIP = $(VENV)/bin/pip3
PYPATH = . exeter/py3
SPACE = $(subst ,, )
PYPATH_TEST = $(subst $(SPACE),:,$(PYPATH))
PYPATH_BASE = $(subst $(SPACE),:,$(PYPATH:%=test/%))
RUN_AVOCADO = cd .. && PYTHONPATH=$(PYPATH_BASE) test/$(VENV)/bin/python3 test/run_avocado

CFLAGS = -Wall -Werror -Wextra -pedantic -std=c99

assets: $(ASSETS)

.PHONY: pull-%
pull-%: %
	git -C $* pull

exeter:
	git clone https://gitlab.com/dgibson/exeter.git

mbuto:
	git clone git://mbuto.sh/mbuto

mbuto/mbuto: pull-mbuto

podman:
	git clone https://github.com/containers/podman.git

# To succesfully build podman, you will need gpgme and systemd
# development packages
podman/bin/podman: pull-podman
	$(MAKE) -C podman

guest-key guest-key.pub:
	ssh-keygen -f guest-key -N ''

mbuto.img: passt.mbuto mbuto/mbuto guest-key.pub $(TESTDATA_ASSETS)
	./mbuto/mbuto -p ./$< -c lz4 -f $@

mbuto.mem.img: passt.mem.mbuto mbuto ../passt.avx2
	./mbuto/mbuto -p ./$< -c lz4 -f $@

nstool: nstool.c
	$(CC) $(CFLAGS) -o $@ $^

QEMU_EFI.fd:
	./find-arm64-firmware.sh $@

prepared-%.qcow2: %.qcow2 ./prepare-distro-img.sh
	qemu-img create -f qcow2 -F qcow2 -b $< $@
	./prepare-distro-img.sh $@

prepared-%.img: %.img ./prepare-distro-img.sh
	qemu-img create -f qcow2 -F qcow2 -b $< $@
	./prepare-distro-img.sh $(IMGTYPE) $@

small.bin:
	dd if=/dev/urandom bs=2k count=1 of=$@

medium.bin:
	dd if=/dev/urandom bs=1k count=5 of=$@

big.bin:
	dd if=/dev/urandom bs=1M count=10 of=$@

.PHONY: venv
venv: pull-exeter
	$(PYTHON) -m venv $(VENV)
	$(PIP) install avocado-framework

%.json: %.sh pull-exeter
	cd ..; sh test/$< --avocado > test/$@

%.json: %.py pull-exeter
	cd ..; PYTHONPATH=$(PYPATH_BASE) $(PYTHON) test/$< --avocado > test/$@

meta/tasst.json: $(TASST_SRCS:%=tasst/%) $(VENV) pull-exeter
	cd ..; PYTHONPATH=$(PYPATH_BASE) $(PYTHON) -m tasst --avocado > test/$@

.PHONY: avocado
avocado: venv $(AVOCADO_JOBS)
	$(RUN_AVOCADO) all $(AVOCADO_JOBS)

.PHONY: meta
meta: venv $(META_JOBS)
	$(RUN_AVOCADO) meta $(META_JOBS)

flake8:
	$(FLAKE8) $(PYPKGS)

pycodestyle:
	$(PYCODESTYLE) $(PYPKGS)

check: assets
	./run

debug: assets
	DEBUG=1 ./run

clean:
	rm -f perf.js *~
	rm -f $(LOCAL_ASSETS)
	rm -rf test_logs
	rm -f prepared-*.qcow2 prepared-*.img
	rm -rf $(VENV) tasst/__pycache__
	rm -f $(EXETER_JOBS) $(EXETER_META)

realclean: clean
	rm -rf $(DOWNLOAD_ASSETS)

# Debian downloads
debian-8.11.0-openstack-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/OpenStack/archive/8.11.0/debian-8.11.0-openstack-$*.qcow2

debian-9-nocloud-%-daily-20200210-166.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/stretch/daily/20200210-166/debian-9-nocloud-$*-daily-20200210-166.qcow2

debian-10-nocloud-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/latest/debian-10-nocloud-$*.qcow2

debian-10-generic-ppc64el-20220911-1135.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/20220911-1135/debian-10-generic-ppc64el-20220911-1135.qcow2

debian-10-generic-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-$*.qcow2

debian-11-nocloud-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-nocloud-$*.qcow2

debian-11-generic-%.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-$*.qcow2

debian-sid-nocloud-%-daily.qcow2:
	$(WGET) -O $@ https://cloud.debian.org/images/cloud/sid/daily/latest/debian-sid-nocloud-$*-daily.qcow2

# Fedora downloads
Fedora-Cloud-Base-26-1.5.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/26/CloudImages/$*/images/Fedora-Cloud-Base-26-1.5.$*.qcow2

Fedora-Cloud-Base-27-1.6.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/27/CloudImages/$*/images/Fedora-Cloud-Base-27-1.6.$*.qcow2

Fedora-Cloud-Base-28-1.1.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/28/Cloud/$*/images/Fedora-Cloud-Base-28-1.1.$*.qcow2

Fedora-Cloud-Base-29-1.2.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/29/Cloud/$*/images/Fedora-Cloud-Base-29-1.2.$*.qcow2

Fedora-Cloud-Base-30-1.2.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Cloud/$*/images/Fedora-Cloud-Base-30-1.2.$*.qcow2

Fedora-Cloud-Base-31-1.9.%.qcow2:
	$(WGET) -O $@ http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/31/Cloud/$*/images/Fedora-Cloud-Base-31-1.9.$*.qcow2

Fedora-Cloud-Base-32-1.6.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/32/Cloud/$*/images/Fedora-Cloud-Base-32-1.6.$*.qcow2

Fedora-Cloud-Base-33-1.2.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/33/Cloud/$*/images/Fedora-Cloud-Base-33-1.2.$*.qcow2

Fedora-Cloud-Base-34-1.2.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/34/Cloud/$*/images/Fedora-Cloud-Base-34-1.2.$*.qcow2

Fedora-Cloud-Base-35-1.2.%.qcow2:
	$(WGET) -O $@ https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/35/Cloud/$*/images/Fedora-Cloud-Base-35-1.2.$*.qcow2

# OpenSuSE downloads
openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.1/jeos/openSUSE-Leap-15.1-JeOS.x86_64-kvm-and-xen.qcow2

openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.2/appliances/openSUSE-Leap-15.2-JeOS.x86_64-kvm-and-xen.qcow2

openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2

openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz:
	$(WGET) -O $@ http://download.opensuse.org/ports/aarch64/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.aarch64.raw.xz

openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz:
	$(WGET) -O $@ http://download.opensuse.org/ports/armv7hl/tumbleweed/appliances/openSUSE-Tumbleweed-ARM-JeOS-efi.armv7l.raw.xz

openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2:
	$(WGET) -O $@ https://download.opensuse.org/tumbleweed/appliances/openSUSE-Tumbleweed-JeOS.x86_64-kvm-and-xen.qcow2

# Ubuntu downloads
trusty-server-cloudimg-%-disk1.img:
	$(WGET) -O $@ https://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-$*-disk1.img

xenial-server-cloudimg-powerpc-disk1.img:
	$(WGET) -O $@ https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-powerpc-disk1.img

jammy-server-cloudimg-s390x.img:
	$(WGET) -O $@ https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-s390x.img

debug log:

solving 81f94f70 ...
found 81f94f70 in https://archives.passt.top/passt-dev/20240805123701.1720730-9-david@gibson.dropbear.id.au/
found 0b3ed3d0 in https://archives.passt.top/passt-dev/20240805123701.1720730-8-david@gibson.dropbear.id.au/
found d24fce14 in https://archives.passt.top/passt-dev/20240805123701.1720730-7-david@gibson.dropbear.id.au/
found dae25312 in https://archives.passt.top/passt-dev/20240805123701.1720730-6-david@gibson.dropbear.id.au/
found fda62984 in https://archives.passt.top/passt-dev/20240805123701.1720730-5-david@gibson.dropbear.id.au/
found 35a3b559 in https://passt.top/passt
preparing index
index prepared:
100644 35a3b559d4f2748bd031260ab24a06b728e74e62	test/Makefile

applying [1/5] https://archives.passt.top/passt-dev/20240805123701.1720730-5-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index 35a3b559..fda62984 100644


applying [2/5] https://archives.passt.top/passt-dev/20240805123701.1720730-6-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index fda62984..dae25312 100644


applying [3/5] https://archives.passt.top/passt-dev/20240805123701.1720730-7-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index dae25312..d24fce14 100644


applying [4/5] https://archives.passt.top/passt-dev/20240805123701.1720730-8-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index d24fce14..0b3ed3d0 100644


applying [5/5] https://archives.passt.top/passt-dev/20240805123701.1720730-9-david@gibson.dropbear.id.au/
diff --git a/test/Makefile b/test/Makefile
index 0b3ed3d0..81f94f70 100644

Checking patch test/Makefile...
Applied patch test/Makefile cleanly.
Checking patch test/Makefile...
Applied patch test/Makefile cleanly.
Checking patch test/Makefile...
Applied patch test/Makefile cleanly.
Checking patch test/Makefile...
Applied patch test/Makefile cleanly.
Checking patch test/Makefile...
Applied patch test/Makefile cleanly.

index at:
100644 81f94f700c4633f005d743903e2ea4743b3b28bd	test/Makefile

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).