Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1085)

Unified Diff: server/site_wifitest.py

Issue 1812002: More work on wifi tests (Closed)
Patch Set: Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/site_linux_router.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/site_wifitest.py
diff --git a/server/site_wifitest.py b/server/site_wifitest.py
index 388c53993680c26c4f09bb42cf05d5bb3651095e..d8fc20411a4dfa4baa37784b1aec072f72646718 100644
--- a/server/site_wifitest.py
+++ b/server/site_wifitest.py
@@ -337,10 +337,9 @@ sys.exit(0)'''
result = self.client.run("cat '%s/%s'" %
(self.client_debugfs_path, param))
got = result.stdout.rstrip() # NB: chop \n
- if got != want:
- logging.error("client_check_%s: wanted %s got %s",
+ if got != want:
+ raise error.TestFail("client_check_%s: wanted %s got %s",
param, want, got)
- raise AssertionError
def client_check_bintval(self, params):
@@ -648,7 +647,7 @@ def __byfile(a, b):
else:
return 0
-def read_tests(dir, pat):
+def read_tests(dir, *args):
"""
Collect WiFi test tuples from files. File names are used to
sort the test objects so the convention is to name them NNN<test>
@@ -657,7 +656,7 @@ def read_tests(dir, pat):
"""
tests = []
for file in os.listdir(dir):
- if fnmatch.fnmatch(file, pat):
+ if any(fnmatch.fnmatch(file, pat) for pat in args):
fd = open(os.path.join(dir, file));
try:
test = eval(fd.read())
« no previous file with comments | « server/site_linux_router.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698