diff --git a/src/testsuite/testsuite-variables.c b/src/testsuite/testsuite-variables.c index b80700a43415a1e9add95470f9490426497b7758..46ac9270bd67b9c78f3ac81ec781571e1bcebd88 100644 --- a/src/testsuite/testsuite-variables.c +++ b/src/testsuite/testsuite-variables.c @@ -77,7 +77,7 @@ bool testsuite_varnamespace_validate name_element = array_idx(var_name, 1); if ( name_element->num_variable >= 0 ) { sieve_argument_validate_error(valdtr, arg, - "testsuite: invalid variable name within testsuite namespace 'testsuite.%d': " + "testsuite: invalid variable name within testsuite namespace 'tst.%d': " "encountered numeric variable name", name_element->num_variable); return FALSE; } diff --git a/tests/plugins/extprograms/bin/sleep10 b/tests/plugins/extprograms/bin/sleep10 new file mode 100755 index 0000000000000000000000000000000000000000..8c1b96df8333b24a510a5fcbcf023f89449e4c1b --- /dev/null +++ b/tests/plugins/extprograms/bin/sleep10 @@ -0,0 +1,3 @@ +#!/bin/sh + +sleep 10 diff --git a/tests/plugins/extprograms/execute/command.svtest b/tests/plugins/extprograms/execute/command.svtest index ecb3790ee8a3a9f5b5e7fca33b6ad50035686d69..92c1fd13e6ca64e8668c1e5704d84fabe76c650a 100644 --- a/tests/plugins/extprograms/execute/command.svtest +++ b/tests/plugins/extprograms/execute/command.svtest @@ -2,7 +2,7 @@ require "vnd.dovecot.testsuite"; require "vnd.dovecot.execute"; require "variables"; -test_config_set "sieve_execute_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_execute_bin_dir" "${tst.path}/../bin"; test_config_reload :extension "vnd.dovecot.execute"; test "Basic" { diff --git a/tests/plugins/extprograms/execute/errors.svtest b/tests/plugins/extprograms/execute/errors.svtest index 0601ba7bf4b58fb4e60b3d99a51921634fd20080..b08e77ce0811a9896001c73b79c5324081af4dbb 100644 --- a/tests/plugins/extprograms/execute/errors.svtest +++ b/tests/plugins/extprograms/execute/errors.svtest @@ -3,6 +3,9 @@ require "vnd.dovecot.testsuite"; require "relational"; require "comparator-i;ascii-numeric"; +test_config_set "sieve_execute_bin_dir" "${tst.path}/../bin"; +test_config_reload :extension "vnd.dovecot.execute"; + /* * Command syntax */ diff --git a/tests/plugins/extprograms/execute/execute.svtest b/tests/plugins/extprograms/execute/execute.svtest index 1f9208133c18e051f580a70d05ee493a9e6f3c78..bd2d2d3d188876e31e4a9ff5eee91298651e8dee 100644 --- a/tests/plugins/extprograms/execute/execute.svtest +++ b/tests/plugins/extprograms/execute/execute.svtest @@ -14,7 +14,7 @@ Frop! . ; -test_config_set "sieve_execute_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_execute_bin_dir" "${tst.path}/../bin"; test_config_reload :extension "vnd.dovecot.execute"; test_result_reset; diff --git a/tests/plugins/extprograms/filter/command.svtest b/tests/plugins/extprograms/filter/command.svtest index dcf2c98233ba265fddcc15dd4c9ea52054734a62..50f949a410c426babd8a22f21060244647128467 100644 --- a/tests/plugins/extprograms/filter/command.svtest +++ b/tests/plugins/extprograms/filter/command.svtest @@ -2,7 +2,7 @@ require "vnd.dovecot.testsuite"; require "vnd.dovecot.filter"; require "variables"; -test_config_set "sieve_filter_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_filter_bin_dir" "${tst.path}/../bin"; test_config_reload :extension "vnd.dovecot.filter"; test "Basic" { diff --git a/tests/plugins/extprograms/filter/errors.svtest b/tests/plugins/extprograms/filter/errors.svtest index 9d473119e9f4c800726996a7fddb7913cbae2daa..3461c019229ed27e5737feb42f2da1fbc4a3d5cc 100644 --- a/tests/plugins/extprograms/filter/errors.svtest +++ b/tests/plugins/extprograms/filter/errors.svtest @@ -7,6 +7,9 @@ require "comparator-i;ascii-numeric"; * Command syntax */ +test_config_set "sieve_filter_bin_dir" "${tst.path}/../bin"; +test_config_reload :extension "vnd.dovecot.filter"; + test "Command syntax" { if test_script_compile "errors/syntax.sieve" { test_fail "compile should have failed"; diff --git a/tests/plugins/extprograms/filter/execute.svtest b/tests/plugins/extprograms/filter/execute.svtest index a36a9e5ce8db9577a716f1c45a105372cfb123e8..a952c5514a1c440e7e2db4a4d9663aaa3484371c 100644 --- a/tests/plugins/extprograms/filter/execute.svtest +++ b/tests/plugins/extprograms/filter/execute.svtest @@ -16,7 +16,7 @@ Frop! . ; -test_config_set "sieve_filter_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_filter_bin_dir" "${tst.path}/../bin"; test_config_reload :extension "vnd.dovecot.filter"; test_result_reset; diff --git a/tests/plugins/extprograms/pipe/command.svtest b/tests/plugins/extprograms/pipe/command.svtest index 3c63500f4f16b65117ac4e5b1f688dbd382c56ef..dabd9707dbd249917c508f4bffdb6fa630dcd3e8 100644 --- a/tests/plugins/extprograms/pipe/command.svtest +++ b/tests/plugins/extprograms/pipe/command.svtest @@ -1,7 +1,7 @@ require "vnd.dovecot.testsuite"; require "vnd.dovecot.pipe"; -test_config_set "sieve_pipe_dir" "./"; +test_config_set "sieve_pipe_bin_dir" "${tst.path}/../bin"; test_config_reload :extension "vnd.dovecot.pipe"; test "Basic" { diff --git a/tests/plugins/extprograms/pipe/errors.svtest b/tests/plugins/extprograms/pipe/errors.svtest index d9eef5a2bd6ada8ac15f6dce3d8d767288652572..4987fbc1914ed32fac66789c172eb5bf22497b79 100644 --- a/tests/plugins/extprograms/pipe/errors.svtest +++ b/tests/plugins/extprograms/pipe/errors.svtest @@ -1,4 +1,5 @@ require "vnd.dovecot.testsuite"; +require "variables"; require "relational"; require "comparator-i;ascii-numeric"; @@ -28,7 +29,7 @@ Frop! . ; -test_config_set "sieve_pipe_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_pipe_bin_dir" "${tst.path}/../bin"; test_config_set "sieve_pipe_exec_timeout" "1s"; test_config_reload :extension "vnd.dovecot.pipe"; test_result_reset; diff --git a/tests/plugins/extprograms/pipe/errors/timeout.sieve b/tests/plugins/extprograms/pipe/errors/timeout.sieve index 61b55af22f826226dc24fa9ec39faecf706e44a3..7a940c8c1835804da04fa032b6f68c3bbe902ff5 100644 --- a/tests/plugins/extprograms/pipe/errors/timeout.sieve +++ b/tests/plugins/extprograms/pipe/errors/timeout.sieve @@ -1,3 +1,3 @@ require "vnd.dovecot.pipe"; -pipe "sleep2"; +pipe "sleep10"; diff --git a/tests/plugins/extprograms/pipe/execute.svtest b/tests/plugins/extprograms/pipe/execute.svtest index cf8bad775ee4a34d94718d819245dd29ac3ca9c7..34b67980579e275cef476597c1daef2307ec2de2 100644 --- a/tests/plugins/extprograms/pipe/execute.svtest +++ b/tests/plugins/extprograms/pipe/execute.svtest @@ -14,7 +14,7 @@ Frop! /* Basic pipe */ -test_config_set "sieve_pipe_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_pipe_bin_dir" "${tst.path}/../bin"; test_config_reload :extension "vnd.dovecot.pipe"; test_result_reset; @@ -28,7 +28,7 @@ test "Pipe" { /* Timeout */ -test_config_set "sieve_pipe_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_pipe_bin_dir" "${tst.path}/../bin"; test_config_set "sieve_pipe_exec_timeout" "3s"; test_config_reload :extension "vnd.dovecot.pipe"; test_result_reset; @@ -42,7 +42,7 @@ test "Timeout 3s" { } test_result_reset; -test_config_set "sieve_pipe_bin_dir" "./tests/plugins/extprograms/bin"; +test_config_set "sieve_pipe_bin_dir" "${tst.path}/../bin"; test_config_set "sieve_pipe_exec_timeout" "0"; test_config_reload :extension "vnd.dovecot.pipe"; test_result_reset;