From aced88eaa68c92ada983358c5f5d432fd203b337 Mon Sep 17 00:00:00 2001 From: Karenism Date: Wed, 5 Mar 2014 10:16:22 -0800 Subject: [PATCH 1/3] Added optional filedir command line argument. If it is passed, it will iterate through the directory to find Huxley files on which to execute. --- huxley/cmdline.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/huxley/cmdline.py b/huxley/cmdline.py index 7c1765e..eda2fd7 100644 --- a/huxley/cmdline.py +++ b/huxley/cmdline.py @@ -16,6 +16,7 @@ import glob import json import os +import fnmatch import sys import threading @@ -117,6 +118,13 @@ def run_test(record, playback_only, save_diff, new_screenshots, file, config, te 'flag', 'e' ), + filedir=plac.Annotation( + 'Specify a directory for test files to use', + 'option', + 'd', + str, + metavar="DIR" + ), version=plac.Annotation( 'Get the current version', 'flag', @@ -130,13 +138,21 @@ def _main( playback_only=False, concurrency=1, save_diff=False, - version=False + version=False, + filedir=None ): if version: print 'Huxley ' + __version__ return ExitCodes.OK - testfiles = glob.glob(testfile) + matches = [] + if filedir is not None: + for root, dirnames, filenames in os.walk(filedir): + for filename in fnmatch.filter(filenames, testfile): + matches.append(os.path.join(root, filename)) + testfiles= matches + else: + testfiles = glob.glob(testfile) if len(testfiles) == 0: print 'no Huxleyfile found' return ExitCodes.ERROR From d406909c49aa3df9d91ed84295080cf883467d19 Mon Sep 17 00:00:00 2001 From: Karenism Date: Wed, 5 Mar 2014 13:43:38 -0800 Subject: [PATCH 2/3] bump minor version --- huxley/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/huxley/version.py b/huxley/version.py index 27b80c5..c90ef4a 100644 --- a/huxley/version.py +++ b/huxley/version.py @@ -1,4 +1,4 @@ -# Copyright (c) 2013 Facebook +i# Copyright (c) 2013 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = '0.5' +__version__ = '0.5.1' From f654be51b6a2618135f722f4440c7b862d488271 Mon Sep 17 00:00:00 2001 From: Karenism Date: Wed, 5 Mar 2014 13:45:54 -0800 Subject: [PATCH 3/3] typo --- huxley/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/huxley/version.py b/huxley/version.py index c90ef4a..3c18ba1 100644 --- a/huxley/version.py +++ b/huxley/version.py @@ -1,4 +1,4 @@ -i# Copyright (c) 2013 Facebook +# Copyright (c) 2013 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.