diff options
| author | Maciej Kisielewski <maciej.kisielewski@canonical.com> | 2014-10-17 12:37:09 +0200 |
|---|---|---|
| committer | Maciej Kisielewski <maciej.kisielewski@canonical.com> | 2014-10-17 12:37:09 +0200 |
| commit | 2b94df1c9858b8085563f5351e2dc493ec6b0c09 (patch) | |
| tree | 780d194c49021cc82ee39d2fcffcca457c44a238 /bin | |
| parent | 27791f0b0c8f5bd0ce23ae1ffe2c2b6fbcc6e29a (diff) | |
provider:checkbox: quit earlier when no eligible disk are found
This patch makes removable_storage_test quit eariler when no disks are eligible to run the test. Fixes: https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1382346 Signed-off-by: Maciej Kisielewski <maciej.kisielewski@canonical.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/removable_storage_test | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/removable_storage_test b/bin/removable_storage_test index 97734de..e186959 100755 --- a/bin/removable_storage_test +++ b/bin/removable_storage_test @@ -524,6 +524,11 @@ def main(): if not args.min_speed or int(test.rem_disks_speed[disk]) >= int(args.min_speed)} + if len(disks_eligible) == 0: + logging.error( + "No %s disks with speed higher than %s bits/s", + args.device, args.min_speed) + return 1 write_sizes = [] test_files = {} disks_freespace = {} @@ -638,12 +643,6 @@ def main(): "Completed %s test iterations, but there were" " errors", args.count) return 1 - elif len(disks_eligible) == 0: - logging.error( - "No %s disks with speed higher than %s bits/s", - args.device, args.min_speed) - return 1 - else: # LP: 1313581 if (args.driver == 'xhci_hcd'): |
