osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38260?usp=email )
( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: testenv/README: document current working dir ...................................................................... testenv/README: document current working dir Change-Id: I218507bcbec94a36976fbf57d12ffd083fd2acfb --- M _testenv/README.md 1 file changed, 23 insertions(+), 5 deletions(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/_testenv/README.md b/_testenv/README.md index 82903a1..983692c 100644 --- a/_testenv/README.md +++ b/_testenv/README.md @@ -55,14 +55,14 @@ * `clean=`: optional script to run before running the testsuite and on exit. This can be used to clean up network devices for example, or to fix name collisions when running a test with multiple configs - (`rename_junit_xml_classname.sh`). See below for `PATH`. A + (`rename_junit_xml_classname.sh`). See below for `PATH` and `PWD`. A `TESTENV_CLEAN_REASON` env var is set to `prepare`, `crashed` or `finished` depending on when the script runs. #### Component section * `program=`: executable for starting a test component, may contain arguments. - See below for `PATH`. + See below for `PATH` and `PWD`. * `copy=`: file(s) to copy from the testsuite directory to the test directory, like `.cfg` and `.confmerge` files. Multiple values are separated by spaces. @@ -78,12 +78,12 @@ * `prepare=`: optional script to run before staring the program (after files are copied to the test directory). Typically this is used to create configs - with `osmo-config-merge`. See below for `PATH`. + with `osmo-config-merge`. See below for `PATH` and `PWD`. * `setup=`: optional script to run after the program was started. Execution of the next program / the testsuite will wait until the setup script has quit. This can be used to wait until the program is ready or to fill a test - database for example. See below for `PATH`. + database for example. See below for `PATH` and `PWD`. * `clean=`: same as in the Testsuite section above, but runs at a slightly different time: before/after/on crash of the program instead of the @@ -96,7 +96,9 @@ * `vty_host=`: optionally set the VTY host for the SUT component to be used when obtaining a talloc report. If this is not set, `127.0.0.1` is used. -### PATH +### Executables + +#### $PATH Executables mentioned in `program=`, `prepare=`, `setup=` and `clean=` run with a `PATH` environment variable containing: @@ -105,6 +107,22 @@ * The directory for binaries built from source * The directory `_testenv/data/scripts` (which has e.g. `respawn.sh`) +#### $PWD (current working dir) + +The executables run inside a directory with the component name, inside the log +dir. For example: + +``` +/tmp/logs +├── ggsn # Executables from [ggsn] section run in this dir +│ ├── ggsn.log +│ └── osmo-ggsn.cfg +└── testsuite # Executables from [testsuite] run in this dir + ├── Common.cfg + ├── GGSN_Tests.cfg + └── GGSN_Tests.default +``` + ### Latest configs Sometimes we need to run test components and/or testsuites with different -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38260?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I218507bcbec94a36976fbf57d12ffd083fd2acfb Gerrit-Change-Number: 38260 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: osmith <[email protected]> Gerrit-Reviewer: pespin <[email protected]>
