From 35c7ebadd2022309eaabfaa13d05e179f83dcf85 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Fri, 19 Apr 2013 09:45:15 +0200 Subject: [PATCH] Fixed distcheck failure on sieve_extprograms plugin testsuite. --- src/testsuite/testsuite-variables.c | 2 +- tests/plugins/extprograms/bin/sleep10 | 3 +++ tests/plugins/extprograms/execute/command.svtest | 2 +- tests/plugins/extprograms/execute/errors.svtest | 3 +++ tests/plugins/extprograms/execute/execute.svtest | 2 +- tests/plugins/extprograms/filter/command.svtest | 2 +- tests/plugins/extprograms/filter/errors.svtest | 3 +++ tests/plugins/extprograms/filter/execute.svtest | 2 +- tests/plugins/extprograms/pipe/command.svtest | 2 +- tests/plugins/extprograms/pipe/errors.svtest | 3 ++- tests/plugins/extprograms/pipe/errors/timeout.sieve | 2 +- tests/plugins/extprograms/pipe/execute.svtest | 6 +++--- 12 files changed, 21 insertions(+), 11 deletions(-) create mode 100755 tests/plugins/extprograms/bin/sleep10 diff --git a/src/testsuite/testsuite-variables.c b/src/testsuite/testsuite-variables.c index b80700a43..46ac9270b 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 000000000..8c1b96df8 --- /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 ecb3790ee..92c1fd13e 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 0601ba7bf..b08e77ce0 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 1f9208133..bd2d2d3d1 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 dcf2c9823..50f949a41 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 9d473119e..3461c0192 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 a36a9e5ce..a952c5514 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 3c63500f4..dabd9707d 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 d9eef5a2b..4987fbc19 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 61b55af22..7a940c8c1 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 cf8bad775..34b679805 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; -- GitLab