summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rw-r--r--tests/topotests/Dockerfile1
-rwxr-xr-xtests/topotests/docker/build.sh4
-rwxr-xr-xtests/topotests/docker/frr-topotests.sh10
-rw-r--r--tests/topotests/subdir.am7
5 files changed, 13 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index d12d452645..c56a551aa5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -149,6 +149,7 @@ include yang/libyang_plugins/subdir.am
include vtysh/subdir.am
include tests/subdir.am
+include tests/topotests/subdir.am
if PKGSRC
rcdir=@pkgsrcrcdir@
diff --git a/tests/topotests/Dockerfile b/tests/topotests/Dockerfile
index 4a07336a19..72a876ed83 100644
--- a/tests/topotests/Dockerfile
+++ b/tests/topotests/Dockerfile
@@ -71,7 +71,6 @@ RUN echo "" >> /etc/security/limits.conf; \
# Copy run scripts to facilitate users wanting to run the tests
COPY docker/inner /opt/topotests
-COPY . /root/topotests
WORKDIR /root/topotests
ENV PATH "$PATH:/opt/topotests"
diff --git a/tests/topotests/docker/build.sh b/tests/topotests/docker/build.sh
index 47b14df0b0..344fb2ffcb 100755
--- a/tests/topotests/docker/build.sh
+++ b/tests/topotests/docker/build.sh
@@ -22,7 +22,9 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
+cd "$(dirname "$0")"/..
+
exec docker build --pull \
--compress \
- -t frrouting/topotests \
+ -t frrouting/frr:topotests-latest \
.
diff --git a/tests/topotests/docker/frr-topotests.sh b/tests/topotests/docker/frr-topotests.sh
index 6ddfdc9484..9a157c49a8 100755
--- a/tests/topotests/docker/frr-topotests.sh
+++ b/tests/topotests/docker/frr-topotests.sh
@@ -61,9 +61,6 @@ if [[ "$1" = "-h" ]] || [[ "$1" = "--help" ]]; then
TOPOTEST_OPTIONS These options are appended to the docker-run
command for starting the tests.
- TOPOTEST_PATH If set, don't use the tests built into the image
- but the ones at the given path.
-
TOPOTEST_SANITIZER Controls whether to use the address sanitizer.
Enabled by default, set to 0 to disable.
@@ -136,6 +133,7 @@ fi
set -- --rm -ti \
-v "$TOPOTEST_LOGS:/tmp" \
-v "$TOPOTEST_FRR:/root/host-frr:ro" \
+ -v "$TOPOTEST_FRR/tests/topotests:/root/topotests:ro" \
-v "$TOPOTEST_BUILDCACHE:/root/persist" \
-e "TOPOTEST_CLEAN=$TOPOTEST_CLEAN" \
-e "TOPOTEST_VERBOSE=$TOPOTEST_VERBOSE" \
@@ -143,10 +141,6 @@ set -- --rm -ti \
-e "TOPOTEST_SANITIZER=$TOPOTEST_SANITIZER" \
--privileged \
$TOPOTEST_OPTIONS \
- frrouting/topotests "$@"
-
-if [ -n "$TOPOTEST_PATH" ]; then
- set -- -v "$TOPOTEST_PATH:/root/topotests:ro" "$@"
-fi
+ frrouting/frr:topotests-latest "$@"
exec docker run "$@"
diff --git a/tests/topotests/subdir.am b/tests/topotests/subdir.am
new file mode 100644
index 0000000000..e489f92bfa
--- /dev/null
+++ b/tests/topotests/subdir.am
@@ -0,0 +1,7 @@
+TOPOTESTS_DIR = tests/topotests
+
+topotests-build: ## Builds docker images for topotests
+ $(TOPOTESTS_DIR)/docker/build.sh
+
+topotests: ## Runs topotests
+ $(TOPOTESTS_DIR)/docker/frr-topotests.sh