From 4102ca8a46b537462700eb2066633a425374eb01 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Mon, 7 Feb 2022 13:24:13 +0100 Subject: [PATCH] * `configure --with-wwwdir=` is removed * test: * new test_helloworld.sh smoketest added for testing basic functions * stripped restconf fcgi default config * added yang variable --- CHANGELOG.md | 1 + configure | 19 ++- configure.ac | 7 +- doc/DEVELOP.md | 9 ++ test/README.md | 16 ++- test/config.sh.in | 1 + test/lib.sh | 34 ++--- test/test_api.sh | 2 +- test/test_augment.sh | 2 +- test/test_augment_state.sh | 2 +- test/test_augment_trans.sh | 2 +- test/test_autocli_editmode.sh | 2 +- test/test_autocli_extension.sh | 2 +- test/test_autocli_listkey_compress.sh | 2 +- test/test_autocli_spec.sh | 2 +- test/test_autocli_sub.sh | 2 +- test/test_autocli_treeref.sh | 2 +- test/test_c++.sh | 2 +- test/test_choice.sh | 2 +- test/test_cli.sh | 2 +- test/test_cli_apipath.sh | 2 +- test/test_cli_history.sh | 2 +- test/test_cli_leafref.sh | 2 +- test/test_cli_multikey.sh | 2 +- test/test_cli_submodes.sh | 2 +- test/test_cli_translate.sh | 2 +- test/test_cli_varonly.sh | 2 +- test/test_client.sh | 2 +- test/test_configdir.sh | 8 +- test/test_copy_config.sh | 2 +- test/test_datastore_repair.sh | 2 +- test/test_debug.sh | 2 +- test/test_feature.sh | 2 +- test/test_helloworld.sh | 156 +++++++++++++++++++++++ test/test_identity.sh | 2 +- test/test_insert.sh | 2 +- test/test_leaf_default.sh | 2 +- test/test_leafref.sh | 2 +- test/test_leafref_augment.sh | 2 +- test/test_leafref_state.sh | 2 +- test/test_leafref_union.sh | 2 +- test/test_minmax.sh | 2 +- test/test_nacm.sh | 2 +- test/test_nacm_credentials.sh | 2 +- test/test_nacm_datanode.sh | 2 +- test/test_nacm_datanode_paths.sh | 2 +- test/test_nacm_datanode_read.sh | 2 +- test/test_nacm_datanode_write.sh | 2 +- test/test_nacm_default.sh | 2 +- test/test_nacm_ext.sh | 2 +- test/test_nacm_module_read.sh | 2 +- test/test_nacm_module_write.sh | 2 +- test/test_nacm_protocol.sh | 2 +- test/test_nacm_recovery.sh | 2 +- test/test_netconf.sh | 2 +- test/test_netconf_filter.sh | 2 +- test/test_netconf_hello.sh | 2 +- test/test_netconf_notifications.sh | 2 +- test/test_netconf_ssh_callhome.sh | 2 +- test/test_netconf_whitespace.sh | 2 +- test/test_openconfig.sh | 2 +- test/test_openconfig_interfaces.sh | 2 +- test/test_openconfig_network_instance.sh | 2 +- test/test_openconfig_system.sh | 2 +- test/test_order.sh | 2 +- test/test_pagination_config.sh | 2 +- test/test_pagination_draft.sh | 2 +- test/test_pagination_state.sh | 2 +- test/test_pattern.sh | 2 +- test/test_perf_cli.sh | 2 +- test/test_perf_mem.sh | 2 +- test/test_perf_netconf.sh | 2 +- test/test_perf_restconf.sh | 2 +- test/test_perf_startup.sh | 2 +- test/test_perf_state.sh | 2 +- test/test_perf_state_only.sh | 2 +- test/test_privileges.sh | 2 +- test/test_restconf.sh | 2 +- test/test_restconf_basic_auth.sh | 4 +- test/test_restconf_err.sh | 2 +- test/test_restconf_http_upgrade.sh | 2 +- test/test_restconf_internal.sh | 2 +- test/test_restconf_internal_usecases.sh | 2 +- test/test_restconf_jukebox.sh | 3 +- test/test_restconf_listkey.sh | 2 +- test/test_restconf_netns.sh | 4 +- test/test_restconf_nmap.sh | 2 +- test/test_restconf_notifications.sh | 2 +- test/test_restconf_op.sh | 2 +- test/test_restconf_plain_patch.sh | 2 +- test/test_restconf_ssl_certs.sh | 2 +- test/test_restconf_startup.sh | 2 +- test/test_restconf_yang_patch_json.sh | 2 +- test/test_restconf_yang_patch_xml.sh | 2 +- test/test_rpc.sh | 2 +- test/test_sock.sh | 2 +- test/test_startup.sh | 2 +- test/test_submodule.sh | 2 +- test/test_transaction.sh | 2 +- test/test_transaction_restart.sh | 2 +- test/test_type.sh | 2 +- test/test_type_range.sh | 2 +- test/test_union.sh | 2 +- test/test_unique.sh | 2 +- test/test_upgrade_auto.sh | 2 +- test/test_upgrade_checkold.sh | 2 +- test/test_upgrade_failsafe.sh | 2 +- test/test_upgrade_interfaces.sh | 2 +- test/test_upgrade_module.sh | 2 +- test/test_upgrade_quit.sh | 2 +- test/test_upgrade_repair.sh | 2 +- test/test_upgrade_simple.sh | 2 +- test/test_when_must.sh | 2 +- test/test_with_default.sh | 2 +- test/test_xml_trees.sh | 2 +- test/test_xpath_functions.sh | 2 +- test/test_yang.sh | 2 +- test/test_yang_anydata.sh | 2 +- test/test_yang_bind.sh | 2 +- test/test_yang_default.sh | 2 +- test/test_yang_deviation.sh | 2 +- test/test_yang_extension.sh | 2 +- test/test_yang_load.sh | 16 +-- test/test_yang_models_ieee.sh | 2 +- test/test_yang_models_ietf.sh | 2 +- test/test_yang_namespace.sh | 2 +- test/test_yang_when.sh | 2 +- 127 files changed, 343 insertions(+), 163 deletions(-) create mode 100755 test/test_helloworld.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index e0950916..fa6eb1f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Expected: March 2022 Users may have to change how they access the system +* `configure --with-wwwdir=` is removed * Command field of clixon-lib:process-control RPC reply used CDATA encoding but now uses regular XML encoding ### Corrected Bugs diff --git a/configure b/configure index 4a61ea8c..18a78310 100755 --- a/configure +++ b/configure @@ -632,7 +632,6 @@ ac_ct_CXX CXXFLAGS CXX CPP -wwwdir YANG_STANDARD_DIR YANG_INSTALLDIR CLIXON_YANG_PATCH @@ -728,6 +727,7 @@ with_libxml2 with_sigaction with_yang_installdir with_yang_standard_dir +enable_nls ' ac_precious_vars='build_alias host_alias @@ -1375,6 +1375,7 @@ Optional Features: --disable-nghttp2 Disable nghttp2 for native restconf http/2, ie http/1 only + Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) @@ -3395,10 +3396,6 @@ HAVE_LIBNGHTTP2=false # Examples require standard IETF YANGs. You need to provide these for example and tests -# Home dir for web user, such as nginx fcgi sockets -wwwdir=/www-data - - # ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -5072,11 +5069,6 @@ fi $as_echo "#define WITH_RESTCONF_FCGI 1" >>confdefs.h # For c-code that cant use strings - -cat >>confdefs.h <<_ACEOF -#define WWWDIR "$wwwdir" -_ACEOF - elif test "x${with_restconf}" == xnative; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL_init_ssl in -lssl" >&5 @@ -5676,6 +5668,13 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# Dummy to disable native language support (nls) to remove warnings in buildroot +# Check whether --enable-nls was given. +if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; +fi + + ac_config_files="$ac_config_files Makefile lib/Makefile lib/src/Makefile lib/clixon/Makefile apps/Makefile apps/cli/Makefile apps/backend/Makefile apps/netconf/Makefile apps/restconf/Makefile include/Makefile etc/Makefile etc/clixonrc example/Makefile example/main/Makefile example/main/example.xml extras/rpm/Makefile docker/Makefile docker/base/Makefile docker/clixon-dev/Makefile docker/main/Makefile util/Makefile yang/Makefile yang/clixon/Makefile yang/mandatory/Makefile doc/Makefile test/Makefile test/config.sh test/cicd/Makefile test/vagrant/Makefile" diff --git a/configure.ac b/configure.ac index 63e1adf3..3ef1c091 100644 --- a/configure.ac +++ b/configure.ac @@ -123,9 +123,6 @@ AC_SUBST(YANG_INSTALLDIR) # Examples require standard IETF YANGs. You need to provide these for example and tests AC_SUBST(YANG_STANDARD_DIR) -# Home dir for web user, such as nginx fcgi sockets -AC_SUBST(wwwdir,/www-data) - # AC_PROG_CC() AC_PROG_CPP @@ -225,7 +222,6 @@ if test "x${with_restconf}" == xfcgi; then # Lives in libfcgi-dev AC_CHECK_LIB(fcgi, FCGX_Init,, AC_MSG_ERROR([libfcgi-dev missing])) AC_DEFINE(WITH_RESTCONF_FCGI, 1, [Use fcgi restconf mode]) # For c-code that cant use strings - AC_DEFINE_UNQUOTED(WWWDIR, "$wwwdir", [WWW dir for fcgi stuff / nginx]) elif test "x${with_restconf}" == xnative; then AC_CHECK_LIB(ssl, OPENSSL_init_ssl ,, AC_MSG_ERROR([libssl missing])) @@ -349,6 +345,9 @@ AC_MSG_RESULT(Standard YANG files expected to be in ${YANG_STANDARD_DIR}) # Default location for config file AC_DEFINE_UNQUOTED(CLIXON_DEFAULT_CONFIG,"${CLIXON_DEFAULT_CONFIG}",[Location for apps to find default config file]) +# Dummy to disable native language support (nls) to remove warnings in buildroot +AC_ARG_ENABLE(nls) + AH_BOTTOM([#include ]) AC_OUTPUT(Makefile diff --git a/doc/DEVELOP.md b/doc/DEVELOP.md index d10cd223..d66aac54 100644 --- a/doc/DEVELOP.md +++ b/doc/DEVELOP.md @@ -292,3 +292,12 @@ screen /tmp/clixon-tty LDFLAGS=-coverage LINKAGE=static CFLAGS="-O2 -Wall -coverage" ./configure bash <(curl -s https://codecov.io/bash) -t ``` + +## Static analysis + +``` +sudo apt install clang-tools # on ubuntu +scan-build ./configure --enable-debug +scan-build make +scan-view /tmp/scan-build-2022-02-03-100113-27646-1 # example +``` diff --git a/test/README.md b/test/README.md index 24951695..bfd433ab 100644 --- a/test/README.md +++ b/test/README.md @@ -9,9 +9,23 @@ to get the idea. Note that some IETF yangs need to be available, by default these are in `/usr/local//share/yang/standard`. You can change this location with configure option `--with-yang-standard-dir=DIR` - See also the [site.sh](#site-sh) for example for skipping tests or setting some site-specific variables. +## Openconfig and Yang + +To download the openconfig and yang models required for the tests: +``` + cd /usr/local/share/openconfig + git clone https://github.com/openconfig/public + cd /usr/local/share/yang + git init + git remote add -f origin https://github.com/YangModels/yang + git config core.sparseCheckout true + echo "standard/" >> .git/info/sparse-checkout + echo "experimental/" >> .git/info/sparse-checkout + git pull origin master +``` + ## Continuous Integration CI is done via [Travis CI](https://travis-ci.org/clicon/clixon). diff --git a/test/config.sh.in b/test/config.sh.in index 6965e3b4..9ec69bd3 100755 --- a/test/config.sh.in +++ b/test/config.sh.in @@ -85,3 +85,4 @@ LIBSTATIC_SUFFIX=@LIBSTATIC_SUFFIX@ LIBS="@LIBS@" CLIXON_YANG_PATCH=@CLIXON_YANG_PATCH@ YANG_STANDARD_DIR=@YANG_STANDARD_DIR@ +YANG_INSTALLDIR=@YANG_INSTALLDIR@ diff --git a/test/lib.sh b/test/lib.sh index b3c29587..c223a951 100755 --- a/test/lib.sh +++ b/test/lib.sh @@ -226,26 +226,26 @@ function restconf_config() AUTH=$1 PRETTY=$2 - if [ ${WITH_RESTCONF} = "fcgi" ]; then + if [ false -a ${WITH_RESTCONF} = "fcgi" ]; then + echo "clixon-restconf:fcgitrue$AUTH$PRETTY$DBG" + else FEATURES="clixon-restconf:fcgi" - else - FEATURES="" - fi - if [ $RCPROTO = http ]; then - echo "${FEATURES}true$AUTH$PRETTY$DBGdefault
0.0.0.0
80false
" - else - certdir=$dir/certs - if [ ! -f ${dir}/clixon-server-crt.pem ]; then + if [ $RCPROTO = http ]; then + echo "${FEATURES}true$AUTH$PRETTY$DBGdefault
0.0.0.0
80false
" + else certdir=$dir/certs - test -d $certdir || mkdir $certdir - srvcert=${certdir}/clixon-server-crt.pem - srvkey=${certdir}/clixon-server-key.pem - cacert=${certdir}/clixon-ca-crt.pem - cakey=${certdir}/clixon-ca-key.pem - cacerts $cakey $cacert - servercerts $cakey $cacert $srvkey $srvcert + if [ ! -f ${dir}/clixon-server-crt.pem ]; then + certdir=$dir/certs + test -d $certdir || mkdir $certdir + srvcert=${certdir}/clixon-server-crt.pem + srvkey=${certdir}/clixon-server-key.pem + cacert=${certdir}/clixon-ca-crt.pem + cakey=${certdir}/clixon-ca-key.pem + cacerts $cakey $cacert + servercerts $cakey $cacert $srvkey $srvcert + fi + echo "${FEATURES}true$AUTH$PRETTY${certdir}/clixon-server-crt.pem${certdir}/clixon-server-key.pem${certdir}/clixon-ca-crt.pem$DBGdefault
0.0.0.0
443true
" fi - echo "${FEATURES}true$AUTH$PRETTY${certdir}/clixon-server-crt.pem${certdir}/clixon-server-key.pem${certdir}/clixon-ca-crt.pem$DBGdefault
0.0.0.0
443true
" fi } diff --git a/test/test_api.sh b/test/test_api.sh index 9bd894cf..69a03b26 100755 --- a/test/test_api.sh +++ b/test/test_api.sh @@ -31,7 +31,7 @@ cat < $cfg /tmp/conf_yang.xml clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_augment.sh b/test/test_augment.sh index ae02a583..bacd95f1 100755 --- a/test/test_augment.sh +++ b/test/test_augment.sh @@ -32,7 +32,7 @@ cat < $cfg a:test clixon-restconf:allow-auth-none $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_augment_state.sh b/test/test_augment_state.sh index 00f40713..93ed9ced 100755 --- a/test/test_augment_state.sh +++ b/test/test_augment_state.sh @@ -17,7 +17,7 @@ cat < $cfg $cfg a:test $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_augment_trans.sh b/test/test_augment_trans.sh index 20e5fa9b..f0d0bb89 100755 --- a/test/test_augment_trans.sh +++ b/test/test_augment_trans.sh @@ -20,7 +20,7 @@ cat < $cfg $cfg a:test $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang2 /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_autocli_editmode.sh b/test/test_autocli_editmode.sh index e51236e1..062d660d 100755 --- a/test/test_autocli_editmode.sh +++ b/test/test_autocli_editmode.sh @@ -24,7 +24,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/backend $APPNAME diff --git a/test/test_autocli_extension.sh b/test/test_autocli_extension.sh index bb4685d1..0cb7a75b 100755 --- a/test/test_autocli_extension.sh +++ b/test/test_autocli_extension.sh @@ -28,7 +28,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $dir /usr/local/lib/$APPNAME/backend diff --git a/test/test_autocli_listkey_compress.sh b/test/test_autocli_listkey_compress.sh index 92e5958e..12ae83b4 100755 --- a/test/test_autocli_listkey_compress.sh +++ b/test/test_autocli_listkey_compress.sh @@ -200,7 +200,7 @@ EOF cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $OCDIR/ $dir diff --git a/test/test_autocli_spec.sh b/test/test_autocli_spec.sh index 5848b46d..daedf830 100755 --- a/test/test_autocli_spec.sh +++ b/test/test_autocli_spec.sh @@ -122,7 +122,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $dir /usr/local/lib/$APPNAME/backend diff --git a/test/test_autocli_sub.sh b/test/test_autocli_sub.sh index 50830e8e..947ac166 100755 --- a/test/test_autocli_sub.sh +++ b/test/test_autocli_sub.sh @@ -26,7 +26,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/backend diff --git a/test/test_autocli_treeref.sh b/test/test_autocli_treeref.sh index c85d4023..ec497b23 100755 --- a/test/test_autocli_treeref.sh +++ b/test/test_autocli_treeref.sh @@ -26,7 +26,7 @@ AUTOCLI=$(autocli_config ${APPNAME}\* kw-nokey true) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/backend diff --git a/test/test_c++.sh b/test/test_c++.sh index 5d67b774..713ecdf4 100755 --- a/test/test_c++.sh +++ b/test/test_c++.sh @@ -18,7 +18,7 @@ test -d $dir/backend || mkdir $dir/backend cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $dir/backend /usr/local/lib/$APPNAME/clispec diff --git a/test/test_choice.sh b/test/test_choice.sh index 71aa3a61..78c62dc1 100755 --- a/test/test_choice.sh +++ b/test/test_choice.sh @@ -22,7 +22,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_cli.sh b/test/test_cli.sh index 1f1a01ed..a572e5df 100755 --- a/test/test_cli.sh +++ b/test/test_cli.sh @@ -21,7 +21,7 @@ cfg=$dir/conf_yang.xml cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC clixon-example /usr/local/lib/$APPNAME/backend diff --git a/test/test_cli_apipath.sh b/test/test_cli_apipath.sh index f491f677..51e301cc 100755 --- a/test/test_cli_apipath.sh +++ b/test/test_cli_apipath.sh @@ -24,7 +24,7 @@ AUTOCLI=$(autocli_config ${APPNAME} kw-all false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang $clidir diff --git a/test/test_cli_history.sh b/test/test_cli_history.sh index 4382486c..5e95bd7a 100755 --- a/test/test_cli_history.sh +++ b/test/test_cli_history.sh @@ -17,7 +17,7 @@ fyang=$dir/clixon-example.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/backend /usr/local/lib/$APPNAME/clispec diff --git a/test/test_cli_leafref.sh b/test/test_cli_leafref.sh index 83416ade..ea7a00d3 100755 --- a/test/test_cli_leafref.sh +++ b/test/test_cli_leafref.sh @@ -17,7 +17,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir example-leafref /usr/local/lib/$APPNAME/backend diff --git a/test/test_cli_multikey.sh b/test/test_cli_multikey.sh index b56e8748..a7f9e277 100755 --- a/test/test_cli_multikey.sh +++ b/test/test_cli_multikey.sh @@ -18,7 +18,7 @@ AUTOCLI=$(autocli_config ${APPNAME} kw-all false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_cli_submodes.sh b/test/test_cli_submodes.sh index e38cf33e..430d4340 100755 --- a/test/test_cli_submodes.sh +++ b/test/test_cli_submodes.sh @@ -25,7 +25,7 @@ fi cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/backend $clidir diff --git a/test/test_cli_translate.sh b/test/test_cli_translate.sh index d0282d3d..e95aac3e 100755 --- a/test/test_cli_translate.sh +++ b/test/test_cli_translate.sh @@ -20,7 +20,7 @@ AUTOCLI=$(autocli_config ${APPNAME} kw-all false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $dir /usr/local/lib/$APPNAME/cli diff --git a/test/test_cli_varonly.sh b/test/test_cli_varonly.sh index 4542b302..b4d27d70 100755 --- a/test/test_cli_varonly.sh +++ b/test/test_cli_varonly.sh @@ -17,7 +17,7 @@ fyang=$dir/example.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir example /usr/local/lib/$APPNAME/backend diff --git a/test/test_client.sh b/test/test_client.sh index 1c105824..54f5380a 100755 --- a/test/test_client.sh +++ b/test/test_client.sh @@ -29,7 +29,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_configdir.sh b/test/test_configdir.sh index 1f5ea896..a33c0f34 100755 --- a/test/test_configdir.sh +++ b/test/test_configdir.sh @@ -28,7 +28,7 @@ cat < $cfg /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile /usr/local/var/$APPNAME - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME @@ -53,7 +53,7 @@ cat < $cfg /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile /usr/local/var/$APPNAME - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME @@ -72,7 +72,7 @@ cat < $cfg /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile /usr/local/var/$APPNAME - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME @@ -90,7 +90,7 @@ cat < $cfg /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile /usr/local/var/$APPNAME - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME diff --git a/test/test_copy_config.sh b/test/test_copy_config.sh index 565de80d..e694ffc1 100755 --- a/test/test_copy_config.sh +++ b/test/test_copy_config.sh @@ -38,7 +38,7 @@ cat < $cfg ietf-netconf:startup clixon-restconf:allow-auth-none 42 - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_datastore_repair.sh b/test/test_datastore_repair.sh index d91751fe..2fba0ebc 100755 --- a/test/test_datastore_repair.sh +++ b/test/test_datastore_repair.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_debug.sh b/test/test_debug.sh index e67f23cc..a2642949 100755 --- a/test/test_debug.sh +++ b/test/test_debug.sh @@ -17,7 +17,7 @@ cat < $cfg clixon-restconf:allow-auth-none $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock $dir/restconf.pidfile diff --git a/test/test_feature.sh b/test/test_feature.sh index b759ad08..db021ab8 100755 --- a/test/test_feature.sh +++ b/test/test_feature.sh @@ -32,7 +32,7 @@ cat < $cfg $APPNAME:A1 ietf-routing:router-id $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_helloworld.sh b/test/test_helloworld.sh new file mode 100755 index 00000000..280cc244 --- /dev/null +++ b/test/test_helloworld.sh @@ -0,0 +1,156 @@ +#!/usr/bin/env bash +# Hello world smoketest test +# A minimal test for backend/cli/netconf/restconf +# See clixon-example/hello +# but this test is (more or less) self-contained for as little external dependencies as possible +# The test is free of plugins because that would require compilation, or pre-built plugins +# Restconf is internal native http port 80 + +# Magic line must be first in script (see README.md) +s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi + +cfg=$dir/hello.xml +fyang=$dir/clixon-hello.yang +clispec=$dir/clispec +test -d $clispec || mkdir $clispec + +RCPROTO=http + +cat < $cfg + + $cfg + clixon-restconf:allow-auth-none + ${YANG_INSTALLDIR} + $fyang + $clispec + hello + $dir/hello.sock + $dir/hello.pidfile + $dir + init + false + clicon + www-data + drop_perm + true + + true + none + false + 0 + file + + default +
0.0.0.0
+ 80 + false +
+
+ + false + + include hello yang + enable + clixon-hello* + + +
+EOF + +cat < $fyang +module clixon-hello { + yang-version 1.1; + namespace "urn:example:hello"; + prefix he; + revision 2019-04-17 { + description + "Clixon hello world example"; + } + container hello{ + container world{ + presence true; + } + } +} +EOF + +# XXX remove unecessary commands +cat < $clispec/hello_cli.cli +CLICON_MODE="hello"; +CLICON_PROMPT="cli> "; + +# Reference generated data model +set @datamodel, cli_set(); +merge @datamodel, cli_merge(); +create @datamodel, cli_create(); +delete("Delete a configuration item") @datamodel, cli_del(); +validate("Validate changes"), cli_validate(); +commit("Commit the changes"), cli_commit(); +quit("Quit"), cli_quit(); +show("Show a particular state of the system") + configuration("Show configuration"), cli_show_config("candidate", "text", "/"); + +EOF + +new "test params: -f $cfg" +# Bring your own backend +if [ $BE -ne 0 ]; then + # kill old backend (if any) + new "kill old backend" + sudo clixon_backend -zf $cfg + if [ $? -ne 0 ]; then + err + fi + new "start backend -s init -f $cfg" + start_backend -s init -f $cfg +fi + +new "wait backend" +wait_backend + +if [ $RC -ne 0 ]; then + new "kill old restconf daemon" + stop_restconf_pre + + new "start restconf daemon" + start_restconf -f $cfg +fi + +new "wait restconf" +wait_restconf + +new "cli configure" +expectpart "$($clixon_cli -1 -f $cfg set hello world)" 0 "^$" + +new "cli show config" +expectpart "$($clixon_cli -1 -f $cfg show config)" 0 "hello" "world" + +new "netconf edit-config" +expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^]]>]]>$" + +new "netconf commit" +expecteof "$clixon_netconf -qf $cfg" 0 "$DEFAULTHELLO]]>]]>" "^]]>]]>$" + +new "restconf GET" +expectpart "$(curl $CURLOPTS -X GET $RCPROTO://localhost/restconf/data/clixon-hello:hello)" 0 "HTTP/$HVER 200" "{\"clixon-hello:hello\":{\"world\":{}}}" + +if [ $RC -ne 0 ]; then + new "Kill restconf daemon" + stop_restconf +fi + +if [ $BE -ne 0 ]; then + new "Kill backend" + # Check if premature kill + pid=$(pgrep -u root -f clixon_backend) + if [ -z "$pid" ]; then + err "backend already dead" + fi + # kill backend + stop_backend -f $cfg +fi + +rm -rf $dir + +new "endtest" +endtest diff --git a/test/test_identity.sh b/test/test_identity.sh index 746c3502..8576d729 100755 --- a/test/test_identity.sh +++ b/test/test_identity.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_insert.sh b/test/test_insert.sh index 514b7f8f..462de6af 100755 --- a/test/test_insert.sh +++ b/test/test_insert.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME diff --git a/test/test_leaf_default.sh b/test/test_leaf_default.sh index c971c231..de41bfee 100755 --- a/test/test_leaf_default.sh +++ b/test/test_leaf_default.sh @@ -28,7 +28,7 @@ cat < $cfg $cfg ietf-netconf:startup $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_leafref.sh b/test/test_leafref.sh index a8ba47b0..c9d5089b 100755 --- a/test/test_leafref.sh +++ b/test/test_leafref.sh @@ -13,7 +13,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_leafref_augment.sh b/test/test_leafref_augment.sh index 9efd0b69..cd6d1f88 100755 --- a/test/test_leafref_augment.sh +++ b/test/test_leafref_augment.sh @@ -38,7 +38,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang2 /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_leafref_state.sh b/test/test_leafref_state.sh index 50325d2d..887aee1d 100755 --- a/test/test_leafref_state.sh +++ b/test/test_leafref_state.sh @@ -29,7 +29,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/backend /usr/local/lib/$APPNAME/clispec diff --git a/test/test_leafref_union.sh b/test/test_leafref_union.sh index d34f79f2..53011261 100755 --- a/test/test_leafref_union.sh +++ b/test/test_leafref_union.sh @@ -14,7 +14,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_minmax.sh b/test/test_minmax.sh index ef1a692a..36098df9 100755 --- a/test/test_minmax.sh +++ b/test/test_minmax.sh @@ -12,7 +12,7 @@ fyang=$dir/test.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_nacm.sh b/test/test_nacm.sh index d83f7870..794b9bd6 100755 --- a/test/test_nacm.sh +++ b/test/test_nacm.sh @@ -23,7 +23,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_credentials.sh b/test/test_nacm_credentials.sh index 5eff478e..9c093d55 100755 --- a/test/test_nacm_credentials.sh +++ b/test/test_nacm_credentials.sh @@ -111,7 +111,7 @@ function testrun(){ cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $family $sock diff --git a/test/test_nacm_datanode.sh b/test/test_nacm_datanode.sh index d3924d31..9a91d845 100755 --- a/test/test_nacm_datanode.sh +++ b/test/test_nacm_datanode.sh @@ -51,7 +51,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_nacm_datanode_paths.sh b/test/test_nacm_datanode_paths.sh index 589d1183..f64f0595 100755 --- a/test/test_nacm_datanode_paths.sh +++ b/test/test_nacm_datanode_paths.sh @@ -23,7 +23,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang ietf-netconf:startup diff --git a/test/test_nacm_datanode_read.sh b/test/test_nacm_datanode_read.sh index ae471833..113e4b1f 100755 --- a/test/test_nacm_datanode_read.sh +++ b/test/test_nacm_datanode_read.sh @@ -31,7 +31,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_nacm_datanode_write.sh b/test/test_nacm_datanode_write.sh index e6f251de..de0a2ac3 100755 --- a/test/test_nacm_datanode_write.sh +++ b/test/test_nacm_datanode_write.sh @@ -23,7 +23,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_nacm_default.sh b/test/test_nacm_default.sh index 906ed3c7..d8caef00 100755 --- a/test/test_nacm_default.sh +++ b/test/test_nacm_default.sh @@ -20,7 +20,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_ext.sh b/test/test_nacm_ext.sh index 1e8fe07a..d137032c 100755 --- a/test/test_nacm_ext.sh +++ b/test/test_nacm_ext.sh @@ -23,7 +23,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_nacm_module_read.sh b/test/test_nacm_module_read.sh index c0ac72c8..17327b22 100755 --- a/test/test_nacm_module_read.sh +++ b/test/test_nacm_module_read.sh @@ -25,7 +25,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_module_write.sh b/test/test_nacm_module_write.sh index 74d40257..bf994072 100755 --- a/test/test_nacm_module_write.sh +++ b/test/test_nacm_module_write.sh @@ -38,7 +38,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_protocol.sh b/test/test_nacm_protocol.sh index ae1b53de..ac7f7e2b 100755 --- a/test/test_nacm_protocol.sh +++ b/test/test_nacm_protocol.sh @@ -41,7 +41,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_nacm_recovery.sh b/test/test_nacm_recovery.sh index 18957605..8e9d6ccb 100755 --- a/test/test_nacm_recovery.sh +++ b/test/test_nacm_recovery.sh @@ -69,7 +69,7 @@ function testrun() cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/restconf diff --git a/test/test_netconf.sh b/test/test_netconf.sh index d05e22c7..e8e895a9 100755 --- a/test/test_netconf.sh +++ b/test/test_netconf.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg ietf-netconf:startup 42 - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC clixon-example /usr/local/lib/$APPNAME/clispec diff --git a/test/test_netconf_filter.sh b/test/test_netconf_filter.sh index ec7a9fcf..8ec28b18 100755 --- a/test/test_netconf_filter.sh +++ b/test/test_netconf_filter.sh @@ -13,7 +13,7 @@ fyang=$dir/filter.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_netconf_hello.sh b/test/test_netconf_hello.sh index 57d97796..fcff3b82 100755 --- a/test/test_netconf_hello.sh +++ b/test/test_netconf_hello.sh @@ -20,7 +20,7 @@ cat < $cfg $cfg ietf-netconf:startup 42 - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_netconf_notifications.sh b/test/test_netconf_notifications.sh index 6fb3356f..68994855 100755 --- a/test/test_netconf_notifications.sh +++ b/test/test_netconf_notifications.sh @@ -29,7 +29,7 @@ xml=$dir/xml.xml cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/$APPNAME/backend diff --git a/test/test_netconf_ssh_callhome.sh b/test/test_netconf_ssh_callhome.sh index 078ddf01..48dc67a1 100755 --- a/test/test_netconf_ssh_callhome.sh +++ b/test/test_netconf_ssh_callhome.sh @@ -36,7 +36,7 @@ cat < $cfg $cfg 42 - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_netconf_whitespace.sh b/test/test_netconf_whitespace.sh index 0670f44b..90484b60 100755 --- a/test/test_netconf_whitespace.sh +++ b/test/test_netconf_whitespace.sh @@ -25,7 +25,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_openconfig.sh b/test/test_openconfig.sh index 83a9e0f3..05939bc1 100755 --- a/test/test_openconfig.sh +++ b/test/test_openconfig.sh @@ -62,7 +62,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} ${OPENCONFIG} true /usr/local/lib/$APPNAME/clispec diff --git a/test/test_openconfig_interfaces.sh b/test/test_openconfig_interfaces.sh index c0a4e8b3..3bec643d 100755 --- a/test/test_openconfig_interfaces.sh +++ b/test/test_openconfig_interfaces.sh @@ -26,7 +26,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $OCDIR $fyang diff --git a/test/test_openconfig_network_instance.sh b/test/test_openconfig_network_instance.sh index 9bee3214..dc2917ae 100755 --- a/test/test_openconfig_network_instance.sh +++ b/test/test_openconfig_network_instance.sh @@ -23,7 +23,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $OCDIR $fyang diff --git a/test/test_openconfig_system.sh b/test/test_openconfig_system.sh index cccc8bdd..092a835b 100755 --- a/test/test_openconfig_system.sh +++ b/test/test_openconfig_system.sh @@ -29,7 +29,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $OCDIR $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_order.sh b/test/test_order.sh index 421e5678..a9af1028 100755 --- a/test/test_order.sh +++ b/test/test_order.sh @@ -33,7 +33,7 @@ fi cat < $cfg /tmp/conf_yang.xml - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_pagination_config.sh b/test/test_pagination_config.sh index 52d75580..e2efee05 100755 --- a/test/test_pagination_config.sh +++ b/test/test_pagination_config.sh @@ -29,7 +29,7 @@ cat < $cfg $cfg ietf-netconf:startup clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/$APPNAME/backend diff --git a/test/test_pagination_draft.sh b/test/test_pagination_draft.sh index 0f1a5ebf..57f7ab10 100755 --- a/test/test_pagination_draft.sh +++ b/test/test_pagination_draft.sh @@ -26,7 +26,7 @@ cat < $cfg $cfg ietf-netconf:startup clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $dir /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_pagination_state.sh b/test/test_pagination_state.sh index 0ef950f7..7a179950 100755 --- a/test/test_pagination_state.sh +++ b/test/test_pagination_state.sh @@ -34,7 +34,7 @@ cat < $cfg $cfg ietf-netconf:startup clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $dir /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_pattern.sh b/test/test_pattern.sh index 695c8926..d1d9f398 100755 --- a/test/test_pattern.sh +++ b/test/test_pattern.sh @@ -33,7 +33,7 @@ for regex in $regexlist; do cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang $regex diff --git a/test/test_perf_cli.sh b/test/test_perf_cli.sh index e72e0a0f..993a7c9d 100755 --- a/test/test_perf_cli.sh +++ b/test/test_perf_cli.sh @@ -56,7 +56,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/example/$APPNAME.pidfile diff --git a/test/test_perf_mem.sh b/test/test_perf_mem.sh index a99e1f2f..0f9df80f 100755 --- a/test/test_perf_mem.sh +++ b/test/test_perf_mem.sh @@ -46,7 +46,7 @@ cat < $cfg $cfg ietf-netconf:startup $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock $pidfile diff --git a/test/test_perf_netconf.sh b/test/test_perf_netconf.sh index fbdf69ef..7186cb6a 100755 --- a/test/test_perf_netconf.sh +++ b/test/test_perf_netconf.sh @@ -60,7 +60,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/example/$APPNAME.pidfile diff --git a/test/test_perf_restconf.sh b/test/test_perf_restconf.sh index 6d8df8db..e8495050 100755 --- a/test/test_perf_restconf.sh +++ b/test/test_perf_restconf.sh @@ -64,7 +64,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/example/$APPNAME.pidfile diff --git a/test/test_perf_startup.sh b/test/test_perf_startup.sh index 6bc554d0..7d539c14 100755 --- a/test/test_perf_startup.sh +++ b/test/test_perf_startup.sh @@ -56,7 +56,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/example/$APPNAME.pidfile diff --git a/test/test_perf_state.sh b/test/test_perf_state.sh index 7826558b..ddef0656 100755 --- a/test/test_perf_state.sh +++ b/test/test_perf_state.sh @@ -36,7 +36,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/example/$APPNAME.pidfile diff --git a/test/test_perf_state_only.sh b/test/test_perf_state_only.sh index cce9111b..8ffb2e93 100755 --- a/test/test_perf_state_only.sh +++ b/test/test_perf_state_only.sh @@ -36,7 +36,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/example/$APPNAME.pidfile diff --git a/test/test_privileges.sh b/test/test_privileges.sh index bab5988b..bd3f0615 100755 --- a/test/test_privileges.sh +++ b/test/test_privileges.sh @@ -24,7 +24,7 @@ fyang=$dir/clixon-example.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $dir/$APPNAME.sock /var/tmp/$APPNAME.pidfile diff --git a/test/test_restconf.sh b/test/test_restconf.sh index a6a44008..4103b2d6 100755 --- a/test/test_restconf.sh +++ b/test/test_restconf.sh @@ -98,7 +98,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $IETFRFC $dir /usr/local/lib/$APPNAME/clispec diff --git a/test/test_restconf_basic_auth.sh b/test/test_restconf_basic_auth.sh index 901edca6..8e67c576 100755 --- a/test/test_restconf_basic_auth.sh +++ b/test/test_restconf_basic_auth.sh @@ -42,7 +42,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend @@ -186,7 +186,7 @@ function testrun() $cfg ietf-netconf:startup clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_err.sh b/test/test_restconf_err.sh index bebd0a6b..5103f8e3 100755 --- a/test/test_restconf_err.sh +++ b/test/test_restconf_err.sh @@ -48,7 +48,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_restconf_http_upgrade.sh b/test/test_restconf_http_upgrade.sh index a860bc00..db41991e 100755 --- a/test/test_restconf_http_upgrade.sh +++ b/test/test_restconf_http_upgrade.sh @@ -33,7 +33,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_internal.sh b/test/test_restconf_internal.sh index d05c546c..fbc0aa43 100755 --- a/test/test_restconf_internal.sh +++ b/test/test_restconf_internal.sh @@ -52,7 +52,7 @@ cat < $cfg ietf-netconf:startup clixon-restconf:allow-auth-none $EXTRACONF - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_internal_usecases.sh b/test/test_restconf_internal_usecases.sh index 347d5048..0ca627b4 100755 --- a/test/test_restconf_internal_usecases.sh +++ b/test/test_restconf_internal_usecases.sh @@ -66,7 +66,7 @@ cat < $cfg ietf-netconf:startup clixon-restconf:allow-auth-none $EXTRACONF - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_jukebox.sh b/test/test_restconf_jukebox.sh index 57d48346..8447fe1e 100755 --- a/test/test_restconf_jukebox.sh +++ b/test/test_restconf_jukebox.sh @@ -31,13 +31,14 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/$APPNAME/backend $dir/restconf.pidfile /usr/local/var/$APPNAME true + clixon-restconf:fcgi $RESTCONFIG EOF diff --git a/test/test_restconf_listkey.sh b/test/test_restconf_listkey.sh index 4cf6ee84..c5806aab 100755 --- a/test/test_restconf_listkey.sh +++ b/test/test_restconf_listkey.sh @@ -19,7 +19,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock $dir/restconf.pidfile diff --git a/test/test_restconf_netns.sh b/test/test_restconf_netns.sh index 911c06f6..4f1e2188 100755 --- a/test/test_restconf_netns.sh +++ b/test/test_restconf_netns.sh @@ -97,7 +97,7 @@ cat < $cfg $cfg ietf-netconf:startup clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend @@ -272,7 +272,7 @@ cat < $cfg $cfg ietf-netconf:startup clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_nmap.sh b/test/test_restconf_nmap.sh index 7d456ab0..c5c05b0a 100755 --- a/test/test_restconf_nmap.sh +++ b/test/test_restconf_nmap.sh @@ -85,7 +85,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_notifications.sh b/test/test_restconf_notifications.sh index 9a136285..8a68b965 100755 --- a/test/test_restconf_notifications.sh +++ b/test/test_restconf_notifications.sh @@ -50,7 +50,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_op.sh b/test/test_restconf_op.sh index 68887bbd..2e374170 100755 --- a/test/test_restconf_op.sh +++ b/test/test_restconf_op.sh @@ -20,7 +20,7 @@ cat < $cfg clixon-restconf:allow-auth-none $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/var/$APPNAME/$APPNAME.sock $dir/restconf.pidfile diff --git a/test/test_restconf_plain_patch.sh b/test/test_restconf_plain_patch.sh index b13cdf36..bf2348ff 100755 --- a/test/test_restconf_plain_patch.sh +++ b/test/test_restconf_plain_patch.sh @@ -18,7 +18,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock ietf-netconf:startup diff --git a/test/test_restconf_ssl_certs.sh b/test/test_restconf_ssl_certs.sh index 9deb75ed..9774ebaa 100755 --- a/test/test_restconf_ssl_certs.sh +++ b/test/test_restconf_ssl_certs.sh @@ -191,7 +191,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_restconf_startup.sh b/test/test_restconf_startup.sh index 9c1a0841..efc42c0d 100755 --- a/test/test_restconf_startup.sh +++ b/test/test_restconf_startup.sh @@ -41,7 +41,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/backend example_backend.so$ /usr/local/lib/$APPNAME/restconf diff --git a/test/test_restconf_yang_patch_json.sh b/test/test_restconf_yang_patch_json.sh index 220e7386..db2bcfdd 100755 --- a/test/test_restconf_yang_patch_json.sh +++ b/test/test_restconf_yang_patch_json.sh @@ -23,7 +23,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock ietf-netconf:startup diff --git a/test/test_restconf_yang_patch_xml.sh b/test/test_restconf_yang_patch_xml.sh index a20f5d1b..78bc0d48 100755 --- a/test/test_restconf_yang_patch_xml.sh +++ b/test/test_restconf_yang_patch_xml.sh @@ -24,7 +24,7 @@ RESTCONFIG=$(restconf_config user false) cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock ietf-netconf:startup diff --git a/test/test_rpc.sh b/test/test_rpc.sh index 86bfe988..5f93483e 100755 --- a/test/test_rpc.sh +++ b/test/test_rpc.sh @@ -22,7 +22,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/backend /usr/local/lib/$APPNAME/clispec diff --git a/test/test_sock.sh b/test/test_sock.sh index f66eb3d0..0c7ebaa4 100755 --- a/test/test_sock.sh +++ b/test/test_sock.sh @@ -39,7 +39,7 @@ cat < $cfg $cfg *:* - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $family 4535 diff --git a/test/test_startup.sh b/test/test_startup.sh index b8a17409..b0c12ad8 100755 --- a/test/test_startup.sh +++ b/test/test_startup.sh @@ -26,7 +26,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $APPNAME /usr/local/lib/$APPNAME/backend diff --git a/test/test_submodule.sh b/test/test_submodule.sh index 945fe611..12c3de6f 100755 --- a/test/test_submodule.sh +++ b/test/test_submodule.sh @@ -35,7 +35,7 @@ cat < $cfg main:A clixon-restconf:allow-auth-none $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fmain /usr/local/lib/$APPNAME/clispec diff --git a/test/test_transaction.sh b/test/test_transaction.sh index 1147bf9c..d6db5691 100755 --- a/test/test_transaction.sh +++ b/test/test_transaction.sh @@ -72,7 +72,7 @@ EOF cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_transaction_restart.sh b/test/test_transaction_restart.sh index 0548e78b..76ea9c5d 100755 --- a/test/test_transaction_restart.sh +++ b/test/test_transaction_restart.sh @@ -40,7 +40,7 @@ EOF cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_type.sh b/test/test_type.sh index 9a1555fa..037f6197 100755 --- a/test/test_type.sh +++ b/test/test_type.sh @@ -218,7 +218,7 @@ function testrun(){ $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_type_range.sh b/test/test_type_range.sh index aaaf07e1..24b121fa 100755 --- a/test/test_type_range.sh +++ b/test/test_type_range.sh @@ -172,7 +172,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang $dclispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_union.sh b/test/test_union.sh index 4777ef93..840fc092 100755 --- a/test/test_union.sh +++ b/test/test_union.sh @@ -16,7 +16,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_unique.sh b/test/test_unique.sh index 5b6b81db..b926633e 100755 --- a/test/test_unique.sh +++ b/test/test_unique.sh @@ -18,7 +18,7 @@ fyang=$dir/unique.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_upgrade_auto.sh b/test/test_upgrade_auto.sh index b27dc795..bd906cec 100755 --- a/test/test_upgrade_auto.sh +++ b/test/test_upgrade_auto.sh @@ -174,7 +174,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_upgrade_checkold.sh b/test/test_upgrade_checkold.sh index ac549169..7cd58f92 100755 --- a/test/test_upgrade_checkold.sh +++ b/test/test_upgrade_checkold.sh @@ -24,7 +24,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_upgrade_failsafe.sh b/test/test_upgrade_failsafe.sh index bc6faf91..3f765ea1 100755 --- a/test/test_upgrade_failsafe.sh +++ b/test/test_upgrade_failsafe.sh @@ -97,7 +97,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $dir /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_upgrade_interfaces.sh b/test/test_upgrade_interfaces.sh index 0b16719d..75000b48 100755 --- a/test/test_upgrade_interfaces.sh +++ b/test/test_upgrade_interfaces.sh @@ -34,7 +34,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} interfaces:if-mib $dir $dir diff --git a/test/test_upgrade_module.sh b/test/test_upgrade_module.sh index 24ab59fa..d45c9458 100755 --- a/test/test_upgrade_module.sh +++ b/test/test_upgrade_module.sh @@ -58,7 +58,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/lib/example/backend diff --git a/test/test_upgrade_quit.sh b/test/test_upgrade_quit.sh index 50b94d51..3779ea1e 100755 --- a/test/test_upgrade_quit.sh +++ b/test/test_upgrade_quit.sh @@ -21,7 +21,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} interfaces:if-mib $dir /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_upgrade_repair.sh b/test/test_upgrade_repair.sh index dfc701bf..6febe54d 100755 --- a/test/test_upgrade_repair.sh +++ b/test/test_upgrade_repair.sh @@ -58,7 +58,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $dir /usr/local/var/$APPNAME/$APPNAME.sock diff --git a/test/test_upgrade_simple.sh b/test/test_upgrade_simple.sh index 7837d16d..a8ad42e9 100755 --- a/test/test_upgrade_simple.sh +++ b/test/test_upgrade_simple.sh @@ -16,7 +16,7 @@ cat < $cfg /usr/local/etc/clixon.xml *:* - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $APPNAME hello diff --git a/test/test_when_must.sh b/test/test_when_must.sh index 70cd5301..aac2d0bb 100755 --- a/test/test_when_must.sh +++ b/test/test_when_must.sh @@ -13,7 +13,7 @@ fyang=$dir/test.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli diff --git a/test/test_with_default.sh b/test/test_with_default.sh index 61bb251a..f7519f2c 100755 --- a/test/test_with_default.sh +++ b/test/test_with_default.sh @@ -23,7 +23,7 @@ cat < $cfg $cfg ietf-netconf:startup 42 - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_xml_trees.sh b/test/test_xml_trees.sh index d98e7e79..5334f54a 100755 --- a/test/test_xml_trees.sh +++ b/test/test_xml_trees.sh @@ -18,7 +18,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME diff --git a/test/test_xpath_functions.sh b/test/test_xpath_functions.sh index e09204f1..79733f01 100755 --- a/test/test_xpath_functions.sh +++ b/test/test_xpath_functions.sh @@ -16,7 +16,7 @@ fyang=$dir/$APPNAME.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang.sh b/test/test_yang.sh index c0aa9a5c..d35e31cc 100755 --- a/test/test_yang.sh +++ b/test/test_yang.sh @@ -14,7 +14,7 @@ fyangerr=$dir/err.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_anydata.sh b/test/test_yang_anydata.sh index 07848f90..a54d9f39 100755 --- a/test/test_yang_anydata.sh +++ b/test/test_yang_anydata.sh @@ -132,7 +132,7 @@ function testrun() $cfg clixon-restconf:allow-auth-none - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $dir/yang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_bind.sh b/test/test_yang_bind.sh index ad315278..b6307038 100755 --- a/test/test_yang_bind.sh +++ b/test/test_yang_bind.sh @@ -26,7 +26,7 @@ ftop=$dir/top.xml cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_default.sh b/test/test_yang_default.sh index 35587c7b..24946a36 100755 --- a/test/test_yang_default.sh +++ b/test/test_yang_default.sh @@ -20,7 +20,7 @@ cat < $cfg $cfg ietf-netconf:startup 42 - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/backend diff --git a/test/test_yang_deviation.sh b/test/test_yang_deviation.sh index 54481823..eecb5a8e 100755 --- a/test/test_yang_deviation.sh +++ b/test/test_yang_deviation.sh @@ -18,7 +18,7 @@ fyangdev=$dir/example-deviations.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $dir /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_extension.sh b/test/test_yang_extension.sh index de29cc7f..d696ca42 100755 --- a/test/test_yang_extension.sh +++ b/test/test_yang_extension.sh @@ -28,7 +28,7 @@ fyang=$dir/$APPNAME.yang cat < $cfg $cfg - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang /usr/local/lib/$APPNAME/clispec diff --git a/test/test_yang_load.sh b/test/test_yang_load.sh index 64185f37..242d2f66 100755 --- a/test/test_yang_load.sh +++ b/test/test_yang_load.sh @@ -61,7 +61,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang1 /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile @@ -113,7 +113,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang2 /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile @@ -160,7 +160,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} example /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile @@ -202,7 +202,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} example $OLDDATE /usr/local/var/$APPNAME/$APPNAME.sock @@ -246,7 +246,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir /usr/local/var/$APPNAME/$APPNAME.sock /usr/local/var/$APPNAME/$APPNAME.pidfile @@ -290,7 +290,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $fyang2 /usr/local/var/$APPNAME/$APPNAME.sock @@ -334,7 +334,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir example $OLDDATE @@ -379,7 +379,7 @@ cat < $cfg $cfg $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} $fyang2 example $NEWDATE diff --git a/test/test_yang_models_ieee.sh b/test/test_yang_models_ieee.sh index 60395516..4a95cabd 100755 --- a/test/test_yang_models_ieee.sh +++ b/test/test_yang_models_ieee.sh @@ -22,7 +22,7 @@ cat < $cfg $cfg ni-ieee1588-ptp:cmlds - /usr/local/share/clixon + ${YANG_INSTALLDIR} ${YANG_STANDARD_DIR}/ietf/RFC ${YANG_STANDARD_DIR}/ieee/draft/802.1/Qcr ${YANG_STANDARD_DIR}/ieee/draft/802 diff --git a/test/test_yang_models_ietf.sh b/test/test_yang_models_ietf.sh index 55ab9ea7..8a3fca62 100755 --- a/test/test_yang_models_ietf.sh +++ b/test/test_yang_models_ietf.sh @@ -24,7 +24,7 @@ cat < $cfg ietf-te-topology:template ietf-te-topology:te-topology-hierarchy ietf-te-types:path-optimization-metric - /usr/local/share/clixon + ${YANG_INSTALLDIR} ${YANG_STANDARD_DIR}/ieee/published/802.1 ${YANG_STANDARD_DIR}/ietf/RFC true diff --git a/test/test_yang_namespace.sh b/test/test_yang_namespace.sh index 2b557196..6f65857c 100755 --- a/test/test_yang_namespace.sh +++ b/test/test_yang_namespace.sh @@ -21,7 +21,7 @@ cat < $cfg $cfg clixon-restconf:allow-auth-none $dir - /usr/local/share/clixon + ${YANG_INSTALLDIR} /usr/local/lib/$APPNAME/clispec /usr/local/lib/$APPNAME/cli $APPNAME diff --git a/test/test_yang_when.sh b/test/test_yang_when.sh index 0dcb3dbc..58ab7c29 100755 --- a/test/test_yang_when.sh +++ b/test/test_yang_when.sh @@ -27,7 +27,7 @@ cat < $cfg $cfg ietf-netconf:startup - /usr/local/share/clixon + ${YANG_INSTALLDIR} $dir $dir /usr/local/lib/$APPNAME/backend