diff options
-rw-r--r-- | docs/markdown/Contributing.md | 18 | ||||
-rwxr-xr-x | run_project_tests.py | 9 | ||||
-rw-r--r-- | test cases/d/3 shared library/test.json | 4 | ||||
-rw-r--r-- | test cases/d/5 mixed/test.json | 4 |
4 files changed, 23 insertions, 12 deletions
diff --git a/docs/markdown/Contributing.md b/docs/markdown/Contributing.md index 26f3512..65460d9 100644 --- a/docs/markdown/Contributing.md +++ b/docs/markdown/Contributing.md @@ -190,6 +190,7 @@ Exanple `test.json`: "installed": [ { "type": "exe", "file": "usr/bin/testexe" }, { "type": "pdb", "file": "usr/bin/testexe" }, + { "type": "shared_lib", "file": "usr/lib/z" }, ], "matrix": { "options": { @@ -233,14 +234,15 @@ actually installed file. The `type` entry specifies how the `file` path should be interpreted based on the current platform. The following values are currently supported: -| `type` | Description | -| :-----------: | -------------------------------------------------------------------------------- | -| `file` | No postprocessing, just use the provided path | -| `exe` | For executables. On Windows the `.exe` suffix is added to the path in `file` | -| `pdb` | For Windows PDB files. PDB entries are ignored on non Windows platforms | -| `implib` | For Windows import libraries. These entries are ignored on non Windows platforms | -| `implibempty` | Like `implib`, but no symbols are exported in the library | -| `expr` | `file` is an expression. This type should be avoided and removed if possible | +| `type` | Description | +| :-----------: | ------------------------------------------------------------------------------------------------------- | +| `file` | No postprocessing, just use the provided path | +| `exe` | For executables. On Windows the `.exe` suffix is added to the path in `file` | +| `shared_lib` | For shared libraries, always written as `name`. The appropriate suffix and prefix are added by platform | +| `pdb` | For Windows PDB files. PDB entries are ignored on non Windows platforms | +| `implib` | For Windows import libraries. These entries are ignored on non Windows platforms | +| `implibempty` | Like `implib`, but no symbols are exported in the library | +| `expr` | `file` is an expression. This type should be avoided and removed if possible | Except for the `file` and `expr` types, all paths should be provided *without* a suffix. diff --git a/run_project_tests.py b/run_project_tests.py index 86db599..d63dd38 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -114,6 +114,15 @@ class InstalledFile: # Handle the different types if self.typ == 'file': return p + elif self.typ == 'shared_lib': + if env.machines.host.is_windows() or env.machines.host.is_cygwin(): + return p.with_suffix('.dll') + + p = p.with_name('lib{}'.format(p.name)) + if env.machines.host.is_darwin(): + return p.with_suffix('.dylib') + else: + return p.with_suffix('.so') elif self.typ == 'exe': if env.machines.host.is_windows() or env.machines.host.is_cygwin(): return p.with_suffix('.exe') diff --git a/test cases/d/3 shared library/test.json b/test cases/d/3 shared library/test.json index 66c546b..742c576 100644 --- a/test cases/d/3 shared library/test.json +++ b/test cases/d/3 shared library/test.json @@ -1,9 +1,9 @@ { "installed": [ {"type": "exe", "file": "usr/bin/app_d"}, - {"type": "file", "platform": "msvc", "file": "usr/bin/stuff.dll"}, + {"type": "shared_lib", "platform": "msvc", "file": "usr/bin/stuff"}, + {"type": "shared_lib", "platform": "gcc", "file": "usr/lib/stuff"}, {"type": "file", "platform": "msvc", "file": "usr/lib/stuff.lib"}, - {"type": "file", "platform": "gcc", "file": "usr/lib/libstuff.so"}, {"type": "file", "file": "usr/lib/pkgconfig/test.pc"} ] } diff --git a/test cases/d/5 mixed/test.json b/test cases/d/5 mixed/test.json index a63a19b..77df4af 100644 --- a/test cases/d/5 mixed/test.json +++ b/test cases/d/5 mixed/test.json @@ -3,8 +3,8 @@ {"type": "exe", "file": "usr/bin/appdc_d"}, {"type": "exe", "file": "usr/bin/appdc_s"}, {"type": "file", "file": "usr/lib/libstuff.a"}, - {"type": "file", "platform": "gcc", "file": "usr/lib/libstuff.so"}, - {"type": "file", "platform": "msvc", "file": "usr/bin/stuff.dll"}, + {"type": "shared_lib", "platform": "gcc", "file": "usr/lib/stuff"}, + {"type": "shared_lib", "platform": "msvc", "file": "usr/bin/stuff"}, {"type": "pdb", "file": "usr/bin/stuff"}, {"type": "file", "platform": "msvc", "file": "usr/lib/stuff.lib"} ] |