osmith has submitted this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39405?usp=email )
Change subject: testenv: run: add --autoreconf-in-src-copy arg
......................................................................
testenv: run: add --autoreconf-in-src-copy arg
Add a new argument that avoids the problem that ./configure refuses to
run if it has already been executed in the source dir. (It aborts and
asks the user to run "make distclean" first, which is especially
annoying if it has to be done in multiple source dirs before being able
to build successfully.)
Put the new logic behind an "experimental argument" for now. I think it
improves usability greatly and plan to make it the default later when
it has been well tested.
I have also considered making the source dir read-only when mounted into
podman and this argument is set. This was the original goal of Lynxis'
related patch, on which idea this one is based. But osmo-dev still
needs to write into the source dir in case it clones a new repository,
so making the sources dir read-only with this trade-off should be a
separate flag and could be added in another patch later.
Related: osmo-ttcn3-hacks I0f1ac8852218f158ece14c176f05574f60d9d1f7
Depends: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650
Change-Id: I5c38ce69dc39823d12be574c74a654d2fa6ed8fb
---
M _testenv/testenv/__init__.py
M _testenv/testenv/osmo_dev.py
2 files changed, 17 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index c1991ca..4a925bb 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -170,6 +170,14 @@
default=ccache_dir_default,
)
+ group = sub_run.add_argument_group("experimental options")
+ group.add_argument(
+ "-A",
+ "--autoreconf-in-src-copy",
+ action="store_true",
+ help="run autoreconf in a copy of the source dir, avoids 'run make
distclean' errors",
+ )
+
sub.add_parser("clean", help="clean previous build artifacts")
args = parser.parse_args()
diff --git a/_testenv/testenv/osmo_dev.py b/_testenv/testenv/osmo_dev.py
index 51d07a7..8748b93 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -73,6 +73,15 @@
os.path.join(testenv.args.cache, "host/usr"),
]
+ if testenv.args.autoreconf_in_src_copy:
+ # Use a different make dir, so we don't have unexpected behavior when
+ # the user already ran autoreconf or ./configure through osmo-dev with
+ # the previous make dir, without --autoreconf-in-src-copy.
+ make_dir += "2"
+ extra_opts += [
+ "--autoreconf-in-src-copy",
+ ]
+
cmd = [
"./gen_makefile.py",
"--build-debug",
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/39405?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: I5c38ce69dc39823d12be574c74a654d2fa6ed8fb
Gerrit-Change-Number: 39405
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>