From 11a065850175f898c1b8a938efe435164bed4c5e Mon Sep 17 00:00:00 2001 From: Max Rottenkolber Date: Fri, 19 Jun 2015 15:43:39 +0200 Subject: [PATCH] Move test_env to program/snabbnfv/test_env. --- src/program/snabbnfv/README-selftest.md | 52 ------------------- src/program/snabbnfv/selftest.sh | 2 +- .../snabbnfv}/test_env/README.md | 2 +- .../snabbnfv}/test_env/test_env.sh | 0 4 files changed, 2 insertions(+), 54 deletions(-) delete mode 100644 src/program/snabbnfv/README-selftest.md rename src/{scripts => program/snabbnfv}/test_env/README.md (98%) rename src/{scripts => program/snabbnfv}/test_env/test_env.sh (100%) diff --git a/src/program/snabbnfv/README-selftest.md b/src/program/snabbnfv/README-selftest.md deleted file mode 100644 index 53061a0c9d..0000000000 --- a/src/program/snabbnfv/README-selftest.md +++ /dev/null @@ -1,52 +0,0 @@ -## Snabbnfv-traffic Selftest - -The `selftest.sh` script uses `bench_env` to provide quite extensive -integration test suite for `src/designs/snabbnfv-traffic`. It boots two -virtual machines (guests) connected by a `snabbnfv-traffic` instance and -runs shell commands on these guests to assert properties of a given `nfv -configuration`. - -For more details see [Testing NFV Functionality](/~https://github.com/eugeneia/snabbswitch/wiki/Testing-NFV-functionality). - -### How To: Run this test suite - -#### Prerequistes - -* An account on `chur`, see [Snabb Lab](/~https://github.com/SnabbCo/snabbswitch/wiki/Snabb-Lab) -* A copy of the `snabbswitch` repository - -#### Step-by-Step Setup (on `chur`) - -Step 1: Copy `/opt/test` to your home directory: - -``` -$ cp -r /opt/test ~/ -``` - -Step 2: Softlink `~/test/bench_conf.sh` to `~/bench_conf.sh`. - -``` -$ ln -s ~/test/bench_conf.sh ~/bench_conf.sh -``` - -Step 3: Edit `~/test/bench_conf.sh` and replace `` with the PCI -address of the Intel 10-G NIC you want to use (e.g. `0000:88:00.0`). Note: -You should also adjust `TELNET_PORT0` and `TELNET_PORT1` to avoid port -clashes with other `bench_env` users on the system. - -Your done. Run the test suite from the `snabbswitch/src` directory like -so (assuming your `snabbswitch` repository is located at -`~/snabbswitch/`): - -``` -$ cd ~/snabbswitch/src -$ sudo program/snabbnfv/selftest.sh -[...] -``` - -#### Customizing Your Setup - -Consult `src/scripts/bench_env/README` on how to create custom guest -images. In order for `src/program/snabbnfv/selftest.sh` to run the -following packages must be present on the guest: `ethtool`, `iperf`, -`tcpdump` and `netcat`. diff --git a/src/program/snabbnfv/selftest.sh b/src/program/snabbnfv/selftest.sh index 257f9c2bbb..4af5828a77 100755 --- a/src/program/snabbnfv/selftest.sh +++ b/src/program/snabbnfv/selftest.sh @@ -38,7 +38,7 @@ function load_config { } function start_test_env { - if ! source scripts/test_env/test_env.sh; then + if ! source program/snabbnfv/test_env/test_env.sh; then echo "Could not load test_env."; exit 1 fi diff --git a/src/scripts/test_env/README.md b/src/program/snabbnfv/test_env/README.md similarity index 98% rename from src/scripts/test_env/README.md rename to src/program/snabbnfv/test_env/README.md index 7e3a41bc42..915eadce0e 100644 --- a/src/scripts/test_env/README.md +++ b/src/program/snabbnfv/test_env/README.md @@ -11,7 +11,7 @@ Load `test_env`: ``` cd snabbswitch/src -source scripts/test_env/test_env.sh +source program/snabbnfv/test_env/test_env.sh ``` To start a Snabb Switch instance using ``: diff --git a/src/scripts/test_env/test_env.sh b/src/program/snabbnfv/test_env/test_env.sh similarity index 100% rename from src/scripts/test_env/test_env.sh rename to src/program/snabbnfv/test_env/test_env.sh