Merge pull request #172 from robertbaldyga/update-installer
tests: Update installer
This commit is contained in:
@@ -27,15 +27,6 @@ except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
pytest_options = {}
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def get_pytest_options(request):
|
||||
pytest_options["remote"] = request.config.getoption("--remote")
|
||||
pytest_options["branch"] = request.config.getoption("--repo-tag")
|
||||
|
||||
|
||||
def pytest_runtest_setup(item):
|
||||
# There should be dut config file added to config package and
|
||||
# pytest should be executed with option --dut-config=conf_name'.
|
||||
@@ -74,6 +65,7 @@ def pytest_runtest_setup(item):
|
||||
|
||||
TestRun.plugins['opencas'] = {
|
||||
'repo_dir': os.path.join(os.path.dirname(__file__), "../../.."),
|
||||
'working_dir': dut_config['working_dir'],
|
||||
'already_updated': False
|
||||
}
|
||||
except Exception as e:
|
||||
@@ -121,20 +113,10 @@ def pytest_addoption(parser):
|
||||
parser.addoption("--dut-config", action="store", default="None")
|
||||
parser.addoption("--log-path", action="store",
|
||||
default=f"{os.path.join(os.path.dirname(__file__), '../results')}")
|
||||
parser.addoption("--remote", action="store", default="origin")
|
||||
parser.addoption("--repo-tag", action="store", default="master")
|
||||
parser.addoption("--force-reinstall", action="store", default="False")
|
||||
# TODO: investigate whether it is possible to pass the last param as bool
|
||||
|
||||
|
||||
def get_remote():
|
||||
return pytest_options["remote"]
|
||||
|
||||
|
||||
def get_branch():
|
||||
return pytest_options["branch"]
|
||||
|
||||
|
||||
def unmount_cas_devices():
|
||||
output = TestRun.executor.run("cat /proc/mounts | grep cas")
|
||||
# If exit code is '1' but stdout is empty, there is no mounted cas devices
|
||||
|
Reference in New Issue
Block a user