Skip to content

Commit

Permalink
Add option to exclude tests
Browse files Browse the repository at this point in the history
  • Loading branch information
linguini-dev committed Dec 13, 2024
1 parent 437f6d9 commit 1256d8e
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 1 deletion.
63 changes: 63 additions & 0 deletions data/publiccloud/aitl/custom.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"location": "westus",
"properties": {
"jobTemplateInstance": {
"templateTags": [],
"selections": [
{
"caseName": [
"verify_connection_status",
"verify_no_error_output",
"verify_dri_node",
"verify_disk_with_fio_verify_option",
"validate_netvsc_reload",
"verify_synthetic_add_max_nics_one_by_one_after_provision",
"verify_synthetic_provision_with_max_nics_reboot_from_platform",
"verify_synthetic_provision_with_max_nics_reboot",
"verify_synthetic_add_max_nics_one_time_after_provision",
"verify_synthetic_provision_with_max_nics",
"verify_synthetic_provision_with_max_nics_stop_start_from_platform",
"verify_kdumpcrash_smp",
"verify_kdumpcrash_on_random_cpu",
"verify_kdumpcrash_on_cpu32",
"verify_reboot_in_platform",
"smoke_test",
"verify_deployment_provision_ephemeral_managed_disk",
"verify_deployment_provision_standard_ssd_disk",
"verify_stop_start_in_platform",
"verify_deployment_provision_premium_disk",
"verify_deployment_provision_synthetic_nic",
"verify_deployment_provision_sriov",
"verify_hot_add_disk_parallel",
"verify_resource_disk_io",
"verify_hot_add_disk_serial_premium_ssd",
"verify_disks_device_timeout_setting",
"verify_hot_add_disk_serial_standard_ssd",
"verify_hot_add_disk_parallel_standard_ssd",
"verify_resource_disk_mounted",
"verify_swap",
"verify_hot_add_disk_serial_random_lun_standard_ssd",
"verify_hot_add_disk_serial_random_lun_premium_ssd",
"perf_tcp_latency_synthetic",
"verify_nvme_sriov_rescind",
"verify_nvme_max_disk",
"verify_nvme_rescind",
"verify_nvme_function",
"verify_nvme_basic"
]
}
],
"region": [
"westeurope"
],
"vmSize": [],
"concurrency": 4
},
"image": {
"type": "shared_gallery",
"gallery": "<IMAGE_GALLERY_NAME>",
"definition": "<IMAGE_NAME>",
"version": "<IMAGE_VERSION>"
}
}
}
11 changes: 10 additions & 1 deletion tests/publiccloud/azure_aitl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sub run {
my $aitl_image_gallery = "test_image_gallery";
my $aitl_image_version = "latest";
my $aitl_job_name = "openqa-aitl-$job_id";
my $aitl_manifest = "shared_gallery.json";
my $aitl_manifest = "custom.json";
my $aitl_image_name = $provider->generate_azure_image_definition();

my $aitl_get_options = "-s $subscription_id -r $resource_group -n $aitl_job_name";
Expand All @@ -54,6 +54,15 @@ sub run {
assert_script_run("curl " . data_url("publiccloud/aitl/$aitl_manifest") . " -o /tmp/$aitl_manifest");
assert_script_run("sed -i -e 's/<IMAGE_NAME>/$aitl_image_name/g' -e 's/<IMAGE_VERSION>/$aitl_image_version/g' -e 's/<IMAGE_GALLERY_NAME>/$aitl_image_gallery/g' /tmp/$aitl_manifest");

# Exclude tests (if any to exclude are invoked)
# Wildcards are supported, e.g. `nvme` will disable all tests with nvme.
if (get_var('PUBLIC_CLOUD_AITL_EXCLUDE_TESTS')) {
my @excluded_tests_list = split(',', get_var('PUBLIC_CLOUD_AITL_EXCLUDE_TESTS'));
foreach my $aitl_test (@excluded_tests_list) {
assert_script_run(qq(sed -i -e "/$aitl_test/d" /tmp/$aitl_manifest));
}
}

# Create AITL Job based on a manifest
assert_script_run("python3.11 /tmp/aitl.py job create $aitl_get_options -b @/tmp/$aitl_manifest");

Expand Down

0 comments on commit 1256d8e

Please sign in to comment.