This folder contains a set of tests for the llvm.sh
installation script. These tests ensure that the script works on the different Linux distributions and versions.
Steps to run the tests on a Linux machine:
- Install docker
- run
git submodule init; git submodule update
as the tests depend on a bash test framework BATS. - Run
test.sh
. This will create a logfile attest.log
test.sh
will generate a test suite in the file test.bats
and then use BATSto execute the test suite. BATS is a test framework for bash scripts.
The test suite consists of one test case for every supported Linux distribution version and llvm version. Right now there are 24 test cases. Each test case consists of these steps:
- Create docker container with default distro image
- Install a selection of llvm tools in the docker container
- Compile and run a small C++ project
A test case succeeds iff the docker container can be built successfully and the installed clang tools work.