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:
parent
d9945a6505
commit
2594199fef
6 changed files with 31 additions and 12 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,3 +1 @@
|
||||||
src/toolbox
|
src/toolbox
|
||||||
test/system/libs/bats-assert
|
|
||||||
test/system/libs/bats-support
|
|
||||||
|
|
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal 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
|
22
meson.build
22
meson.build
|
@ -3,7 +3,7 @@ project(
|
||||||
'c',
|
'c',
|
||||||
version: '0.0.99.2',
|
version: '0.0.99.2',
|
||||||
license: 'ASL 2.0',
|
license: 'ASL 2.0',
|
||||||
meson_version: '>= 0.40.0',
|
meson_version: '>= 0.42.0',
|
||||||
)
|
)
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
@ -38,7 +38,25 @@ endif
|
||||||
|
|
||||||
install_subdir(
|
install_subdir(
|
||||||
'test',
|
'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')
|
subdir('data')
|
||||||
|
|
|
@ -18,14 +18,9 @@ tests will clear all podman state (delete all containers, images, etc).
|
||||||
- `toolbox`
|
- `toolbox`
|
||||||
|
|
||||||
These tests use a few standard libraries for `bats` which help with clarity
|
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`
|
and consistency. The libraries are [bats-support](https://github.com/bats-core/bats-support)
|
||||||
directory:
|
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.
|
||||||
```
|
|
||||||
# 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
|
|
||||||
```
|
|
||||||
|
|
||||||
## Convention
|
## Convention
|
||||||
|
|
||||||
|
|
1
test/system/libs/bats-assert
Submodule
1
test/system/libs/bats-assert
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit d750c5a1b44bf6fc96726aea76f4621db5fd602f
|
1
test/system/libs/bats-support
Submodule
1
test/system/libs/bats-support
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit 24a72e14349690bcbf7c151b9d2d1cdd32d36eb1
|
Loading…
Reference in a new issue