diff --git a/.gitignore b/.gitignore index a6cfcb6..225f1db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ src/toolbox -test/system/libs/bats-assert -test/system/libs/bats-support diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6c13266 --- /dev/null +++ b/.gitmodules @@ -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 diff --git a/meson.build b/meson.build index 66104c9..b580c10 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/test/system/README.md b/test/system/README.md index d92de95..d3f3145 100644 --- a/test/system/README.md +++ b/test/system/README.md @@ -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 diff --git a/test/system/libs/bats-assert b/test/system/libs/bats-assert new file mode 160000 index 0000000..d750c5a --- /dev/null +++ b/test/system/libs/bats-assert @@ -0,0 +1 @@ +Subproject commit d750c5a1b44bf6fc96726aea76f4621db5fd602f diff --git a/test/system/libs/bats-support b/test/system/libs/bats-support new file mode 160000 index 0000000..24a72e1 --- /dev/null +++ b/test/system/libs/bats-support @@ -0,0 +1 @@ +Subproject commit 24a72e14349690bcbf7c151b9d2d1cdd32d36eb1