-
Notifications
You must be signed in to change notification settings - Fork 5
Testing
The libvsmbr package comes with automated tests, which are stored in the sub directory: tests.
To run the automated tests:
make check
To run the automated tests on MSYS2 make sure to turn off LF to CRLF conversion. This will break the autotest scripts.
git config --global core.autocrlf false
The following arguments can be used with make check:
-
SKIP_LIBRARY_TESTS=1to skip all the library tests; -
SKIP_PYTHON_TESTS=1to skip all the Python module tests; -
SKIP_TOOLS_TESTS=1to skip all the tools tests; -
SKIP_TOOLS_END_TO_END_TESTS=1to skip the tools end-to-end tests; -
VERBOSE=1for verbose output.
To run the automated tests on Windows:
.\runtests.ps1
The tests use different test profiles:
- libvsmbr
- pyvsmbr
- vsmbrinfo
These test profiles are used by one or more tests. By default the tests run all the test sets, if applicable. Each test profile can define:
- which test sets to ignore in the ignore-file;
- which options to apply in the options-file;
- which files to include of a specific test set in the glob-file or test-set-files-file.
The glob-file is a file named "glob". The glob-file of the libvsmbr test profile would be:
tests/input/.libvsmbr/glob
The glob-file consists on one line containing the glob to apply, e.g.
*.txt
The ignore-file is a file named "ignore". The ignore-file of the libvsmbr test profile would be:
tests/input/.libvsmbr/ignore
Every line of the ignore-file specifies (the sub directory name of) the test set that should be ignored, e.g. for the "basic" test set:
basic
Some of the tests store data in the test profile to be used for comparison in successive test runs. At the moment this data needs to be cleaned out manual if it causes the test to fail due to legitimate changes.
The options-file is a file named "options". The options-file of the libvsmbr test profile would be:
tests/input/.libvsmbr/options
The options-file consists on one line containing the options to apply.
The test-set-files-file is a file named "files" in the sub directory with the name of the test set. The test-set-files-file of the "basic" test set in the libvsmbr test profile would be:
tests/input/.libvsmbr/basic/files
Every line of the files-file specifies the filename in the test set to include in the test. Files not defined in the files-file are ignored by the test.
E.g. if the "basic" test set sub directory contains the files:
image1.raw
image2.raw
and only the first file needs to be tested, the files-file can then be defined as:
image1.raw
Note that the test-set-files-file overrules the glob-file.
Note that no test files are provided by the project.
If you have your own test files the automated tests expect the files to be stored in sub directories of:
tests/input/
Every sub directory is considered a test set, e.g. the basic test set would be the directory:
tests/input/basic