From 86f361511b08745977ffb5e1b6f54406c990d53c Mon Sep 17 00:00:00 2001 From: Tomas Tomecek Date: Apr 25 2017 10:36:34 +0000 Subject: [PATCH 1/2] readme typo fix Signed-off-by: Tomas Tomecek --- diff --git a/README.md b/README.md index 2c8ad9d..8a56ea8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ * __YAML Config file__ * Each module will need to have yaml config file * Config file should cover non generic part - part focused on general module testing - * It cloud contain also simple test + * It could contain also simple test * __how to write config file__ https://pagure.io/modularity-testing-framework/blob/master/f/docs/howtowriteyamlconf.md * __Self generated tests__ From e0c6898a53873f0fce23f9172400d93db0dfadb0 Mon Sep 17 00:00:00 2001 From: Tomas Tomecek Date: Apr 25 2017 10:36:49 +0000 Subject: [PATCH 2/2] enable skipping installation of packages this is useful when developing modules locally Fixes https://pagure.io/modularity-testing-framework/issue/39 Signed-off-by: Tomas Tomecek --- diff --git a/README.md b/README.md index 8a56ea8..9fade19 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ dnf -y install docker python-pip * __Docker based module testing:__ ```MODULE=docker avocado run /usr/share/moduleframework/tools/modulelint.py ./*.py``` * __Rpm based module testing:__ ```MODULE=rpm avocado run /usr/share/moduleframework/tools/modulelint.py ./*.py``` * `make check` - runs tests in your module directory + * If you want to skip installation of packages before running tests, define `MTF_SKIP_ARTIFACT_INSTALLATION` environment variable + * `MTF_SKIP_ARTIFACT_INSTALLATION=true avocado run ...` ## How to write tests * __minimal path creation__ diff --git a/moduleframework/module_framework.py b/moduleframework/module_framework.py index 133d88d..941c264 100644 --- a/moduleframework/module_framework.py +++ b/moduleframework/module_framework.py @@ -330,6 +330,8 @@ gpgcheck=0 f.close() def __prepareSetup(self): + if os.environ.get('MTF_SKIP_ARTIFACT_INSTALLATION'): + return try: self.runHost( "dnf -y --disablerepo=* --enablerepo=%s* --allowerasing install %s" %