Skip to content
Snippets Groups Projects
Commit 0ea2f9cf authored by schmittu's avatar schmittu :beer:
Browse files

another attempt

parent 083eb708
No related branches found
No related tags found
No related merge requests found
Pipeline #860 failed
......@@ -16,13 +16,13 @@ windows_tests:
tags:
- windows
script:
- tox -r -e py37
- CI_TMP=$(mktemp -d) tox -r -e py37
linux_tests:
stage: test_code
script:
- pyenv local $(latest_python 3.7)
- tox -r -e py37
- CI_TMP=$(mktemp -d) tox -r -e py37
update_docs:
......
......@@ -24,6 +24,9 @@ if get_mzmine2_home() is None or get_jre_home() is None:
else:
def init():
print("nothing to do")
HERE = _os.path.dirname(_os.path.abspath(__file__))
def _start_jvm_if_not_done_yet():
......
......@@ -9,7 +9,7 @@ from .utils import default_install_target, download, unpack
ROOT = "http://emzed.ethz.ch/downloads/"
URLS = {
"linux2": ROOT + "latest-jre-linux2.tar.gz",
"linux": ROOT + "latest-jre-linux2.tar.gz",
"darwin": ROOT + "latest-jre-darwin.tar.gz",
"win32": ROOT + "latest-jre-win32.zip",
}
......@@ -54,6 +54,7 @@ def install_jre(platform=sys.platform, target_folder=_default_jre_folder()):
def get_jre_home(folder=_default_jre_folder()):
jvm_home_path = os.path.join(folder, JVM_HOME_FILE)
print("HOME PATH", jvm_home_path)
if not os.path.exists(jvm_home_path):
return None
......@@ -65,6 +66,7 @@ def get_jre_home(folder=_default_jre_folder()):
def set_java_home(folder=_default_jre_folder()):
print("FOLDER=", folder)
path = get_jre_home(folder)
if path is None:
raise RuntimeError(f"did not find jre, did you run download_jre()?")
......
......@@ -5,12 +5,17 @@ import os
import shutil
import sys
import tarfile
import tempfile
import zipfile
import requests
tempfolder = os.environ.get("CI_TMP")
def default_install_target():
if tempfolder is not None:
return tempfolder
if sys.platform == "win32":
return os.path.join(os.environ.get("APPDATA"), "emzed.ext.mzmine2")
return os.path.join(os.path.expanduser("~"), ".emzed.ext.mzmine2")
......
......@@ -13,7 +13,7 @@ is_ci_server = os.environ.get("CI") is not None
@pytest.mark.skipif(not is_ci_server, reason="only runs on ci server")
@pytest.mark.parametrize("platform", ["linux2", "darwin", "win32"])
@pytest.mark.parametrize("platform", ["linux", "darwin", "win32"])
def test_install_jre(platform, tmpdir, regtest):
jre_folder_root = tmpdir.join(platform).strpath
install_jre(platform, jre_folder_root)
......
......@@ -2,12 +2,13 @@
envlist = py37, style, docs
[testenv]
passenv = *
commands=
pip install -r requirements_dev.txt
pip install --extra-index-url http://pypi-sissource.ethz.ch/simple/ --trusted-host pypi-sissource.ethz.ch .
python -c 'import emzed.ext.mzmine2 as e; e.init()'
pytest --cov emzed/ext/mzmine2 --cov-report term --cov-report html tests
[testenv:style]
deps=
flake8
......@@ -24,5 +25,6 @@ whitelist_externals =
commands =
pip install -r requirements_dev.txt
pip install --extra-index-url http://pypi-sissource.ethz.ch/simple/ --trusted-host pypi-sissource.ethz.ch .
python -c 'import emzed.ext.mzmine2 as e; e.init()'
make -C docs html
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment