-MIGRATION_TEST_NAMES := $(shell ./run_qemu_migrate_tests.pl DUMP_NAMES)
-MIGRATION_TEST_TARGETS := $(addprefix test_migration_,$(MIGRATION_TEST_NAMES))
-
all: test
test: test_snapshot test_ovf test_cfg_to_cmd test_pci_addr_conflicts test_qemu_img_convert test_migration test_restore_config
test_pci_addr_conflicts: run_pci_addr_checks.pl
./run_pci_addr_checks.pl
+MIGRATION_TEST_TARGETS := $(addprefix test_migration_,$(shell perl -ne 'print "$1 " if /^\s*name\s*=>\s*["'\'']([^\s"'\'']+)["'\'']\s*,\s*$/; END { print "\n" }' run_qemu_migrate_tests.pl))
+
test_migration: run_qemu_migrate_tests.pl MigrationTest/*.pm $(MIGRATION_TEST_TARGETS)
$(MIGRATION_TEST_TARGETS):
my $tests = [
# each test consists of the following:
-# name - unique name for the test which also serves as a dir name and
-# gets passed to make, so don't use whitespace or slash
+# name - unique name for the test which also serves as a dir name.
+# NOTE: gets passed to make, so don't use whitespace or slash
+# and adapt buildsys (regex) on code structure changes
# target - hostname of target node
# vmid - ID of the VM to migrate
# opts - options for the migrate() call
my $single_test_name = shift;
-if (defined($single_test_name) && $single_test_name eq 'DUMP_NAMES') {
- my $output = join(' ', map { $_->{name} } $tests->@*);
- print "$output\n";
- exit 0;
-}
-
mkdir $RUN_DIR_PATH;
foreach my $test (@{$tests}) {