← Back to team overview

openstack team mailing list archive

Re: how to run selected tests

 

On 02/29/2012 03:42 PM, Yun Mao wrote:
Greetings,

What's the most convenient way to run a subset of the existing tests?
By default run_tests.sh tests everything. For example, I'd like to run
everything in test_scheduler plus test_notify.py, what's the best way
to do that? Thanks,

jpipes@uberbox:~/repos/nova$ ./run_tests.sh nova.tests.scheduler.test_scheduler nova.tests.notifier
No virtual environment found...create one? (Y/n) n
cleaning *.pyc files
SchedulerDriverModuleTestCase
    test_cast_to_compute_host_no_update_db                      OK  0.00
    test_cast_to_compute_host_update_db_with_instance_id        OK  0.00
    test_cast_to_compute_host_update_db_without_instance_id     OK  0.00
    test_cast_to_host_compute_topic                             OK  0.00
    test_cast_to_host_network_topic                             OK  0.00
    test_cast_to_host_unknown_topic                             OK  0.00
    test_cast_to_host_volume_topic                              OK  0.00
    test_cast_to_network_host                                   OK  0.00
    test_cast_to_volume_host_no_update_db                       OK  0.00
    test_cast_to_volume_host_update_db_with_volume_id           OK  0.00
    test_cast_to_volume_host_update_db_without_volume_id        OK  0.00
    test_encode_instance                                        OK  0.00
SchedulerManagerTestCase
    test_1_correct_init                                         OK  0.00
    test_existing_method                                        OK  0.00
    test_get_host_list                                          OK  0.00
    test_get_service_capabilities                               OK  0.00
    test_missing_method_fallback                                OK  0.00
    test_run_instance_exception_puts_instance_in_error_state    OK  0.00
    test_show_host_resources                                    OK  0.00
    test_update_service_capabilities                            OK  0.00
SchedulerTestCase
    test_block_migration_dest_check_service_lack_disk           OK  0.00
    test_create_instance_db_entry                               OK  0.00
    test_get_host_list                                          OK  0.00
    test_get_service_capabilities                               OK  0.00
    test_hosts_up                                               OK  0.00
    test_live_migration_all_checks_pass                         OK  0.00
    test_live_migration_basic                                   OK  0.00
    test_live_migration_compute_dest_not_alive                  OK  0.00
    test_live_migration_compute_src_not_alive                   OK  0.00
    test_live_migration_dest_check_service_lack_memory          OK  0.00
    test_live_migration_dest_check_service_same_host            OK  0.00
    test_live_migration_dest_host_incompatable_cpu_raises       OK  0.00
    test_live_migration_dest_hypervisor_version_older_raises    OK  0.00
    test_live_migration_different_hypervisor_type_raises        OK  0.00
    test_live_migration_different_shared_storage_raises         OK  0.00
    test_live_migration_instance_not_running                    OK  0.00
    test_live_migration_same_shared_storage_okay                OK  0.00
    test_live_migration_volume_node_not_alive                   OK  0.00
    test_update_service_capabilities                            OK  0.00
CapacityNotifierTestCase
    test_bad_event_suffix                                       OK  0.00
    test_bad_publisher_id                                       OK  0.00
    test_event_type                                             OK  0.00
    test_update_called                                          OK  0.00
NotifierListTestCase
    test_send_notifications_successfully                        OK  0.00
    test_send_notifications_with_errors                         OK  0.00
    test_when_driver_fails_to_import                            OK  0.00

----------------------------------------------------------------------
Ran 46 tests in 1.986s

OK

Best,
-jay


References