]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: allow TEST_DIR and CHRONYC_WRAPPER to be set for system tests
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 25 Apr 2019 15:24:37 +0000 (17:24 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 25 Apr 2019 15:29:34 +0000 (17:29 +0200)
test/system/test.common

index 6a2f69718a2b4d12b5b822603d149d3399dba5bf..d83d9b64381c33a4379d92fa09af9153983f94e7 100644 (file)
@@ -15,7 +15,7 @@
 
 export LC_ALL=C
 export PATH=${CHRONY_PATH:-../..}:$PATH
-export TEST_DIR=$(pwd)/tmp
+export TEST_DIR=${TEST_DIR:-$(pwd)/tmp}
 
 test_start() {
        check_chronyd_features NTP CMDMON || test_skip "NTP/CMDMON support disabled"
@@ -304,7 +304,8 @@ check_chronyd_files() {
 run_chronyc() {
        test_message 1 0 "running chronyc $*"
 
-       "$chronyc" -h "$(get_cmdsocket)" -n -m "$@" > "$TEST_DIR/chronyc.out" && test_ok || test_error
+       $CHRONYC_WRAPPER "$chronyc" -h "$(get_cmdsocket)" -n -m "$@" > "$TEST_DIR/chronyc.out" && \
+               test_ok || test_error
 }
 
 # Compare chronyc output with specified pattern