mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
T7606: Split VPP test for smoketest
Exclude VPP tests from the general tests Add the PHONY no-interfaces-no-vpp Add the PHONE testcvpp (load VPP config only)
This commit is contained in:
parent
3e5696d501
commit
1aceb0371c
10
Makefile
10
Makefile
@ -28,6 +28,11 @@ test: checkiso
|
||||
test-no-interfaces: checkiso
|
||||
scripts/check-qemu-install --debug --configd --smoketest --uefi --no-interfaces --cpu 4 --memory 8 build/live-image-amd64.hybrid.iso
|
||||
|
||||
.PHONY: test-no-interfaces-no-vpp
|
||||
.ONESHELL:
|
||||
test-no-interfaces-no-vpp: checkiso
|
||||
scripts/check-qemu-install --debug --configd --smoketest --uefi --no-interfaces --no-vpp build/live-image-amd64.hybrid.iso
|
||||
|
||||
.PHONY: test-interfaces
|
||||
.ONESHELL:
|
||||
test-interfaces: checkiso
|
||||
@ -43,6 +48,11 @@ test-vpp: checkiso
|
||||
testc: checkiso
|
||||
scripts/check-qemu-install --debug --configd --cpu 2 --memory 7 --configtest build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
.PHONY: testcvpp
|
||||
.ONESHELL:
|
||||
testcvpp: checkiso
|
||||
scripts/check-qemu-install --debug --configd --match="vpp" --cpu 4 --memory 8 --configtest build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
.PHONY: testraid
|
||||
.ONESHELL:
|
||||
testraid: checkiso
|
||||
|
||||
@ -99,6 +99,8 @@ parser.add_argument('--cpu', help='Set QEMU CPU', type=int, default=2)
|
||||
parser.add_argument('--memory', help='Set QEMU memory', type=int, default=4)
|
||||
parser.add_argument('--vyconf', help='Execute testsuite with vyconfd', action='store_true',
|
||||
default=False)
|
||||
parser.add_argument('--no-vpp', help='Execute testsuite without VPP tests',
|
||||
action='store_true', default=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@ -806,6 +808,10 @@ try:
|
||||
# remove interface tests as they consume a lot of time
|
||||
c.sendline('sudo rm -f /usr/libexec/vyos/tests/smoke/cli/test_interfaces_*')
|
||||
c.expect(op_mode_prompt)
|
||||
if args.no_vpp:
|
||||
# remove VPP tests
|
||||
c.sendline('sudo rm -f /usr/libexec/vyos/tests/smoke/cli/test_vpp*')
|
||||
c.expect(op_mode_prompt)
|
||||
|
||||
if args.vyconf:
|
||||
c.sendline('sudo /usr/libexec/vyos/set_vyconf_backend.py --no-prompt &> /dev/null')
|
||||
@ -837,6 +843,14 @@ try:
|
||||
|
||||
# else, run configtest suite
|
||||
elif args.configtest:
|
||||
if args.match:
|
||||
# Remove config-tests that we don't want to run
|
||||
match_str = '-o '.join([f'-name "{name}"' for name in args.match.split("|")])
|
||||
c.sendline(f'sudo find /usr/libexec/vyos/tests/config -mindepth 1 -maxdepth 1 ! \( {match_str} \) -exec rm -rf {{}} +')
|
||||
c.expect(op_mode_prompt)
|
||||
c.sendline(f'sudo find /usr/libexec/vyos/tests/config-tests -mindepth 1 -maxdepth 1 ! \( {match_str} \) -exec rm -rf {{}} +')
|
||||
c.expect(op_mode_prompt)
|
||||
|
||||
log.info('Adding a legacy WireGuard default keypair for migrations')
|
||||
c.sendline('sudo mkdir -p /config/auth/wireguard/default')
|
||||
c.expect(op_mode_prompt)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user