[autotest]: Add --help to test health scripts.

Although these scripts have no interesting options, people will not be
suprised when they try to find out more and suddenly the script is bein ran.

BUG=chromium:276668
TEST=Manual testing.

Change-Id: I247c1e681a26314ffb74f1905575be4a1706deb8
Reviewed-on: https://gerrit.chromium.org/gerrit/66441
Reviewed-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
Commit-Queue: Keyar Hood <keyar@chromium.org>
Tested-by: Keyar Hood <keyar@chromium.org>
diff --git a/frontend/health/check_test_health.py b/frontend/health/check_test_health.py
index cd4def4..b1b9ab8 100755
--- a/frontend/health/check_test_health.py
+++ b/frontend/health/check_test_health.py
@@ -4,7 +4,7 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
-import logging, os, subprocess, sys
+import argparse, logging, os, subprocess, sys
 
 THIS_DIR = os.path.dirname(__file__)
 UTILS_DIR = os.path.abspath(os.path.join(THIS_DIR, os.pardir, os.pardir,
@@ -80,15 +80,27 @@
     return success
 
 
-def main():
+def parse_options(args):
+    """Parse the command line options."""
+
+    description = ('Runs test health and preparation scripts.')
+    parser = argparse.ArgumentParser(description=description)
+    parser.parse_args(args)
+
+
+def main(args=None):
     """
     The main function.
 
     This allows us to test this function by calling it in the unit test file.
 
+    @param args: The command line arguments being passed in.
+
     @return 0 if everything succeeded and a non-zero integer otherwise.
 
     """
+    args = [] if args is None else args
+    parse_options(args)
 
     logging.getLogger().setLevel(logging.INFO)
 
@@ -104,4 +116,4 @@
 
 
 if __name__ == '__main__':
-    sys.exit(main())
+    sys.exit(main(sys.argv))
diff --git a/frontend/health/complete_failures.py b/frontend/health/complete_failures.py
index 1b33de6..0382f61 100755
--- a/frontend/health/complete_failures.py
+++ b/frontend/health/complete_failures.py
@@ -5,7 +5,7 @@
 # found in the LICENSE file.
 
 
-import datetime, sys
+import argparse, datetime, sys
 
 import common
 from autotest_lib.client.common_lib import mail
@@ -140,14 +140,28 @@
     return [name for name, last_pass in tests.items() if last_pass < cutoff]
 
 
-def main():
+def parse_options(args):
+    """Parse the command line options."""
+
+    description = ('Collects information about which tests have been '
+                   'failing for a long time and creates an email summarizing '
+                   'the results.')
+    parser = argparse.ArgumentParser(description=description)
+    parser.parse_args(args)
+
+
+def main(args=None):
     """
     The script code.
 
     Allows other python code to import and run this code. This will be more
     important if a nice way to test this code can be determined.
 
+    @param args: The command line arguments being passed in.
+
     """
+    args = [] if args is None else args
+    parse_options(args)
     all_test_names = get_recently_ran_test_names()
     last_passes = utils.get_last_pass_times()
     tests = get_tests_to_analyze(all_test_names, last_passes)
@@ -155,5 +169,6 @@
     email_about_test_failure(failures, all_test_names)
 
 
+
 if __name__ == '__main__':
-    sys.exit(main())
+    sys.exit(main(sys.argv))
diff --git a/frontend/health/passing_experimental.py b/frontend/health/passing_experimental.py
index 383198a..e81c91d 100755
--- a/frontend/health/passing_experimental.py
+++ b/frontend/health/passing_experimental.py
@@ -5,7 +5,7 @@
 # found in the LICENSE file.
 
 
-import datetime, sys
+import argparse, datetime, sys
 
 import common
 from autotest_lib.client.common_lib import mail
@@ -65,14 +65,29 @@
     return recent_passes - recent_fails
 
 
-def main():
+def parse_options(args):
+    """Parse the command line options."""
+
+    description = ('Collects information about which experimental tests '
+                   'have been passing for a long time and creates an email '
+                   'summarizing the results.')
+    parser = argparse.ArgumentParser(description=description)
+    parser.parse_args(args)
+
+
+def main(args=None):
     """
     The script code.
 
     Allows other python code to import and run this code. This will be more
     important if a nice way to test this code can be determined.
 
+    @param args: The command line arguments being passed in.
+
     """
+    args = [] if args is None else args
+    parse_options(args)
+
     experimental_tests = get_experimental_tests()
     pass_times = utils.get_last_pass_times()
     fail_times = utils.get_last_fail_times()
@@ -93,4 +108,4 @@
 
 
 if __name__ == '__main__':
-    sys.exit(main())
+    sys.exit(main(sys.argv))