From 2957e4a3769dc997ad0d00f8f5bc9fdaa7b03815 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 3 Nov 2015 18:57:14 +0000 Subject: [PATCH 1/1] Testing: Break out srcdump-prep Remove a bit more of this boilerplate. Signed-off-by: Ian Jackson --- tests/autotest | 6 ++++++ tests/srcdump-login.at | 4 +--- tests/srcdump-loginback.at | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/autotest b/tests/autotest index 4737b1e..4fc5068 100755 --- a/tests/autotest +++ b/tests/autotest @@ -98,6 +98,12 @@ proc loginas {user {password sesame} {wanttxt ACCESSGRANTED}} { submitform-expect $wanttxt } +proc srcdump-prep {} { + global timeout env + set env(CAFTEST_NOSRCDUMP) 0 + set timeout [expr {$timeout * 3}] +} + proc srcdump-save-check {} { global tt global outertar sd files diff --git a/tests/srcdump-login.at b/tests/srcdump-login.at index 895fa36..6d7d0c9 100644 --- a/tests/srcdump-login.at +++ b/tests/srcdump-login.at @@ -17,9 +17,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. -set env(CAFTEST_NOSRCDUMP) 0 - -set timeout [expr {$timeout * 3}] +srcdump-prep dospawn diff --git a/tests/srcdump-loginback.at b/tests/srcdump-loginback.at index 4a2e402..856a6f2 100644 --- a/tests/srcdump-loginback.at +++ b/tests/srcdump-loginback.at @@ -17,9 +17,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. -set env(CAFTEST_NOSRCDUMP) 0 - -set timeout [expr {$timeout * 3}] +srcdump-prep dospawn -- 2.30.2