BIND 10 master, updated. 58757c09f3b72768da9a43f1affa7120ebbdeba8 [master] Merge branch 'trac1878'
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed May 2 09:24:20 UTC 2012
The branch, master has been updated
via 58757c09f3b72768da9a43f1affa7120ebbdeba8 (commit)
via 3e6773dbdbc31ca20637455b110c2907daf2ce0c (commit)
via c016b74723d24469961682defaee0034bb8b5920 (commit)
via 84a0413302fa935314dd81a352aeb6d746cbbf3a (commit)
via dc142a44a0a0de3d9278937bdb0d70c545e6da6e (commit)
via 8df566b82de165047fceccf6b4eda1974f3e78e5 (commit)
from 2f7b1a1865ae1c8b981d5f6396ae612421be764b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 58757c09f3b72768da9a43f1affa7120ebbdeba8
Merge: 2f7b1a1865ae1c8b981d5f6396ae612421be764b 3e6773dbdbc31ca20637455b110c2907daf2ce0c
Author: Jelte Jansen <jelte at isc.org>
Date: Wed May 2 11:06:55 2012 +0200
[master] Merge branch 'trac1878'
commit 3e6773dbdbc31ca20637455b110c2907daf2ce0c
Author: Jelte Jansen <jelte at isc.org>
Date: Wed May 2 11:06:40 2012 +0200
[1878] use . instead of source
-----------------------------------------------------------------------
Summary of changes:
tests/lettuce/README | 20 ++++++++------------
tests/lettuce/README.tutorial | 4 ++--
tests/lettuce/features/terrain/terrain.py | 12 +++++++++++-
.../__init__.py => tests/lettuce/run_lettuce.sh | 14 +++++++++++---
tests/lettuce/setup_intree_bind10.sh.in | 2 ++
5 files changed, 34 insertions(+), 18 deletions(-)
copy src/lib/python/isc/testutils/__init__.py => tests/lettuce/run_lettuce.sh (77%)
mode change 100644 => 100755
mode change 100755 => 100644 tests/lettuce/setup_intree_bind10.sh.in
-----------------------------------------------------------------------
diff --git a/tests/lettuce/README b/tests/lettuce/README
index 21a57c7..94bf82b 100644
--- a/tests/lettuce/README
+++ b/tests/lettuce/README
@@ -6,7 +6,7 @@ these tests are specific for BIND10, but we are keeping in mind that RFC-related
tests could be separated, so that we can test other systems as well.
Prerequisites:
-- Installed version of BIND 10 (but see below how to run it from source tree)
+- BIND 10 must be compiled or installed
- dig
- lettuce (http://lettuce.it)
@@ -26,27 +26,23 @@ Port 47805 is used for cmdctl, and must also be available.
(note, we will need to extend this to a range, or if possible, we will need to
do some on-the-fly available port finding)
-The bind10 main program, bindctl, and dig must all be in the default search
-path of your environment, and BIND 10 must not be running if you use the
-installed version when you run the tests.
+You can run the lettuce tests with the provided run_lettuce.sh script.
-If you want to test an installed version of bind 10, just run 'lettuce' in
-this directory.
+By default it will use the build tree, but you can use an installed version
+of bind10 by passing -I as the first argument of run_lettuce.sh
-We have provided a script that sets up the shell environment to run the tests
-with the build tree version of bind. If your shell uses export to set
-environment variables, you can source the script setup_intree_bind10.sh, then
-run lettuce.
+The tool 'dig' must be in the default search path of your environment. If
+you specified -I, so must the main bind10 program, as well as bindctl.
Due to the default way lettuce prints its output, it is advisable to run it
in a terminal that is wide than the default. If you see a lot of lines twice
in different colors, the terminal is not wide enough.
If you just want to run one specific feature test, use
-lettuce features/<feature file>
+run_lettuce.sh [-I] features/<feature file>
To run a specific scenario from a feature, use
-lettuce features/<feature file> -s <scenario number>
+run_lettuce.sh [-I] features/<feature file> -s <scenario number>
We have set up the tests to assume that lettuce is run from this directory,
so even if you specify a specific feature file, you should do it from this
diff --git a/tests/lettuce/README.tutorial b/tests/lettuce/README.tutorial
index c7d3cd7..7d1c801 100644
--- a/tests/lettuce/README.tutorial
+++ b/tests/lettuce/README.tutorial
@@ -54,7 +54,7 @@ The one scenario we have has no steps, so if we run it we should
see something like:
-- output
-> lettuce
+> ./run_lettuce.sh
Feature: showing off BIND 10
This is to show BIND 10 running and that it answer queries
@@ -95,7 +95,7 @@ it to be started before we continue.
And let's run the tests again.
--
-> lettuce
+> ./run_lettuce.sh
Feature: showing off BIND 10
This is to show BIND 10 running and that it answer queries
diff --git a/tests/lettuce/features/terrain/terrain.py b/tests/lettuce/features/terrain/terrain.py
index 753d912..5ae6cd6 100644
--- a/tests/lettuce/features/terrain/terrain.py
+++ b/tests/lettuce/features/terrain/terrain.py
@@ -28,6 +28,7 @@ import subprocess
import os.path
import shutil
import re
+import sys
import time
# In order to make sure we start all tests with a 'clean' environment,
@@ -383,4 +384,13 @@ def cleanup(scenario):
world.processes.keep_files()
# Stop any running processes we may have had around
world.processes.stop_all_processes()
-
+
+# Environment check
+# Checks if LETTUCE_SETUP_COMPLETED is set in the environment
+# If not, abort with an error to use the run-script
+if 'LETTUCE_SETUP_COMPLETED' not in os.environ:
+ print("Environment check failure; LETTUCE_SETUP_COMPLETED not set")
+ print("Please use the run_lettuce.sh script. If you want to test an")
+ print("installed version of bind10 with these tests, use")
+ print("run_lettuce.sh -I [lettuce arguments]")
+ sys.exit(1)
diff --git a/tests/lettuce/run_lettuce.sh b/tests/lettuce/run_lettuce.sh
new file mode 100755
index 0000000..9580dce
--- /dev/null
+++ b/tests/lettuce/run_lettuce.sh
@@ -0,0 +1,25 @@
+#! /bin/sh
+
+# Copyright (C) 2012 Internet Systems Consortium.
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM
+# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+if [ "$1" = "-I" ]; then
+ shift
+ echo "$@"
+ LETTUCE_SETUP_COMPLETED=1 exec lettuce $@
+else
+ . ./setup_intree_bind10.sh
+ exec lettuce $@
+fi
diff --git a/tests/lettuce/setup_intree_bind10.sh.in b/tests/lettuce/setup_intree_bind10.sh.in
old mode 100755
new mode 100644
index 9d72778..4ccf6ca
--- a/tests/lettuce/setup_intree_bind10.sh.in
+++ b/tests/lettuce/setup_intree_bind10.sh.in
@@ -44,3 +44,5 @@ export B10_FROM_BUILD
BIND10_MSGQ_SOCKET_FILE=@abs_top_builddir@/msgq_socket
export BIND10_MSGQ_SOCKET_FILE
+
+export LETTUCE_SETUP_COMPLETED=1
More information about the bind10-changes
mailing list