test/system: Track bats libs as submodules & install them better

This will make it easier to work with system tests.

https://github.com/containers/toolbox/pull/842
This commit is contained in:
Ondřej Míchal 2021-07-09 14:05:26 +02:00
parent d9945a6505
commit 2594199fef
6 changed files with 31 additions and 12 deletions

2
.gitignore vendored
View file

@ -1,3 +1 @@
src/toolbox
test/system/libs/bats-assert
test/system/libs/bats-support

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "test/system/libs/bats-support"]
path = test/system/libs/bats-support
url = https://github.com/bats-core/bats-support.git
[submodule "test/system/libs/bats-assert"]
path = test/system/libs/bats-assert
url = https://github.com/bats-core/bats-assert.git

View file

@ -3,7 +3,7 @@ project(
'c',
version: '0.0.99.2',
license: 'ASL 2.0',
meson_version: '>= 0.40.0',
meson_version: '>= 0.42.0',
)
cc = meson.get_compiler('c')
@ -38,7 +38,25 @@ endif
install_subdir(
'test',
install_dir: join_paths(get_option('datadir'), meson.project_name())
install_dir: join_paths(get_option('datadir'), meson.project_name()),
exclude_files: [
'system/libs/bats-assert/.git',
'system/libs/bats-assert/.gitignore',
'system/libs/bats-assert/.travis.yml',
'system/libs/bats-assert/package.json',
'system/libs/bats-support/.git',
'system/libs/bats-support/.gitignore',
'system/libs/bats-support/.travis.yml',
'system/libs/bats-support/package.json'
],
exclude_directories: [
'system/libs/bats-assert/.git',
'system/libs/bats-assert/script',
'system/libs/bats-assert/test',
'system/libs/bats-support/.git',
'system/libs/bats-support/script',
'system/libs/bats-support/test'
]
)
subdir('data')

View file

@ -18,14 +18,9 @@ tests will clear all podman state (delete all containers, images, etc).
- `toolbox`
These tests use a few standard libraries for `bats` which help with clarity
and consistency. In order to use it you need to download them to the `libs`
directory:
```
# Go to the Toolbox root folder
$ git clone https://github.com/bats-core/bats-assert test/system/libs/bats-assert
$ git clone https://github.com/bats-core/bats-support test/system/libs/bats-support
```
and consistency. The libraries are [bats-support](https://github.com/bats-core/bats-support)
and [bats-assert](https://github.com/bats-core/bats-assert). These libraries are
provided as git submodules in the `libs` directory. Make sure both are present.
## Convention

@ -0,0 +1 @@
Subproject commit d750c5a1b44bf6fc96726aea76f4621db5fd602f

@ -0,0 +1 @@
Subproject commit 24a72e14349690bcbf7c151b9d2d1cdd32d36eb1