Commit Graph

76 Commits

Author SHA1 Message Date
Vadim Yanitskiy 581a7ea879 coverity: fix prepare_source_Osmocom.sh terminating early
Since [1] was merged this script is executed with '-xe' making it
fail immediately if a command returns a non-zero code.  grep may
return 1 if pattern is not found, so let's suspend it.

Change-Id: I21a01478b64015fd699ed31634bf2fb1dc8f6750
Fixes: [1] Icf6546271a01cd9a3dab1ce0d1bc02807d08ad85
2022-10-04 17:00:01 +07:00
Vadim Yanitskiy 6b3b90d55d coverity/prepare_source_Osmocom.sh: execute with '-xe'
Change-Id: Icf6546271a01cd9a3dab1ce0d1bc02807d08ad85
2022-10-01 17:42:39 +07:00
Oliver Smith 6c7a2076cf coverity: use osmo_git_clone_url
Stop cloning from git.osmocom.org by using the shared function.

Change-Id: I17590d0b0b46274e2ceb007e20d7d1dc039f4e8d
2022-09-26 14:50:47 +02:00
Oliver Smith 204ad54e93 coverity/prepare_source_Osmocom: remove test -d
This was redundant, mkdir -p doesn't error if the directory structure
exists.

Change-Id: Ic6253ecb9bfd5f8b2d744988b8825ef90e2e6d5e
2022-09-26 14:50:47 +02:00
Harald Welte 5455b42405 update git URLs (git -> https; gitea/gerrit)
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/

Change-Id: Ia44e4127ff87a3d4d747225d3258188a0a891f1b
2022-08-13 04:02:51 +07:00
Vadim Yanitskiy ac0b663951 {jobs,coverity}: add a new project - libosmo-gprs
Change-Id: I83e86084e9f7a7431bf5a70c372da1f9ccd28436
2022-08-10 04:39:36 +07:00
Vadim Yanitskiy 6d81605790 coverity: add missing libosmo-pfcp, dependency of osmo-upf
Since recently [1] osmo-upf depends on libosmo-{gtlv,pfcp}.so, which
are provided by libosmo-pfcp.git.  We need to build libosmo-pfcp
before attempting to build osmo-upf, otherwise it fails:

  configure: error: Package requirements (libosmo-gtlv >= 0.1.0) were not met:

  Package libosmo-gtlv was not found in the pkg-config search path.
  Perhaps you should add the directory containing `libosmo-gtlv.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'libosmo-gtlv', required by 'world', not found

Change-Id: Ic4fe7b40cf9a57e0462b2c0806f8810fcc04a10c
2022-08-09 15:19:19 +07:00
Oliver Smith 0b2de357a9 Cosmetic: coverity: how to add a new project
Mention that new projects should be added to the components list, as a
lot of projects were not listed there. I've just added all missing
ones. Put it as comment in prepare_source_Osmocom.sh because that's
probably the most likely spot where people will see it while adding a
new project.

Change-Id: I48630f4eb5b4f2b7b714697d15432c0d71f136f9
2022-07-13 07:47:14 +00:00
Oliver Smith ff94d1def5 jobs/coverity: don't cd ~/osmo-ci/coverity
Run the coverity/jenkins.sh from the osmo-ci.git repository that jenkins
checks out at the beginning of the build, instead of using a copy in ~/
that is updated whenever pushing to master. This makes it less
confusing, I configured the job to use a WIP branch and didn't realize
that it still used the code from master.

Change-Id: Ie992d71d2afec6982447b8fe3626c821a9e48d19
2022-07-12 14:44:52 +02:00
Oliver Smith c42a20a8f1 coverity: don't build tests for all
The coverity jenkins job has been failing since we tried to build tests
for all projects (and in an earlier attempt, build and run tests for all
projects). Make the coverity job work again by skipping build of tests
for asn1c. I looked into it earlier and the cause wasn't obvious to me,
and it's currently not worth spending time on.

Fix for:
libtool:   error: cannot find the library '../../skeletons/libasn1cskeletons.la' or unhandled argument '../../skeletons/libasn1cskeletons.la'

Change-Id: Iba0bfe0e753812058436eaf515391eb1f4b09951
2022-07-12 13:44:06 +02:00
Vadim Yanitskiy 2be279a9e0 fixup: coverity: compile tests, but not execute them
In change 82265bc46d [1] I attempted
to fix aaeab8c976 [2], however both
pushd and popd commands are not available in plain shell.

Change-Id: Ib63ded66781c774e16773537c3b943237904b03e
Fixes: [1] I92b648cd1e80399561067eae99426faed1ff1e25
Fixes: [2] Idf0714a59356633021be21acc47f9471d059b7fe
2022-07-04 16:57:33 +07:00
Vadim Yanitskiy 82265bc46d fixup: coverity: compile tests, but not execute them
Change-Id: I92b648cd1e80399561067eae99426faed1ff1e25
Fixes: Idf0714a59356633021be21acc47f9471d059b7fe
2022-07-04 15:42:11 +07:00
Vadim Yanitskiy aaeab8c976 coverity: compile tests, but not execute them
Compiling unit tests would allow Coverity to analyze them too and thus
find more bugs.  The problem is that binaries listed in check_PROGRAMS
are not compiled during 'make all', but only during 'make check'.

One approach [1] is to run 'make check' in do_build(), however it breaks
'Coverity-Upload' job because some unit tests are failing.  This is why
I had to revert bf84ba9f69 together with
ae41942214 that was supposed to fix it.

Even if all unit tests were passing, we still don't want to execute them
because running tests is beyond the scope of 'Coverity-Upload' job.

Another approach is to patch Makefile.am files replacing check_PROGRAMS
with noinst_PROGRAMS, so that the test binaries are compiled during
'make all' but not executed.

Change-Id: Idf0714a59356633021be21acc47f9471d059b7fe
Related: [1] I3f3149a61df96646798c72d0ad31c41b97e6b81f
2022-07-04 14:39:30 +07:00
Vadim Yanitskiy 618f171cb1 Revert "coverity/build_Osmocom.sh: run 'make check' in do_build()"
This reverts commit bf84ba9f69.

Change-Id: I722f8cbb1934a4f5ce2969e243f223019f123777
2022-07-04 14:38:45 +07:00
Vadim Yanitskiy 9baa805a74 Revert "coverity/build_Osmocom.sh: don't do check for all"
This reverts commit ae41942214.

Change-Id: I5018e0da020f32e3a46a2772e79794e5a3a686ca
2022-07-04 14:38:45 +07:00
Oliver Smith ee5920f95d coverity/local_test.sh: new file
Add the script I've used to locally reproduce the build failure and fix
it.

Change-Id: I12241499a0669559bc40eb3e76f967a7c6a2dc70
2022-06-30 15:31:37 +02:00
Oliver Smith 26a02acdf0 coverity/prepare_source: add SRC_SKIP_FETCH/CLEAN
When running these scripts locally while developing, it's more useful to
not fetch the sources and clean the git repository instead. Add
environment variables that allow doing this.

Change-Id: Id6d3cdabb776435df36c0145d93e514693062fca
2022-06-30 15:30:00 +02:00
Oliver Smith 12630c87ab coverity/prepare_source: fix running twice
Don't attempt to clone layer1-api if it exists already. Jenkins deletes
the sources for every run, but for development it is useful to be able
to run this script multiple times without getting errors.

Change-Id: I17bd76a5ff6abafd4bd0189073930f45de20afe8
2022-06-30 12:27:07 +02:00
Oliver Smith ae41942214 coverity/build_Osmocom.sh: don't do check for all
'make check' does not pass for asn1c, it fails with the following. I
looked into it and the cause is not obvious to me, so in order to make
the jenkins job pass again I've changed it back to just run 'make'
instead.

Fix for:
  ...
  fatal: making test-suite.log: failed to create ../tests/98-attribute-class-OK.asn1.log
  fatal: making test-suite.log: failed to create ../tests/99-class-sample-OK.asn1.trs
  fatal: making test-suite.log: failed to create ../tests/99-class-sample-OK.asn1.log
  Makefile:735: recipe for target 'test-suite.log' failed
  make[3]: *** [test-suite.log] Error 1
  make[3]: Leaving directory '/home/osmocom-build/osmo-ci/coverity/source-Osmocom/asn1c/libasn1fix'
  Makefile:841: recipe for target 'check-TESTS' failed

Disable 'make check' for libusrp too as it also didn't pass:

  Making check in usrp2
  make[4]: Entering directory '/tmp/coverity/source-Osmocom/libusrp/firmware/src/usrp2'
  test -f `basename 'eeprom_boot.a51'` || ln -s 'eeprom_boot.a51' .
  test -f ../common/`basename 'eeprom_boot.a51'` -o \
          \! -f `dirname 'eeprom_boot.a51'`/../common/`basename 'eeprom_boot.a51'` \
          || ln -s `dirname 'eeprom_boot.a51'`/../common/`basename 'eeprom_boot.a51'` ../common/`basename 'eeprom_boot.a51'`
  sdas8051 -plosgff `basename 'eeprom_boot.a51'`
  sdcc -mmcs51 --no-xinit-opt -I../../../firmware/include -I../../../firmware/src/usrp2 -I../../../firmware/src/common -I../../../firmware/src/common -DHAVE_USRP2 \
          -c -o eeprom_init.rel `test -f 'eeprom_init.c' || echo './'`eeprom_init.c
  test -f `basename '_startup.a51'` || ln -s '_startup.a51' .
  test -f ../common/`basename '_startup.a51'` -o \
          \! -f `dirname '_startup.a51'`/../common/`basename '_startup.a51'` \
          || ln -s `dirname '_startup.a51'`/../common/`basename '_startup.a51'` ../common/`basename '_startup.a51'`
  sdas8051 -plosgff `basename '_startup.a51'`
  make[4]: *** No rule to make target '../../lib/libfx2.lib', needed by 'eeprom_boot.ihx'.  Stop.

All other 'make check' calls do work as expected, the build script runs
through again with this patch.

Fixes: bf84ba9f ("coverity/build_Osmocom.sh: run 'make check' in do_build()")
Change-Id: I6b9eb8e73c51d925897579fb51bc0a1e86e77270
2022-06-30 12:25:56 +02:00
Oliver Smith ea1172056f coverity/prepare_source_Osmocom.sh: fix typo
Osm_c_ocom -> Osmocom

Change-Id: Ib5a8f35eb9ef3bb8488b29ed9a9b7f43e6b6f088
2022-06-30 11:26:24 +02:00
Vadim Yanitskiy bf84ba9f69 coverity/build_Osmocom.sh: run 'make check' in do_build()
This enables building and running tests (check_PROGRAMS), so that
Coverity will be able to find bugs in their code too.

Change-Id: I3f3149a61df96646798c72d0ad31c41b97e6b81f
2022-06-29 13:40:16 +00:00
Oliver Smith 8637f74ced coverity: add osmo-bsc-nat
Fixes: OS#5596
Change-Id: Id7cf497ea15c3ccdf76c047c6a67f17fac94e0dd
2022-06-28 12:11:15 +02:00
Pau Espin 702fd8ff94 Add new repo osmo-hnbgw (nightly) to build jobs and scripts
Change-Id: I2fdbd651e4b50191e1a67e183590de99d6366ca5
2022-01-05 11:39:41 +01:00
Vadim Yanitskiy 72e42f70d5 coverity: disable Doxygen when building projects
Change-Id: I2fe2f80eb3ec00e9b6c0a3c0ee96e1a0da217b27
2021-10-25 10:00:24 +00:00
Pau Espin 2146640769 Add osmo-hnodeb to ansible/jenkins/coverity setup
Change-Id: Ie4b03aefeda13d216706bd648145689cf2ef93bb
2021-10-25 11:06:48 +02:00
Vadim Yanitskiy 1dcc508ce6 coverity: fix build_simtrace2(): generate Makefile using autotools
Starting from I57e77f927ee9e169cc794c5dc6b128a2d590201b, autotools
are required in order to configure and build the project.

Change-Id: I48696af1ccb5eb884f5de9085bcda37fc41766fb
Fixes: I74da8b523c9d51887d5eceb01ca0f505bb846812
2021-10-24 16:44:29 +03:00
Vadim Yanitskiy c2b01a9b81 fixup: coverity: also build and check SIMTrace host tools
Change-Id: I97b173a4b3fe47a119145e8d6fa0ad116fd38237
2021-10-24 13:22:00 +03:00
Vadim Yanitskiy d304d61327 coverity: also build and check osmo-{cbc,gbproxy}
Change-Id: Ibbff2bdf3163ba33dac11ccaa2e405894a7a0f10
2021-10-21 22:16:04 +03:00
Vadim Yanitskiy 56489bc521 coverity: also build and check SIMTrace host tools
Change-Id: I74da8b523c9d51887d5eceb01ca0f505bb846812
2021-10-21 22:16:04 +03:00
Vadim Yanitskiy 27e5f8ac15 coverity: build osmo-trx with USRP1 support
This allows Coverity to analyze the libusrp specific code.

Change-Id: I36df72149a32cb0df43c74af910d1fbb92b88f4a
2021-10-21 22:16:04 +03:00
Vadim Yanitskiy 0909dade00 coverity: build osmo-trx with UHD+LMS+IPC support
This allows Coverity to analyze the UHD/LMS/IPC specific code.

Change-Id: Ib58bee277414596cb46e523c798d42514c0eb78d
2021-10-21 22:16:04 +03:00
Vadim Yanitskiy baee7c45e0 coverity: build osmo-msc with --enable-smpp
This allows Coverity to analyze the SMPP specific code.

Change-Id: Ie1e4f1610d86fe57d940527ac64d3d1beb7165e0
2021-10-21 22:16:04 +03:00
Vadim Yanitskiy a2e790e763 coverity: build osmo-{msc,sgsn} with --enable-iu
This allows Coverity to analyze the Iu (UMTS) specific code.

Change-Id: I3ef08fcf42950b33e18b3bfcddff890547308364
2021-10-21 22:16:04 +03:00
Vadim Yanitskiy b25ffe1356 coverity: allow passing configure args to build_default()
Change-Id: I79aa2c65cd0d3b06c0bd9ec4f44288b21e40c3b7
2021-10-21 22:15:54 +03:00
Vadim Yanitskiy 7e053f3a23 coverity: also specify --with-sysmobts for osmo-pcu
It's present in build_osmobts(), so let's add it for consistency.

Change-Id: Ie17e2f9f81258e4d60c8cecf0a7af38e8372f9dd
2021-10-21 22:01:39 +03:00
Vadim Yanitskiy acf98b8ec0 coverity: drop --enable-sysmocom-bts for osmo-pcu
There is no such parameter in osmo-pcu's configure script.

Change-Id: I7f06f3d804acd97526a9eb0f93a23375ec555ee8
2021-10-21 22:01:39 +03:00
Pau Espin 8b8051689f coverity/build_Osmocom.sh: Fix trailing whitespace
Change-Id: I999c112c27d243366a010f216749a067d7b0509d
2021-10-21 12:52:37 +02:00
Vadim Yanitskiy f37d4fee7a coverity: enable parallel build for libsmpp34
We have parallel build enabled in libsmpp34.git since 2018.

Change-Id: Ibe57a8c823d9b35e2f51c9bd7a13d6baf61bf0ca
Related: Id41fbcb5a96093eb6c3dc00bcacbd379111ada70
2021-10-20 21:44:14 +03:00
Harald Welte d793650519 some more git.sysmocom.de https (+path) changes due to gitea migration
Change-Id: Ie1599b356932ffa83d70e08b96179b7ca4909b14
2021-05-17 08:16:34 +02:00
Neels Hofmeyr 2dc35de85b jenkins: add osmo-smlc to coverity and ttcn3 jobs
Change-Id: I690962cd8352e255a2bf0ae16aa8ddda68edf10a
2020-10-21 00:55:59 +02:00
Vadim Yanitskiy f137b5b1a4 coverity: add OsmocomBB (without firmware)
Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35
2019-05-10 10:42:59 +00:00
Max bdd3713beb Add osmo-sysmon to coverity submission
Change-Id: I1e753d2c14198eccb046c259b3eec582b1921431
2018-11-22 14:21:47 +01:00
Alexander Couzens 3e50c20188 coverity: don't install systemd file
Because the systemd install directory does not use --prefix as
base, they are installed by default to /lib/systemd.
As the coverity only scans the compilation, don't install systemd files.

Change-Id: I39b491fc09f0db0efd8d9d09e8f4cba4ba49cdde
2018-09-19 00:36:58 +02:00
Harald Welte af55468721 coverity: Re-order builds to ensure osmo-hlr before osmo-msc
osmo-msc now needs libosmo-gsup-client, which is built+installed
as part of osmo-hlr

Change-Id: I581d86cf9679ef978a018a5ba8deb8b0f034677b
2018-08-08 07:55:28 +02:00
Max 1239cabeea cosmetic: remove wrapper script
The jenkins.sh is just a tiny wrapper around coverity_Osmocom.sh - let's
remove this unnecessary indirection and move the code directly to
jenkins.sh

Change-Id: Iead3b8f39327f1d0dd80e12a9d38563c35701993
2018-01-22 11:03:41 +01:00
Max f086d63c13 cosmetic: remove unused function
Change-Id: Ie3885237cea2afbe5e8c0f89d2280284bb4d9150
2018-01-22 11:02:14 +01:00
Max e10bf97f8f Coverity: specify sysmoBTS L1 headers explicitly
Fix upload by specifying L1 headers location properly.

Fixes: OS#2845
Change-Id: Iba55922295cb2a258f90c5345f592d7d5f34ac51
2018-01-22 11:01:49 +01:00
Max 66b46cd9b9 Enable osmo-iuh submission
It was disabled back in a days when it was dependent on a separate
branch. Thisis no longer the case so we can enable it back. Also remove
remaining leftovers.

Change-Id: I5fd3bdab217b61f9ee50a5f1413b60d396535395
2018-01-11 23:07:58 +01:00
Max 3e1ca6f866 Remove OpenBSC from Coverity submission
The OpenBSC codebase only receive occasional backports hence none of the
issues uncovered by Coverity would be fixed unless it's also fixed in
corresponding Osmo* project. Let's not clutter output with the
information about issues which won't be fixed anyway.

Change-Id: Ief3dfc641684fa33407957bf7cfcb6ecf35b847a
2017-12-14 15:21:16 +01:00
Harald Welte 43aa00dbd4 coverity: Don't use PARALLEL_MAKE for libsmpp34
... which apparently doesn't support this and every so often breaks
the coverity upload build

Change-Id: Id78f80cf0878a0807cd06a24fa5c9561c7b84b36
2017-11-05 08:55:12 +01:00