| .. | ||
| jenkins | ||
| travis | ||
| all.sh | ||
| lib.sh | ||
| long.sh | ||
| Makefile.in | ||
| mem.sh | ||
| nacm.sh | ||
| plot_perf.sh | ||
| README.md | ||
| sum.sh | ||
| test_choice.sh | ||
| test_cli.sh | ||
| test_compat.sh | ||
| test_copy_config.sh | ||
| test_datastore.sh | ||
| test_feature.sh | ||
| test_identity.sh | ||
| test_install.sh | ||
| test_json.sh | ||
| test_leafref.sh | ||
| test_list.sh | ||
| test_nacm.sh | ||
| test_nacm_ext.sh | ||
| test_nacm_module_read.sh | ||
| test_nacm_module_write.sh | ||
| test_nacm_protocol.sh | ||
| test_netconf.sh | ||
| test_openconfig.sh | ||
| test_order.sh | ||
| test_perf.sh | ||
| test_restconf.sh | ||
| test_restconf2.sh | ||
| test_rpc.sh | ||
| test_startup.sh | ||
| test_stream.sh | ||
| test_type.sh | ||
| test_union.sh | ||
| test_upgrade.sh | ||
| test_when_must.sh | ||
| test_xml.sh | ||
| test_xpath.sh | ||
| test_yang.sh | ||
| test_yang_load.sh | ||
| test_yang_namespace.sh | ||
| test_yangmodels.sh | ||
| valgrind-clixon.supp | ||
Clixon tests and CI
Overview
Tests called 'test_*.sh' and placed in this directory will be automatically run as part of the all.sh, sum.sh tests etc. The scripts need to follow some rules to work properly, please look at one or two to get the idea.
See also the site.sh for example for skipping tests or setting some site-specific variables.
Continuous Integration
CI is done via Travis CI.
In the CI process, the system is built and configured and then the clixon test container is built and the tests in this directory is executed.
Getting started
You need to build and install the clixon utility programs before running the tests as some of the tests rely on them:
cd util
make
sudo make install
You need to start nginx for some of the text. There are instructions in
- If you run systemd:
sudo systemctl start nginx.service - The example has instructions
Prefix variable
You can prefix a test with BE=0 if you want to run your own backend.
To run with debug flags, use the DBG=<number> environment variable.
Other variables include:
- RCWAIT Number of seconds to sleep after daemons have started
Run all tests
You can run an individual test by itself, or run through all tests matching 'test_*.sh' in the directory. Prints test output and stops on first error:
all.sh
Run all tests but continue after errors and only print a summary test output identifying which tests succeeded and which failed:
sum.sh
Memory leak test
These tests use valgrind to check for memory leaks:
mem.sh cli
mem.sh netconf
mem.sh backend
mem.sh restconf
Site.sh
You may add your site-specific modifications in a site.sh file. Example:
# Add your local site specific env variables (or tests) here.
# Add test to this list that you dont want run
SKIPLIST="test_openconfig.sh test_yangmodels.sh"
# Parse yang openconfig models from https://github.com/openconfig/public
OPENCONFIG=/home/olof/src/clixon/test/public
# Parse yangmodels from https://github.com/YangModels/yang
YANGMODELS=/usr/local/share/yangmodels
# Standard IETF RFC yang files.
IETFRFC=$YANGMODELS/standard/ietf/RFC