Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 1.65 KB

README.md

File metadata and controls

59 lines (36 loc) · 1.65 KB

gNMI test scenarios

This directory contains multiple .cdlang files that contain gNMI test scenarios.

To build and execute those tests you should execute:

bazel run //stratum/testing/scenarios:scenarios_test

This command will trigger the following actions:

  1. Compilation of the cdl_tool from the //stratum/testing/cdlang directory (if not present)

  2. Compilation of all .cdlang files

  3. Generation of //bazel-genfiles/stratum/testing/scenarios/scenarios.cc that implements the tests defined in the .cdlang files

  4. Compilation of bazel-genfiles/stratum/testing/scenarios/scenarios.cc

  5. Compilation of required libraries (like implementation of gNMI protobufs)

  6. Linkage of the pieces into one executable: sceanrios_test

  7. Execution of the scearios_test executable that will run the scenarios against a gNMI server that is reachable at localhost:9339.

If the gNMI server is not located on the same host, its address should be provided by using the --gnmi_url option. For example:

bazel run //stratum/testing/scenarios:scenarios_test -- --gnmi_url bmv2.company:9339

Files in this directory

  • BUILD - the bazel build file

  • README.md - this file

  • test_main.cc - the main test file that contains the main() function

  • scenarios.cc.tmpl and lib.cc.tmpl - Golang text template files used to generate C++ code implementig the scenarios

How to contribute

Just create new gNMI test scenarios and put them into separate .cdlang files.

That's it. Nothing else needs to be touched and/or modified!