osmith submitted this change.

View Change

Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved
testenv: use --autoreconf-in-src-copy by default

Pass --autoreconf-in-src-copy to osmo-dev's gen_makefile.py by default,
so we can always avoid errors related to:

* running "./configure" in-tree and out-of-tree (results in "configure:
error: source directory already configured; run "make distclean" there
first")
* running "./configure" / "autoreconf" with different autotools versions
(on host system and in podman container)

I've kept is as experimental flag at first for better testing, but make
it the default now as it seems to work reliably.

The old make dir is cleaned up when the user runs "./testenv.py clean"
the next time.

Related: osmo-dev I18ac50e3441df81e1fe7d8d5321df7e80ab9c650
Change-Id: I41e1fb534e253ddb43f266d73485b83259a8aa40
---
M _testenv/testenv/__init__.py
M _testenv/testenv/osmo_dev.py
M _testenv/testenv/requirements.py
3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/_testenv/testenv/__init__.py b/_testenv/testenv/__init__.py
index 4a925bb..c1991ca 100644
--- a/_testenv/testenv/__init__.py
+++ b/_testenv/testenv/__init__.py
@@ -170,14 +170,6 @@
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 8748b93..695ca0d 100644
--- a/_testenv/testenv/osmo_dev.py
+++ b/_testenv/testenv/osmo_dev.py
@@ -73,14 +73,10 @@
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",
- ]
+ # Make dirs created without passing --autoreconf-in-src-copy to
+ # gen_makefile.py (as previous versions of testenv did) are incompatible.
+ # Add the "2" to avoid potential conflicts.
+ make_dir += "2"

cmd = [
"./gen_makefile.py",
@@ -103,6 +99,7 @@
"no_systemd.opts",
"werror.opts",
os.path.join(testenv.data_dir, "osmo-dev/osmo-bts-trx.opts"),
+ "--autoreconf-in-src-copy",
] + extra_opts

cwd = get_osmo_dev_dir()
diff --git a/_testenv/testenv/requirements.py b/_testenv/testenv/requirements.py
index 4973f6e..5405f50 100644
--- a/_testenv/testenv/requirements.py
+++ b/_testenv/testenv/requirements.py
@@ -44,6 +44,10 @@
"lddtree",
"qemu-system-x86_64",
]
+ if not testenv.args.binary_repo:
+ programs += [
+ "rsync",
+ ]

abort = False
for program in programs:

To view, visit change 39735. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I41e1fb534e253ddb43f266d73485b83259a8aa40
Gerrit-Change-Number: 39735
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>