| OLD | NEW |
| 1 """ | 1 """ |
| 2 KVM test utility functions. | 2 KVM test utility functions. |
| 3 | 3 |
| 4 @copyright: 2008-2009 Red Hat Inc. | 4 @copyright: 2008-2009 Red Hat Inc. |
| 5 """ | 5 """ |
| 6 | 6 |
| 7 import time, string, random, socket, os, signal, re, logging, commands, cPickle | 7 import time, string, random, socket, os, signal, re, logging, commands, cPickle |
| 8 import fcntl, shelve, ConfigParser, rss_file_transfer, threading, sys, UserDict | 8 import fcntl, shelve, ConfigParser, rss_file_transfer, threading, sys, UserDict |
| 9 from autotest_lib.client.bin import utils, os_dep | 9 from autotest_lib.client.bin import utils, os_dep |
| 10 from autotest_lib.client.common_lib import error, logging_config | 10 from autotest_lib.client.common_lib import error, logging_config |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 | 1094 |
| 1095 @return: True, if all tests ran passed, False if any of them failed. | 1095 @return: True, if all tests ran passed, False if any of them failed. |
| 1096 """ | 1096 """ |
| 1097 status_dict = {} | 1097 status_dict = {} |
| 1098 failed = False | 1098 failed = False |
| 1099 | 1099 |
| 1100 for dict in test_list: | 1100 for dict in test_list: |
| 1101 if dict.get("skip") == "yes": | 1101 if dict.get("skip") == "yes": |
| 1102 continue | 1102 continue |
| 1103 dependencies_satisfied = True | 1103 dependencies_satisfied = True |
| 1104 for dep in dict.get("depend"): | 1104 for dep in dict.get("dep"): |
| 1105 for test_name in status_dict.keys(): | 1105 for test_name in status_dict.keys(): |
| 1106 if not dep in test_name: | 1106 if not dep in test_name: |
| 1107 continue | 1107 continue |
| 1108 if not status_dict[test_name]: | 1108 if not status_dict[test_name]: |
| 1109 dependencies_satisfied = False | 1109 dependencies_satisfied = False |
| 1110 break | 1110 break |
| 1111 if dependencies_satisfied: | 1111 if dependencies_satisfied: |
| 1112 test_iterations = int(dict.get("iterations", 1)) | 1112 test_iterations = int(dict.get("iterations", 1)) |
| 1113 test_tag = dict.get("shortname") | 1113 test_tag = dict.get("shortname") |
| 1114 # Setting up profilers during test execution. | 1114 # Setting up profilers during test execution. |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1716 return False | 1716 return False |
| 1717 | 1717 |
| 1718 logging.debug("Verify the mount through /etc/mtab") | 1718 logging.debug("Verify the mount through /etc/mtab") |
| 1719 if mount_string in file("/etc/mtab").read(): | 1719 if mount_string in file("/etc/mtab").read(): |
| 1720 logging.debug("%s is successfully mounted", src) | 1720 logging.debug("%s is successfully mounted", src) |
| 1721 return True | 1721 return True |
| 1722 else: | 1722 else: |
| 1723 logging.error("Can't find mounted NFS share - /etc/mtab contents \n%s", | 1723 logging.error("Can't find mounted NFS share - /etc/mtab contents \n%s", |
| 1724 file("/etc/mtab").read()) | 1724 file("/etc/mtab").read()) |
| 1725 return False | 1725 return False |
| OLD | NEW |