Test system for %YDBAIM based on M-Unit
Tests use M-Unit (https://github.com/ChristopherEdwards/M-Unit). All
tests are in the tests/
directory. The test runner is tests/test.sh
,
and the actual tests are in:
-
tests/munit-tests/_YDBAIMSAN.m
- Sanity checker -
tests/munit-tests/_YDBAIMTEST.m
- Comprehensive unit testing suite -
tests/munit-tests/_YDBAIMSPEED.m
- Speed tester
Test runner tests/test.sh
creates an empty database in the db
directory, downloads .zwr files for test assets from various places on
the internet (gitlab/github), and downloads M-Unit as well, and loads
all of these into the database.
Misc Changes:
- YDBAIM comment was inaccruate and is now updated
- .gitignore updates for the test system
- Fix needs_copyright to be cleverer (copied from Octo)
- Remove _YDBAIMTEST from CMakeLists.txt, as it can no longer be run independently. We don't need it anyways for YDBAIM.
- pre-commit hook for removing extra whitespace; info added to README.
- Update readme with sudo -E. Using sudo will work most of the time, but our internal systems have multiple distributions installed, and we need to pass $ydb_dist if present to make sure YDBAIM will be installed in the right spot.
- install.sh copyright alignment fixed.
Second Commit
.gitlab-ci.yml now has a new make-ubuntu
job that uses the
yottadb/yottadb-base:latest-master
as the base, installs YDBAIM, and
then runs the Unit Tests.
tests/test.sh
enhanced to tee the M-Unit output, and then grep for
[FAIL]
. If [FAIL]
is found, the test that caused the failure is
printed in the same grep (using the -B1 flag), and we exit with an
error. Some gymnastics required because grep's return status is the
opposite of what we want.
Lastly, the failing test in tests/_YDBAIMTEST.m
has been temporarily
removed. It's tracked in
#26 (closed). Now pipeline
succeeds.
Other misc changes:
- Change gpgkey-verify to commit-verify.