public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob d7c37d6cedcaba0e566102c6b3ae601f6f720c93 2455 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
 
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tests makefile
#
# Copyright Red Hat
# Author: David Gibson <david@gibson.dropbear.id.au>

BATS = bats -j $(shell nproc)
EXETOOL = exeter/exetool/exetool
WGET = wget -c

DOWNLOAD_ASSETS = exeter mbuto podman
TESTDATA_ASSETS = small.bin big.bin medium.bin \
	rampstream
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 $(EXETOOL) \
	$(TESTDATA_ASSETS)

ASSETS = $(DOWNLOAD_ASSETS) $(LOCAL_ASSETS)

EXETER_PYPATH = exeter/py3
EXETER_BATS = smoke/smoke.sh.bats \
	build/build.py.bats build/static_checkers.sh.bats
BATS_FILES = $(EXETER_BATS) \
	podman/test/system/505-networking-pasta.bats

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

assets: $(ASSETS)

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

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

exeter/exetool/exetool: pull-exeter

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 rampstream-check.sh $(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=$@

$(EXETER_BATS): %.bats: % $(EXETOOL)
	PYTHONPATH=$(EXETER_PYPATH) $(EXETOOL) bats -- $< > $@

bats: $(BATS_FILES) pull-podman
	PYTHONPATH=$(EXETER_PYPATH) CONTAINERS_HELPER_BINARY_DIR=.. $(BATS) $(BATS_FILES)

check: assets
	./run

debug: assets
	DEBUG=1 ./run

clean:
	rm -f perf.js *~
	rm -f $(LOCAL_ASSETS)
	rm -f $(EXETER_BATS)
	rm -rf test_logs
	rm -f prepared-*.qcow2 prepared-*.img

realclean: clean
	rm -rf $(DOWNLOAD_ASSETS)


debug log:

solving d7c37d6 ...
found d7c37d6 in https://archives.passt.top/passt-dev/20250908060921.13839-1-yuhuang@redhat.com/
found a774285 in https://passt.top/passt
preparing index
index prepared:
100644 a774285edf911caf89e94093836a07962ac02830	test/Makefile

applying [1/1] https://archives.passt.top/passt-dev/20250908060921.13839-1-yuhuang@redhat.com/
diff --git a/test/Makefile b/test/Makefile
index a774285..d7c37d6 100644

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

index at:
100644 d7c37d6cedcaba0e566102c6b3ae601f6f720c93	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).