Commit 84a79245 authored by Tobias Wölfel's avatar Tobias Wölfel
Browse files

Allow path entries relative to model config file

Use the `config.ini` directory to build a valid path if the entry is not
already a valid path.
Valid paths check before are absolute path and path relative to the
current working directory.

This allows the user to specify relative paths to the config file.
A use case for this would be to run the tests at a different location
from where the model is located. And also if the models location is not
known at the time when the config file is created.

The config directory is passed to the plugin so the functionality can be
reused and relative paths are also valid options there.

This patch will allow the following scenario:

File structure of a model plugin:
```
/storage/path/
  |
  config.ini
  model
    |
    model.py
    model_isa.yaml
    model_platform.yaml
```

Content of config.ini:
```
DUTPlugin=model

[model]
ispec=model/model_isa.yaml
pspec=model/model_platform.yaml
```

And an invocation of riscof:
```
$ cd /runtime/path
$ riscof run --config /storage/path/config.ini
```
parent 02200d09
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment