Commit Graph

229 Commits

Author SHA1 Message Date
Oliver Smith adfa0c0cf1 gen_makefile.py: add --auto-distclean
Add a new option that avoids stopping the build with:
  configure: error: source directory already configured; run "make distclean" there first

I run into this frequently, when e.g. running './configure; make release'
inside Osmocom repositories and then attempting to build them with
osmo-dev. It is annoying as it does not fail immediatelly, and I need to
manually go to the source directories where it failed, run 'make
distclean' and then attempt to build again. Then it may fail on another
directory with the same problem.

Check for config.status, as that is also what ./configure checks for
before printing the error.

Change-Id: Iac71333e8c5da8dee4e8f34e2af8db12d2c08021
2021-11-12 15:51:38 +01:00
Oliver Smith f7f8c96e7b gen_makefile.py: proj_files: ignore config.h
Do not consider config.h inside the source tree as modified source file.
This file gets generated when running ./configure to build in-tree,
whereas osmo-dev always builds out-of-tree.

Having config.h inside proj_files causes problems with the next patch,
where conflicting in-tree builds will be automatically be cleaned with
"make distclean". For example:
* "make libosmocore" runs with a previously configured in-tree build
* proj_files contains config.h.
* Before attempting to build libosmocore out-of-tree, with the next
  patch, "make distclean" gets executed.
* config.h is now removed
* .make.libosmocore.build target expects all proj_files to exist and
   fails with:
   make: *** No rule to make target '../src/libosmocore/config.h', needed by '.make.libosmocore.build'.  Stop.

Change-Id: I10d970f2cadacb5071dcde975c76b15404038a3c
2021-11-12 15:51:38 +01:00
Oliver Smith dfd92fadab all.deps: remove duplicate osmo-pcu, osmo-trx
Fix warnings about duplicate make targets.

Change-Id: I7c6023f1c8bc23beff3bb512f059ce1b692d2adf
2021-11-12 15:51:27 +01:00
Neels Hofmeyr 03f42edb2c add osmo-bts.cfg 2021-10-23 20:45:12 +02:00
Neels Hofmeyr 8bb707b6cd add trx.opts to build osmo-bts-trx and osmo-trx with UHD 2021-10-23 20:45:12 +02:00
Neels Hofmeyr 5ce778062b werror.opts: add osmo-bts 2021-10-23 20:45:12 +02:00
Neels Hofmeyr 0c83295236 osmo-bsc.cfg: use 'type osmo-bts', not 'sysmobts' 2021-10-23 20:45:12 +02:00
Neels Hofmeyr 2c97908329 add osmo-trx 2021-10-23 20:45:12 +02:00
Neels Hofmeyr 2325e2e3a9 gen_makefile: add 'CFLAGS=-g' option --build-debug 2021-10-23 20:45:12 +02:00
Neels Hofmeyr c84b3e5862 add osmo-pcu to deps, sanitize.opts 2021-10-23 20:45:12 +02:00
Oliver Smith 505f60de3d gen_makefile.py: reformat find cmds in Makefile
Change-Id: Ic2fad22fdbf0fec4abfaeae60b4ebd74563a9392
2021-10-11 08:11:58 +02:00
Oliver Smith 04f805ebe8 all-tests.opts: add osmo-pcu
Change-Id: I6d9b8553482868a7fe4ee127dd9e722b748b55a9
2021-09-21 16:52:06 +02:00
Oliver Smith 82f278993e all.deps: add asn1c, osmo-gbproxy, osmo-pcap
Change-Id: Ic9f57d454d245631b24c9c8c14a8ea806587b33b
2021-09-21 16:52:06 +02: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 c47eafbe0a gen_makefile.py: add --docker-cmd argument
To be used by ttcn3.sh to run the actual build inside docker. ttcn3.sh
runs the programs built by osmo-dev inside docker with the exact
configs that we use on jenkins.osmocom.org, but so far it builds the
component outside of docker. But building inside docker is necessary to
avoid incompatibilities between the host system and the docker
containers (e.g. different glibc).

Change-Id: Ibd20f0e0e2a5105085066a9f04b5868c68691024
2021-08-13 09:17:39 +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 4186b95259 net/templates/run.sh: tweak masquerade
Replace the old check with an exact check for the given rule. The old
check doesn't work on my system if docker is running and sets up other
masquerading rules.

Change -A to -I, so it is less likely to be affected by whatever other
rules may already be above in the chain.

Change-Id: I30c22fe4e7683611e8dada329dbf7d51f78b6016
2021-07-12 08:35:49 +00:00
Neels Hofmeyr 1276bf2c1a add no_libmnl.opts 2021-06-21 22:39:41 +00:00
Neels Hofmeyr 58c219d370 deps: add osmo-smlc
Change-Id: Ib09012162e53d52c5326946b90c311886712d3cd
2021-06-21 22:39:41 +00:00
Neels Hofmeyr f486870137 src/osmo-add-gerrit-hooks.sh: maxdepth 2 2021-06-22 00:37:05 +02:00
Neels Hofmeyr fc7b8edaab localhost cfg 2021-06-22 00:37:05 +02:00
Neels Hofmeyr ec789e7e44 add osmo-bts to 3G+2G.deps 2021-06-22 00:37:05 +02: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 710107a459 net/templates/osmo-gbproxy.cfg: update format
Update to changes in osmo-gbproxy
* Id67592aa7712e5e04e7264b2fb8f26d57eb7e69e
* I2a18dcf035f1fc7304a0c7c7c83b5e8e15429d2b

Change-Id: Ia7008d6d2d26030aa4c35439f1525a53957443a1
2021-03-19 13:13:02 +01:00
Oliver Smith 964539c416 net/templates/osmo-sgsn.cfg: update format
Migrate to the new gprs_ns2_vty configuration introduced in osmo-sgsn
Ie9306ab4d4738c2c57a69987086e22771b30657e.

Change-Id: Ie0a6d4a55f725ebcc6a55b6bd71c52ad72accbd2
2021-03-19 13:12:55 +01:00
Oliver Smith b3ae4b60ff gen_makefile.py: regen: put args in own lines
Make it easier to adjust opts before running 'make regen'.

Change-Id: I3c537ca9cd876e62547efca1ea40f31e90d8761e
2021-02-01 14:45:22 +01:00
Neels Hofmeyr 0a5ccc45d8 gits fu
Change-Id: I453c6644be4d6fc6032b162216b8c3a25854c26a
2020-09-25 05:17:55 +02:00
Vadim Yanitskiy d9cdec6afb gen_makefile.py: fix echo: add -e to enable backslash escapes
I guess it's enabled by default in some distributions like Debian,
but at least for Arch Linux it needs to be enabled using '-e'.

Change-Id: Ie9c0657c9decb83bf8531ce1a0e97c27ee7008bb
2020-09-16 01:19:25 +00:00
Neels Hofmeyr 67e53d9d7f gits: proper rebase dialog
Change-Id: I3d399f38db583df990d6f6da858fc2e199639cb0
2020-09-08 01:37:56 +02:00
Neels Hofmeyr bc2caa3fd9 gits: tweak UI flow
Change-Id: I937f817245a36b14b5b2052e68155923042ddab4
2020-08-26 15:31:28 +02:00
Neels Hofmeyr 7458414135 sgsn-manual.opts
Change-Id: Idce270b5ef6c9a4835d422930e764641b9558b7f
2020-05-21 13:24:02 +02:00
Neels Hofmeyr 03f0f9692e bsc-manual.opts
Change-Id: I54df09b2de642111f465cec99b612513e3d97cc0
2020-05-21 13:24:02 +02:00
Neels Hofmeyr e0570c2a34 fill_config.py: fix expansion of ${_name}
Change-Id: Icece4135fd3b6ff6e091e43f40c6ed423db7fd8f
2020-05-20 22:41:50 +02:00
Oliver Smith 8bdd7ababa README: update ttcn3.sh description
Explain that it is using docker containers now.

Change-Id: I00d48bb8f5917e9dc4e5502b4523050a99f07765
2020-05-05 14:18:34 +02:00
Oliver Smith 389dafb940 ttcn3.sh: clone deps on first run
Change-Id: Id41a64d1012b9f54811c19d593cab125322a5c96
2020-05-05 14:04:22 +02:00
Oliver Smith 1b471a9a39 ttcn3.sh: make sure respawn.sh is available
Change-Id: I3de75642eb4b4b26b74013d774652337433ba264
2020-05-05 14:04:22 +02:00
Oliver Smith 01a510a967 ttcn3: mount osmo-dev src in docker containers
Instead of trying to run everything outside of docker, just build the
docker containers and then mount /usr/local and osmo-ttcn3-hacks from
the host system into the docker containers. This way, we can just use
the same configs as the official jenkins jobs are using, while still
having a short test-cycle once the docker containers are built for the
first time. I've decided to implement this, because it was not feasible
to maintain the separate configs.

Depends: docker-playground I8d1f78aee926f8f6ec0b704e16639bc83f525816
Change-Id: Iecba5391dafc353058d369deb513b156534face1
2020-05-05 14:04:12 +02:00
Oliver Smith 10da26d3f1 ttcn3.sh: use no_{dahdi,optimization,doxygen}.opts
Change-Id: If4e5f271d31ebba25ff7c945ee962aefb4a848fa
2020-01-07 13:17:54 +01:00
Neels Hofmeyr 96a12a1681 make freeswitch template configurable
move some freeswitch config files out of the freeswitch/ tree and symlink so
that they become configurable

Apply new PBX_* variable naming

fill_config: enable symlinks;
ignore template function 'strftime' because freeswith cfg uses that.

Change-Id: I97d3db87398c743637f7eb13629e21b149bcc8fa
2019-12-04 04:09:05 +01:00