summaryrefslogtreecommitdiffstats
path: root/src/software/test/run.py
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-02-12 15:54:14 +0100
committerMichal Minar <miminar@redhat.com>2013-02-13 20:02:50 +0100
commit46aacac8e2aabed5582f5c7da70a5acb5b679569 (patch)
tree8190c55b05f02108620732232ef5c080d5529f35 /src/software/test/run.py
parent1d60a267af3eb94f8f158b4cf8abf3cc254611a1 (diff)
downloadopenlmi-providers-46aacac8e2aabed5582f5c7da70a5acb5b679569.tar.gz
openlmi-providers-46aacac8e2aabed5582f5c7da70a5acb5b679569.tar.xz
openlmi-providers-46aacac8e2aabed5582f5c7da70a5acb5b679569.zip
initial phase of rewrite for SMASH profile
currently only a subset of Software Inventory profile is supported * listing available packages
Diffstat (limited to 'src/software/test/run.py')
-rwxr-xr-xsrc/software/test/run.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/software/test/run.py b/src/software/test/run.py
index 950b0c9..00ef304 100755
--- a/src/software/test/run.py
+++ b/src/software/test/run.py
@@ -68,6 +68,7 @@ def parse_cmd_line():
parser.add_argument("-p", "--password",
default=os.environ.get("LMI_CIMOM_PASSWORD", ''),
help="User's password.")
+
dangerous_group = parser.add_mutually_exclusive_group()
dangerous_group.add_argument("--run-dangerous", action="store_true",
default=(os.environ.get('LMI_RUN_DANGEROUS', '0') == '1'),
@@ -78,6 +79,17 @@ def parse_cmd_line():
dest="run_dangerous",
default=os.environ.get('LMI_RUN_DANGEROUS', '0') == '1',
help="Disable dangerous tests.")
+
+ tedious_group = parser.add_mutually_exclusive_group()
+ tedious_group.add_argument("--run-tedious", action="store_true",
+ default=(os.environ.get('LMI_RUN_TEDIOUS', '0') == '1'),
+ help="Run also tedious (long running) for this machine."
+ " Overrides environment variable LMI_RUN_TEDIOUS.")
+ tedious_group.add_argument('--no-tedious', action="store_false",
+ dest="run_tedious",
+ default=os.environ.get('LMI_RUN_TEDIOUS', '0') == '1',
+ help="Disable tedious tests.")
+
cache_group = parser.add_mutually_exclusive_group()
cache_group.add_argument("-c", "--use-cache", action="store_true",
default=(os.environ.get('LMI_SOFTWARE_USE_CACHE', '0') == '1'),
@@ -160,6 +172,8 @@ def prepare_environment(args):
os.environ['LMI_CIMOM_PASSWORD'] = args.password
os.environ['LMI_RUN_DANGEROUS'] = (
'1' if args.run_dangerous else '0')
+ os.environ["LMI_RUN_TEDIOUS"] = (
+ '1' if args.run_tedious else '0')
os.environ['LMI_SOFTWARE_USE_CACHE'] = '1' if args.use_cache else '0'
if args.use_cache:
os.environ['LMI_SOFTWARE_CACHE_DIR'] = CACHE_DIR
@@ -270,9 +284,12 @@ def main():
repolist = args.test_repos.split(',')
else:
repolist = []
- rpmcache.get_pkg_database(args.force_update, args.use_cache,
- CACHE_DIR, repolist=repolist)
- #rpmcache.make_pkg_database(packages
+ rpmcache.get_pkg_database(
+ args.force_update,
+ args.use_cache,
+ dangerous=args.run_dangerous,
+ cache_dir=CACHE_DIR,
+ repolist=repolist)
prepare_environment(args)
test_program = unittest.main(argv=ut_args,
testLoader=LMITestLoader(), exit=False)