Skip to content

Commit

Permalink
prepend cmeel stuff to LD_LIBRARY_PATH when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed May 19, 2023
1 parent c8b148c commit 34f0c89
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- prepend cmeel stuff to `LD_LIBRARY_PATH` when running tests

## [v0.43.1] - 2023-05-03

- `--cmeel-env` is now a default deactivable with `--no-cmeel-env`
Expand Down
8 changes: 7 additions & 1 deletion cmeel/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from tempfile import TemporaryDirectory
from typing import Any, Dict, List, Optional, Union

from .env import get_paths

try:
import tomllib # type: ignore
except ModuleNotFoundError:
Expand Down Expand Up @@ -95,7 +97,11 @@ def get_configure_env(self) -> Dict[str, str]:
def get_test_env(self) -> Dict[str, str]:
"""Get test environment."""
ret = self.env.copy()
ret.update(CTEST_OUTPUT_ON_FAILURE="1", CTEST_PARALLEL_LEVEL=self.test_jobs)
ret.update(
CTEST_OUTPUT_ON_FAILURE="1",
CTEST_PARALLEL_LEVEL=self.test_jobs,
LD_LIBRARY_PATH=get_paths("lib", True),
)
return ret

def _get_available_prefix(self) -> Optional[str]:
Expand Down
1 change: 1 addition & 0 deletions docs/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ This configuration step is done in the environment defined by:
1. The environment of the calling process
2. `CTEST_OUTPUT_ON_FAILURE=1`
3. `CTEST_PARALLEL_LEVEL` set to `test-jobs` global configuration, or `CMEEL_TEST_JOBS` environment variable, or 4
4. `LD_LIBRARY_PATH` prepended with found cmeel paths

### Other options in `[tool.cmeel]` section of `pyproject.toml`

Expand Down

0 comments on commit 34f0c89

Please sign in to comment.