Commit Graph

257 Commits

Author SHA1 Message Date
Oliver Smith ccf7b09319 werror.opts: enable osmo-iuh
It builds without warnings now \o/

Related: OS#4462
Change-Id: Ie974632462aab755d73e1345ebc9a08eb2d80893
2022-11-15 13:04:16 +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
Neels Hofmeyr 51df7420b0 virt-nitb: tweaks
Change-Id: Icba4b16e25db93ba9d069388bbe39cd5adfed770
2022-09-04 05:29:06 +02:00
Neels Hofmeyr 99a08fb459 add virt-nitb: a fully virtual network with 2 MS
Change-Id: I31cf24006ea9ceb83622aedef22046c53db90142
2022-08-30 05:15:00 +02:00
Neels Hofmeyr 5a2efc5f7c add virt-nitb 1/2: initial file copies
Change-Id: Id275a42ca688499e576f3128b5b88355d70db3a2
2022-08-30 05:14:16 +02:00
Neels Hofmeyr ece7ff4d72 hnbgw-manual.opts
Change-Id: Ie1064ccf1f7946c5be9dd82b7b1175fa38054401
2022-08-29 02:01:23 +02:00
Oliver Smith 51b8061749 gen_makefile.py: set nargs=? for --jobs
Allow calling gen_makefile.py with --jobs without any argument, and
behave the same as if --jobs was not passed. This fixes calling
gen_makefile.py initially without --jobs, and then running "make regen"
which will cause gen_makefile.py to get called with --jobs with no
argument.
2022-08-17 12:05:53 +02:00
Vadim Yanitskiy 74ef7bf547 Add ccache.opts: CC/CXX ccache wrappers
Change-Id: Ic6c5a917da688b779979959ee199b6cf8bc971a9
2022-08-16 17:38:31 +00:00
Vadim Yanitskiy 3a4e919239 gen_makefile.py: add missing --jobs to target 'regen'
Change-Id: I68adde5c3ea602d6dbbfb26e07ce44247cad89f9
2022-08-15 21:00:57 +07:00
Vadim Yanitskiy e9ebdc83c4 gen_makefile.py: use --long params for target 'regen'
This way the resulting Makefile is easier to read and understand,
no need to lookup short params in help of gen_makefile.py.

Change-Id: Iba7f148fb1880af2f05cf3ca74cfb0737befeea0
2022-08-15 21:00:53 +07:00
Vadim Yanitskiy dd3214e831 all.deps, {sanitize,werror}.opts: add project - libosmo-gprs
Change-Id: I707e6ee0af6bcb940d5e77475bc581c0d07de6d7
2022-08-15 19:18:24 +07:00
Vadim Yanitskiy e6d3620ff0 gen_makefile.py: use s#git://#https://# in git clone base URL
Unencrypted git:// protocol offers no integrity or authentication,
making it subject to tampering.  Use https:// instead.

https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
https://blog.readthedocs.com/github-git-protocol-deprecation/

Using https:// is also required for some new repositories (like
libosmo-gprs.git), which are intentionally unavailable over git://.

Change-Id: I503f0e1b5258102d771597f1b5b753f670832fcb
2022-08-15 19:18:24 +07:00
Neels Hofmeyr 2bb4e5f8f6 default.opts: osmo-hnbgw --enable-pfcp
Change-Id: I0221bfc87ab27a3edc561fcca72add4162b3e47b
2022-08-12 01:18:33 +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
Neels Hofmeyr 179d9519ad adjust clone url for nftables
Change-Id: I5052819a56ec9b856739b6529d49947bf83849e6
2022-06-17 16:57:08 +02:00
Neels Hofmeyr fbd4b5b3e7 more deps and opts around osmo-upf and PFCP
Change-Id: I3606597392aee73ae3d9692152bf646803a80858
2022-06-17 16:53:52 +02: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
Oliver Smith be36e107ab net/templates/osmo-bsc-1.cfg: set gprs mode none
When enabling BTS1_RUN_IN_OSMO_DEV, the osmo-dev setup is currently
configured to run osmo-bts-virtual without a PCU. Disable GPRS.

Change-Id: I4e55c641b86a9b44bfda263bac1cbd6fad456f8b
2022-05-03 15:39:57 +02:00
Oliver Smith 6a07928fff all.deps: add osmo-hnodeb
Change-Id: I5478566f26a19acc671d881ec430ff02f8e72ebf
2022-05-03 15:39:57 +02:00
Oliver Smith b9fdd63dcc all-tests: add osmo-bsc-nat
Change-Id: I17d3a338566f42faaa4bd89b87cde70ea19136b6
2022-05-03 15:39:57 +02:00
Vadim Yanitskiy 722ca6d26f gen_makefile.py: use '$(nproc)' for '--jobs' by default
Change-Id: I769f032ebf197bac34468683526acf6614e74692
2022-04-19 20:34:53 +03:00
Vadim Yanitskiy 2fef4e56e4 osmo-add-gerrit-hooks.sh: do not use ssh host alias 'go'
... because it may not be defined.  Specify the address explicitly.

Change-Id: I55c1501de61fe6b63be12b8e138742bd4b8baf64
2022-04-19 20:30:23 +03:00
Oliver Smith 028e33741c net: osmo-bsc-nat.cfg: configure mgw
Depends: osmo-bsc-nat I6030a1f5a9d5fb06f148b2a2e03ae57bcb6b3766
Change-Id: I03f4d99d40341d97cb8aef5a1c0b4ca2abef14c3
2022-04-08 18:34:01 +02:00
Oliver Smith 88bcf10f1b all.deps: osmo-bsc-nat: depend on osmo-mgw
Related: osmo-bsc-nat I7ee5b3252e66b4f6db0065333687d6eca6c5e909
Change-Id: Icb45dfc9ad3a6f7612f0cb15d6fba79257d29b17
2022-04-08 18:34:01 +02:00
Vadim Yanitskiy f1fab926ed Add missing osmo-cbc to all.deps and {sanitize,werror}.opts
Change-Id: I39e2067f5d93e648e05ee0f949145d31af43e6d7
2022-03-30 22:41:31 +03:00
Vadim Yanitskiy 34a1b23979 Add missing osmo-pcu to sanitize.opts
Change-Id: I8afe1a5fdcbd6d356d104cb7be3b9be4b508a97c
2022-03-30 20:47:35 +03:00
Xilokar a1cf1cdc67 gen_makefile.py: fix non absolute path
Renamming the make_to_src_proj variable to src_proj in commit
 93bd52300e leads to the build_to_src variable
being the result of a double call to os.path.relpath(), breaking builds when using
non absolute path for make_dir

Change-Id: I2dfc26da94434558b202475af636ce336349bba9
2022-03-22 09:59:25 +01: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
Oliver Smith 28ed522acc net/templates/osmo-bsc-nat.cfg: omit PC for bsc
With most recent OsmoBSCNAT patches, the addresses from the connecting
BSCs get used, no need to hardcode them in the config anymore.

Depends: osmo-bsc-nat I1556aa665fbb0a97507f98794e74820731fa6935
Change-Id: I78ef36c72ff9a7b801e922eccc89dc44fbba7f23
2022-03-10 13:27:12 +01:00
Oliver Smith bf20106d4e net/templates/run.sh: change prefix from CN to NET
osmo-dev's net scripts can be used to run components from RAN too, so
change the title prefix and tmux session name from CN to NET.

Change-Id: I3f46d5a4c7bd20861735c4e01f7cafbc5db08aae
2022-03-08 10:34:42 +01:00
Oliver Smith ef92c180d7 net: move cmds for network components to config
Instead of hardcoding wrappers such as gdb for various commands in
run.sh, put all commands into a config file so the user can add
gdb/valgrind/strace/udtrace/... to the program they are currently
interested in debugging in their own config.

Change-Id: Ifce731ab61d263e9df7a8dc87dd572ca3d30f8dd
2022-03-08 10:34:42 +01:00
Oliver Smith bb0d4d3ebe net/templates/run: one variable for stp4cn/stp4ran
Make it consistent with osmo-mgw and osmo-bsc where we also have more
than one config, and the config is not part of the variable.

Change-Id: I83301d75814070c29c6362c59fade9044aa2c0cc
2022-03-08 10:34:42 +01:00
Oliver Smith 641b4514f6 net/templates/run: log name input: display last
Make it easier for the user to follow a consistent naming scheme for the
log files if they want do do so, by displaying the last log name.

  enter name to save log (last: 2022-03-07_04-test-log-name):

Change-Id: I6c5b64e15d9a8dabaf65022d6b82b69523a3ca6b
2022-03-08 10:34:42 +01:00
Oliver Smith 74e1584631 net: add mgw for osmo-bsc-nat
Start the OsmoBSCNAT's own instance of OsmoMGW. Launch it on a separate
IP, such as the other MGWs, so it's easy to differentiate in wireshark
which traffic relates to which MGW.

Related: https://osmocom.org/projects/osmo-bscnat/wiki/Ladder_diagrams_for_key_procedures
Change-Id: Iaeebb693c81d3aa4b1a46d2543c9872bd49b87c3
2022-03-08 10:34:42 +01:00
Oliver Smith 7f498e2b38 net/templates/run.sh: only one variable for mgw
Prepare to add another MGW for the BSCNAT. Use only one variable for the
mgw, always append the -c configfile parameter further below in the
script where it gets used.

Change-Id: I6f3fe11109107b35059ebe731e0a74a91a04504c
2022-03-08 10:34:42 +01:00
Oliver Smith c819ea7458 net/templates: use codec fr2 for bts1
Fix establishing a call to virtual mobile, which wouldn't work for me if
using anything but FR2 (EFR) as codec.

Change-Id: I6a8706923b651c790798a50aad93492de17dd1a5
2022-03-08 10:34:39 +01:00
Oliver Smith cef58b3d09 net/templates/run.sh: proper iptables -> /dev/null
Fix displaying unrelated message from iptables by redirecting both
stdout and stderr to /dev/null.

Change-Id: Ibe031725cbb68ec55664dd025b1ffc247db08148
2022-02-25 12:55:21 +01:00
Oliver Smith 67cd47f0e8 net: virtphy, osmo-bts-virtual: use loopback-dev
Use the loopback device for virtual Um traffic, so it doesn't slow down
other net devs.

Change-Id: Ibc7ff3aaaca4872f4105825167eb33b66bc23342
2022-02-25 12:55:21 +01:00
Oliver Smith 5452c6e901 make: add convenience target cn-bsc-nat
Change-Id: Ia2bdc8df3cbe9de305aba4f7592a2362f3802303
2022-02-25 12:55:21 +01:00
Oliver Smith 0d9bacc91f net: don't run osmo-gbproxy by default
osmo-gbproxy is not part of any of the convenience make targets in
gen_makefile.py (cn, cn-bsc, usrp). When using the typical workflow of
building one of these convenience targets first, then attempting to run
the network, the osmo-gbproxy window just says command not found.

With the default config_2g3g, it is not needed when only using one BTS,
so add a new config variable GBPROXY_RUN_IN_OSMO_DEV=0 and use it in
run.sh.

Change-Id: Ib1349809997ea6062ec3c43df92abab9fbfad1ea
2022-02-25 12:55:21 +01:00
Oliver Smith d264ec6310 net/templates: support running MS
New config variables:
* MS_RUN_IN_OSMO_DEV
* MS_SUBSCR_ID
* MS_IMSI
* MS_KI
* MS_MSISDN

Change-Id: I377ca41d18ee6b057559cadb0f0bb44f85643eb6
2022-02-25 12:55:21 +01:00
Oliver Smith 5705a69c16 make: add support for "virtphy" from osmocom-bb
Change-Id: Id4e7a9d948332c03d56e2637badeef78c78e5aa7
2022-02-25 12:55:21 +01:00
Oliver Smith 93bd52300e make: add support for "mobile" from osmocom-bb
Allow building and installing the "mobile" application from
osmocom-bb.git's src/host/layer23 dir.

Change-Id: Ic75cca703e317eaee593b4d6c78784309c056f17
2022-02-25 12:55:21 +01:00
Oliver Smith 107f35d3da gen_makefile.py: follow symlinks with find
Prepare for the next patch, with which {src_proj} may be a subdir in
osmocom-bb.

Change-Id: Ie15e74e61b16cef5e189e4e2a272b7d2061547c6
2022-02-25 12:55:21 +01:00
Oliver Smith ca0d2900be gen_makefile.py: mark convenience targets as phony
Change-Id: Idd7e485e17b178f1bf6feef5d30db57e6467267e
2022-02-25 12:55:21 +01:00