osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029?usp=email )
Change subject: buildsystem/regen_makefile: modernize
......................................................................
buildsystem/regen_makefile: modernize
Apply various small changes to make this file more readable.
Change-Id: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
---
M _buildsystem/regen_makefile.inc.sh
1 file changed, 19 insertions(+), 33 deletions(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/_buildsystem/regen_makefile.inc.sh b/_buildsystem/regen_makefile.inc.sh
index 31dd491..5534ff5 100644
--- a/_buildsystem/regen_makefile.inc.sh
+++ b/_buildsystem/regen_makefile.inc.sh
@@ -1,19 +1,6 @@
# Copyright 2017-2019 Harald Welte
-# Copyright 2018 sysmocom - s.f.m.c. GmbH
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-
+# Copyright 2018-2025 sysmocom - s.f.m.c. GmbH
+# SPDX-License-Identifier: Apache-2.0
# Wrapper around the TITAN make file generator
if [ -z "$NAME" ]; then
@@ -26,16 +13,9 @@
exit 1
fi
-test -x "$(which ttcn3_makefilegen 2>/dev/null)" || { echo "ERROR: ttcn3_makefilegen not in PATH"; exit 1; }
-
-# Enable ccache if it can be found in path.
-# This speeds up repeated builds of the TTCN3 tests by an order of magnitude
-# since most of the generated C++ source files don't change very often.
-# Roughly, for an initial build which takes N minutes, a complete rebuild
-# after 'make clean' will only take N seconds with ccache.
-# Note that ccache cannot speed up compilation of .o files to .so files.
-if [ -z "$USE_CCACHE" ] && which ccache 2>/dev/null; then
- USE_CCACHE=1
+if ! command -v ttcn3_makefilegen >/dev/null; then
+ echo "ERROR: ttcn3_makefilegen not in PATH"
+ exit 1
fi
ttcn3_makefilegen -g -p -l -U 8 -f -e "$NAME" $FILES
@@ -43,31 +23,37 @@
sed -i -e 's/# TTCN3_DIR = /TTCN3_DIR = \/usr/' Makefile
sed -i -e 's/LDFLAGS = /LDFLAGS = -L \/usr\/lib\/titan/' Makefile
sed -i -e 's/LINUX_LIBS = -lxml2/LINUX_LIBS = -lxml2 -lsctp -lssl/' Makefile
-#sed -i -e 's/TTCN3_LIB = ttcn3-parallel/TTCN3_LIB = ttcn3/' Makefile
# The -DMAKEDEPEND_RUN is a workaround for Debian packaging issue,
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879816 for details
sed -i -e 's/CPPFLAGS = -D$(PLATFORM)/CPPFLAGS = -D$(PLATFORM) -DMAKEDEPEND_RUN -DUSE_SCTP -DLKSCTP_MULTIHOMING_ENABLED -DAS_USE_SSL/' Makefile
-#remove -Wall from CXXFLAGS: we're not interested in generic warnings for autogenerated code cluttering the logs
+# Remove -Wall from CXXFLAGS: we're not interested in generic warnings for
+# autogenerated code cluttering the logs
sed -i -e 's/-Wall//' Makefile
-if [ "x$CPPFLAGS_TTCN3" != "x" ]; then
+if [ -n "$CPPFLAGS_TTCN3" ]; then
CPPFLAGS_TTCN3="$(echo "$CPPFLAGS_TTCN3" | tr -d '\n' | tr '\t' ' ')"
sed -i -e "s/CPPFLAGS_TTCN3 =/CPPFLAGS_TTCN3 = $CPPFLAGS_TTCN3/" Makefile
fi
-# for TITAN 6.3.0
+# For TITAN 6.3.0
if cat /etc/issue | grep "Arch Linux" >/dev/null 2>&1; then
sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr\/ttcn3/' Makefile
else
sed -i -e 's/TTCN3_DIR = $/TTCN3_DIR = \/usr/' Makefile
fi
-if [ "x$USE_CCACHE" = "x1" ]; then
- # enable ccache
+# Enable ccache if it can be found in path. This speeds up repeated builds of
+# the TTCN3 tests by an order of magnitude since most of the generated C++
+# source files don't change very often. Roughly, for an initial build which
+# takes N minutes, a complete rebuild after 'make clean' will only take N
+# seconds with ccache. Note that ccache cannot speed up compilation of .o files
+# to .so files.
+if [ "$USE_CCACHE" != 0 ] && command -v ccache >/dev/null; then
sed -i -e 's/^CXX = g++ $/CXX = env CCACHE_SLOPPINESS=time_macros ccache g++/' Makefile
- # Append the -D option to compiler flags. This option disables timestamps
- # inside comments in the generated C++ code which interfere with ccache.
+ # Append the -D option to compiler flags. This option disables
+ # timestamps inside comments in the generated C++ code which interfere
+ # with ccache.
sed -i -e 's/^COMPILER_FLAGS = \(.*\)/& -D/' Makefile
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029?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: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
Gerrit-Change-Number: 40029
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029?usp=email )
Change subject: buildsystem/regen_makefile: modernize
......................................................................
Patch Set 2: Code-Review+2
(2 comments)
Patchset:
PS2:
re-applying +2
File _buildsystem/regen_makefile.inc.sh:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029/comment/df4e4f81_37cd… :
PS1, Line 53: if command -v ccache >/dev/null; then
> AFAIU you are dropping the feature here to disable ccache by passing USE_CCACHE=0 here?
right, fixed that this is possible again
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
Gerrit-Change-Number: 40029
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 22 Apr 2025 09:35:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40030?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: buildsystem/gen_links: move set -e to users
......................................................................
buildsystem/gen_links: move set -e to users
Make it more obvious that the various gen_links.sh scripts are running
with "set -e" by adding it to the #! line instead of setting it through
an included file.
Change-Id: I4caf445bef716161526a213d6a06ecc9d30f78cb
---
M SCCP_Test/gen_links.sh
M _buildsystem/gen_links.inc.sh
M asterisk/gen_links.sh
M bsc-nat/gen_links.sh
M bsc/gen_links.sh
M bts/gen_links.sh
M cbc/gen_links.sh
M ccid/gen_links.sh
M dia2gsup/gen_links.sh
M eim/gen_links.sh
M epdg/gen_links.sh
M fr-net/gen_links.sh
M fr/gen_links.sh
M gbproxy/gen_links.sh
M ggsn_tests/gen_links.sh
M hlr/gen_links.sh
M hnbgw/gen_links.sh
M hnodeb/gen_links.sh
M hss/gen_links.sh
M ipad/gen_links.sh
M mgw/gen_links.sh
M mme/gen_links.sh
M msc/gen_links.sh
M ns/gen_links.sh
M pcap-client/gen_links.sh
M pcrf/gen_links.sh
M pcu/gen_links.sh
M pgw/gen_links.sh
M remsim/gen_links.sh
M s1gw/gen_links.sh
M sccp/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
M simtrace/gen_links.sh
M sip/gen_links.sh
M smlc/gen_links.sh
M stp/gen_links.sh
M sysinfo/gen_links.sh
M upf/gen_links.sh
39 files changed, 38 insertions(+), 40 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/30/40030/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40030?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I4caf445bef716161526a213d6a06ecc9d30f78cb
Gerrit-Change-Number: 40030
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Attention is currently required from: laforge, osmith, pespin.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+2 by pespin, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: buildsystem/regen_makefile: modernize
......................................................................
buildsystem/regen_makefile: modernize
Apply various small changes to make this file more readable.
Change-Id: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
---
M _buildsystem/regen_makefile.inc.sh
1 file changed, 19 insertions(+), 33 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/29/40029/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40029?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I5a7dcd6171c6a370928ebedafc5ed318384dd8dd
Gerrit-Change-Number: 40029
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40031?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: buildsystem/gen_links: rename ignore_pp_results
......................................................................
buildsystem/gen_links: rename ignore_pp_results
Rename ignore_pp_results to gen_links_finish in preparation for the next
patch where the function will be used for generating more symlinks
instead of writing to a gitignore file. This is a separate commit to
make the next one more readable.
Change-Id: I6a1a79f1a3ff18fe4b51e4c72c3e9b56c571935e
---
M SCCP_Test/gen_links.sh
M _buildsystem/gen_links.inc.sh
M asterisk/gen_links.sh
M bsc-nat/gen_links.sh
M bsc/gen_links.sh
M bts/gen_links.sh
M cbc/gen_links.sh
M ccid/gen_links.sh
M dia2gsup/gen_links.sh
M eim/gen_links.sh
M epdg/gen_links.sh
M fr-net/gen_links.sh
M fr/gen_links.sh
M gbproxy/gen_links.sh
M ggsn_tests/gen_links.sh
M hlr/gen_links.sh
M hnbgw/gen_links.sh
M hnodeb/gen_links.sh
M hss/gen_links.sh
M ipad/gen_links.sh
M mgw/gen_links.sh
M mme/gen_links.sh
M msc/gen_links.sh
M ns/gen_links.sh
M pcap-client/gen_links.sh
M pcrf/gen_links.sh
M pcu/gen_links.sh
M pgw/gen_links.sh
M remsim/gen_links.sh
M s1gw/gen_links.sh
M sccp/gen_links.sh
M selftest/gen_links.sh
M sgsn/gen_links.sh
M simtrace/gen_links.sh
M sip/gen_links.sh
M smlc/gen_links.sh
M stp/gen_links.sh
M sysinfo/gen_links.sh
M upf/gen_links.sh
39 files changed, 39 insertions(+), 39 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/31/40031/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40031?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6a1a79f1a3ff18fe4b51e4c72c3e9b56c571935e
Gerrit-Change-Number: 40031
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Attention is currently required from: osmith.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40032?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: buildsystem: build out-of-tree
......................................................................
buildsystem: build out-of-tree
The buildsystem used to create symlinks to dependency source files in
the testsuite directories, and then building inside that source
directory. This lead to many unrelated files being in the source
directory.
Change the logic to create symlinks to all sources in a separate
$BUILDDIR instead (default: _build) and do the build there.
Advantages:
* Source directories are not cluttered with other files anymore.
* Clean up logic becomes much simpler and faster (rm -rf _build instead
of generating a Makefile and running "make clean" in every testsuite
directory).
* No need to generate gitignore files on the fly anymore.
* Using a separate $BUILDDIR is now possible, this will be used by
testenv in a follow-up patch when running with podman, to make sure
that build artifacts from podman and not using podman are not mixed as
they are incompatible.
Related: OS#6599
Change-Id: If18aaf2a2a0d55bb617e5cb1b73f6ee4b1952494
---
M .gitignore
M Makefile
M _buildsystem/gen_links.inc.sh
M _buildsystem/regen_makefile.inc.sh
D _buildsystem/rmlinks.sh
M _testenv/testenv/testsuite.py
M start-testsuite.sh
7 files changed, 89 insertions(+), 58 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/32/40032/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40032?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If18aaf2a2a0d55bb617e5cb1b73f6ee4b1952494
Gerrit-Change-Number: 40032
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>