Commit Graph

55 Commits

Author SHA1 Message Date
Oliver Smith c4f76c40d1 ttcn3: pgw: depend on osmo-uecups
Change-Id: I95b77ea1a9f4c31c8886dc3f613e545135da320d
2023-11-23 14:06:03 +01:00
Oliver Smith af3d692e89 ttcn3: fix missing test name in usage desc
Change-Id: I5be5ee227dac0969e12d284ec518019c75698754
2023-11-23 13:59:09 +01:00
Oliver Smith 1e497a2110 ttcn3: add aliases hss -> hss-ogs etc.
Some open5gs testsuites end in -ogs (hss, mme, ggsn), others do not
(pgw). Let the user omit -ogs and choose the right one automatically.

Change-Id: I64fb519c15cfff8a8b560d51ff8b6b5d1aada8f7
2023-11-23 12:34:33 +01:00
Oliver Smith 32eda24020 ttcn3: support hss-ogs, mme-ogs, pgw
Change-Id: I08d76e6c92e2e3eacacb02a5a6f6d589e5889499
2023-11-23 12:33:44 +01:00
Oliver Smith 7dcf8520c5 ttcn3: run_docker: remove :ro
Don't mount usr_local, var_local as read-only, so the environment is
more similar to our jenkins.

Fix for:
  + /data/upfd-setup.sh
  + command -v open5gs-upfd
  + upfd_bin=/usr/local/bin/open5gs-upfd
  + setcap cap_net_raw+ep /usr/local/bin/open5gs-upfd
  Failed to set capabilities on file '/usr/local/bin/open5gs-upfd': Read-only file system

Change-Id: I52d2989d91119f0f1673f49723f1055fe7428d15
2023-11-23 11:59:42 +01:00
Oliver Smith 5f8deb0ce6 ttcn3: remove unused functions
Change-Id: I1939f1262757899c1a75c6d51cffd2ab13815c0f
2023-11-23 11:59:33 +01:00
Oliver Smith 7c8e69da79 ttcn3: add ggsn-ogs
Change-Id: Id84047e56a6c07fbf0984eb6aedcecd4d7f3ae97
2023-11-22 12:52:46 +01:00
Oliver Smith 9b632661ec ttcn3.sh: enable color output from gcc
Change-Id: Idde8084ca981333be2fc2b369ea8f25881470654
2023-10-25 15:57:50 +02:00
Oliver Smith e92331ab65 ttcn3.sh: add arg to only run one test
Depends: docker-playground I1f45a05e089b429918096fcd64f7c02033d5a9dd
Change-Id: I07a76f6c58d379608ecadfc3ba845651929f668c
2023-10-13 12:56:21 +02:00
Oliver Smith 971de959d1 ttcn3.sh: add options for kernel tests
Change-Id: I2a569b6712d8930807750751c14ed4e18b325e02
2023-10-12 16:59:15 +02:00
Oliver Smith 238c7de87e ttcn3.sh: clean osmo-ttcn3-hacks too
Change-Id: Id0fdf5e3f0917e56e3c6abff54a2f886367252f5
2023-10-12 15:23:16 +02:00
Oliver Smith 375587cfa8 ttcn3.sh: use nproc for JOBS
Change-Id: I1971e7758e67a4260ae1398d510cb719db45d101
2023-10-10 13:33:11 +02:00
Oliver Smith f05527fc96 ttcn3.sh: use ccache
Use ccache for building Osmocom programs and TTCN-3 testsuites.

Change-Id: I800062d0379295a6905851db29e820ff16217653
2023-10-10 13:33:11 +02:00
Oliver Smith 44e1ba1eae ttcn3.sh: add clean argument
Change-Id: If779b87c02d01b877e44118db34bdf2c83dbf619
2023-10-10 13:33:11 +02:00
Oliver Smith d9c014a251 ttcn3.sh: add getopts
Add getopts parsing. The idea was to add support for setting a different
IMAGE_SUFFIX argument, but later on it became clear it is not worth
implementing here. Add the getopts logic anyway because it can be used
to add other arguments in the future.

Change-Id: If55a982d92b2a24a175ab7f3a8f048f054033dc2
2023-10-10 13:32:01 +02:00
Oliver Smith 5438073002 ttcn3: docker images: bullseye -> bookworm
Change-Id: I60eb16291c2e12d561043bb4b6e902ebad18bd38
2023-09-27 10:46:48 +02:00
Oliver Smith 0044430c27 ttcn3: build osmo-ggsn with --enable-gtp-linux
Order the opts files alphabetically while at it.

Change-Id: I40c197fc0dc2199dd5a7b0d1d820dee1338c1703
2023-07-18 16:10:04 +02:00
Oliver Smith 6f1a3f5ac6 ttcn3/ttcn3.sh: add osmo-ggsn
Order the list alphabetically while at it.

Change-Id: Ibdf30a0f87a4cc19c37c6337edff42fd4e56342a
2023-07-18 15:45:11 +02:00
Oliver Smith 3115b12e72 ttcn3.sh: refactor logic for building images 2023-04-20 13:10:30 +02:00
Oliver Smith 9326b3672a ttcn3.sh: build_testsuite: build docker img first 2023-04-20 12:56:15 +02:00
Oliver Smith 837d4d6e86 ttcn3/ttcn3.sh: adjust ttcn3-docker-run.sh path
The script was moved to the common dir in docker-playground.git, so
adjust the path here.
2023-04-17 14:20:34 +02:00
Oliver Smith 6711b4f76b ttcn3: support bsc-sccplite
Change-Id: I8dd4b1ab9f14240335b4f9055066d1b0b6cee2ea
2023-03-06 11:29:48 +01:00
Oliver Smith f44fd1b144 ttcn3: print testsuite_image
Change-Id: If3d5f31054217ae7d007bb005e7427558755d332
2023-03-06 11:24:26 +01:00
Oliver Smith 78a1e058f4 ttcn3: print dir_testsuite_docker if invalid
Change-Id: I54080ee2561a33b7ebf0dde90a93bd62bd3ec23b
2023-03-06 11:12:23 +01:00
Oliver Smith ba1cfcc875 ttcn3: colorize compiler output
Attach a tty to the docker container while building the testsuite, as
this is what "should_colorize()" checks for.

Related: b3dca57db9
Change-Id: I6d3c9e1e82b1cf4384b4abd3f1eed072d8fe6fde
2022-10-21 12:13:22 +02:00
Oliver Smith f3d71209ec ttcn3: build testsuite inside docker too
Build the ttcn3 testsuites inside docker, so there is no mismatch of
libraries between the host system and the docker container when
attempting to run the testsuite inside docker later (like jenkins does
it).

Change-Id: Ic89e32ed68848bb3b661f77775ed1520c9f44fd9
2022-10-18 15:58:32 +02:00
Vadim Yanitskiy 3d09dcf53a tmux/ttcn3-bsc-test.sh: configure 4 TRX instances for BTS2
Change-Id: I2294c788c1a7d37cb0492c8789b42d993e3f947b
2022-06-28 21:45:11 +07:00
Vadim Yanitskiy 4ffb62ef4e tmux/ttcn3-bsc-test.sh: pass missing features to osmo-bts-omldummy
Change-Id: I119b29885be71bf0d7535f5f9337748998ff1470
2022-05-27 21:16:50 +06:00
Vadim Yanitskiy bd768f6a5d tmux/ttcn3-bsc-test.sh: run osmo-bts-omldummy in single-trx mode
Change-Id: Ie18003922110219c5af1a8ba3ecdc305dcc325de
2022-05-27 21:11:55 +06:00
Oliver Smith d88ae26f2a ttcn3/ttcn3.sh: update DOCKER_IMG_BUILD
The testsuite is running in bullseye for some time, so build the Osmocom
programs in bullseye as well.

Depends: docker-playground I4cd05ef2c164dfb765ee365ab38b8dfd4f955ac6
Change-Id: Ie5be8dc976fb8ff37b6712f1cba434b2114c4bf8
2022-05-03 15:39:57 +02:00
Oliver Smith 202dcd8544 ttcn3/ttcn3.sh: update path to ttcn3-docker-run.sh
Change-Id: Idb90b0cedc263510a58c55524018781bcbcc2d66
2022-05-03 15:39:57 +02:00
Vadim Yanitskiy 1b68dbc826 ttcn3/tmux/ttcn3-bts-test.sh: fix incorrectly passed --trx arguments
For some reason, on Arch Linux:

  $ file /bin/sh
  /bin/sh: symbolic link to bash

  $ sh --version
  GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

the '--trx' arguments are getting passed incorrectly:

  $ ./fake_trx.py TRX1@127.0.0.1:5700/1
                  TRX2@127.0.0.1:5700/2
                  TRX3@127.0.0.1:5700/3
  fake_trx: error: unrecognized arguments: TRX1@127.0.0.1:5700/1
                                           TRX2@127.0.0.1:5700/2
                                           TRX3@127.0.0.1:5700/3

Let's send each argument separately.

Change-Id: Ibf28ac013c426baba491af45e2ae46f37685a402
2022-03-11 14:33:08 +03:00
Vadim Yanitskiy 5b3b14e5f7 ttcn3/tmux/ttcn3-bts-test.sh: fix copy-pasted TRX names
Change-Id: I5959acdf07caa1e9003662b0c11c3df68ca933fe
2022-03-11 14:33:08 +03:00
Vadim Yanitskiy 3414a48340 Add tmux scripts for ttcn3-{msc,bsc,bts}-test
Change-Id: I201b77c013cbeef9d1a07b9422b27f375811ed69
2022-01-17 15:42:45 +00:00
Oliver Smith 6c7fed8a32 ttcn3.sh: use --auto-distclean
Change-Id: I7d61405dc989eed4935bc6de00e36c1f3b18a428
2021-11-12 15:51:38 +01:00
Oliver Smith 0a4d8ea698 gen_makefile.py: drop argument for deps file
Rename 3G+2G.deps to all.deps and remove the parameter from
gen_makefile.py. Create new Makefile targets for the various use cases,
usually we build either 'cn-bsc' or 'usrp'. The next patch will add more
projects to all.deps.

This change brings the Makefile logic closer to how it is actually used,
one build directory that is building most Osmocom projects. New projects
can be added to all.deps on demand, but then we have it in the
repository and not just a local change that we add temporarily to the
3G+2G.deps file when we need to build a specific project.

Extend all.deps with projects needed by ttcn3.sh, so it doesn't need to
write its custom .deps file anymore.

Change-Id: I6394882f67eecda3d2c03a97d3119657f7d3873f
2021-09-21 16:52:02 +02:00
Oliver Smith 5f611c76b3 ttcn3.sh: clone_repo: avoid make if possible
Change-Id: I54ad32c9fc51dc91c70b61fe91e68257985f310f
2021-08-31 17:44:30 +02:00
Oliver Smith 8d8ddf4124 ttcn3.sh: call osmo-dev's make less often
Merge build_osmo_program_osmodev into build_osmo_programs and change the
logic, so make only needs to run once. This saves a few seconds for each
test iteration.

Change-Id: Ie2cf7a93395f5ad04159f523d0d0f091303aaa57
2021-08-31 17:44:30 +02:00
Oliver Smith d3271069c4 ttcn3.sh: build with werror
Change-Id: I0b5f4b805d230a5c8157853b4b37b7fe62c4d539
2021-08-31 17:44:30 +02:00
Oliver Smith 7ece249e61 ttcn3.sh: run gen_makefile.py with --no-make-check
On my system, when building all components in docker, some of the C tests
don't pass (but they do pass on jenkins.osmocom.org, which runs a
similar setup). Do the easy workaround and just disable C tests, the
point of ttcn3.sh is to have fast ttcn-3 test iterations anyway, running
the C tests additionally slow each iteration down. One can run the C
tests before submitting changes, e.g. by building with osmo-dev without
ttcn3.sh.

Change-Id: I946635f1ec09f23428965f3db514027f64921fe4
2021-08-23 17:49:12 +02:00
Oliver Smith 855d66ee91 ttcn3.sh: don't build virtphy/trxcon/fake_trx
Remove leftovers from before refactoring in
Iecba5391dafc353058d369deb513b156534face1. No need to build these with
osmo-dev, as they are part of the osmocom-bb docker container that gets
built via ttcn3-bts-test/jenkins.sh.

Change-Id: I99ec4ff9caf34d1ddd7efde2f5ae2342a6984689
2021-08-13 09:17:40 +02:00
Oliver Smith 836bf568ef ttcn3/wrappers: remove
Leftover from before the script was refactored in
Iecba5391dafc353058d369deb513b156534face1.

Change-Id: Ic0890f71fe37a136580e12ebade979bcf14574c0
2021-08-13 09:17:40 +02:00
Oliver Smith 0fa204e179 ttcn3.sh: build everything inside docker
Replace the previous approach of building outside of docker and mounting
everything inside docker while running tests, with also building
everything inside docker. This prevents incompatibilities between host
system and docker (e.g. different glibc). As nice side-effect,
/usr/local is not filled up anymore.

Change-Id: Ib6db8ffd916c788c9de0b3d51c82e1d7bb3f6828
2021-08-13 09:17:40 +02:00
Oliver Smith bfe59294ad ttcn3.sh: set LD_LIBRARY_PATH=/usr/local/lib
Fix for Osmocom programs using system's shared libraries, instead of the
ones mounted into /usr/local.

For example, for osmo-bsc the libosmocore installed in the
osmo-bsc-master docker container would be used (installed via apt from
OBS nightly) instead of the version that osmo-dev built from source.

Change-Id: I0dd7fb544ca59cb1df19fc3d73cfd07f3374e123
2021-08-13 09:17:39 +02:00
Oliver Smith f3eb0ba445 ttcn3.sh: support IMAGE_SUFFIX=latest
Add the image suffix to the marker in run_docker() which indicates if
the testsuite docker container was already built (with all its
dependencies), so the script doesn't assume that everything is already
built if using without IMAGE_SUFFIX first and then switching to
IMAGE_SUFFIX=latest.

Add an usage example to README for IMAGE_SUFFIX=latest.

Change-Id: I867740831810324a7f5906a0548f0d04ecb9a0a1
2021-08-13 09:17:39 +02:00
Oliver Smith f03dfa30a2 ttcn3.sh: get_program_repo: add osmo-pcap-*
Make "ttcn3.sh osmo-pcap-client" work.

Change-Id: I61f1b9f8ce9157f34cefad093b7ae7d445834961
2021-08-13 09:17:39 +02:00
Oliver Smith 6b84b46198 ttcn3.sh: set NO_LIST_OSMO_PACKAGES=1
Speed up tests by not running a separate docker instances first that
lists installed packages.

Depends: docker-playground Iaafb81e9ee94850ae3b6318574ad5370d74a2838
Change-Id: I3d9976d07f088e2d106d23259889a4bffe1abbcb
2021-07-12 08:35:49 +00:00
Oliver Smith 6f7954e869 ttcn3: add missing ttcn3-docker-run.sh
After recent refactoring, having this file in /usr/local/bin is required
to run the testsuites.

Change-Id: I23467136af6deaca69e0b43697a06385cb65444d
2021-06-01 14:16:20 +02:00
Oliver Smith 7531cea612 ttcn3: prepare_local_bin: update respawn.sh path
Make logic to install the file simpler while at it, and allow it to
create /usr/local/bin if it doesn't exist (I just had that).

Change-Id: I497b9e8909a419f5b5286fcccce9d8a1ba9d515c
2021-06-01 13:32:21 +02:00
Oliver Smith 389dafb940 ttcn3.sh: clone deps on first run
Change-Id: Id41a64d1012b9f54811c19d593cab125322a5c96
2020-05-05 14:04:22 +02:00