diff options
| author | Jan Alexander Steffens (heftig) <heftig@archlinux.org> | 2024-12-09 16:18:50 +0100 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2025-01-07 21:44:33 +0200 |
| commit | 29a26ea8175ebc9af66efa40191d9efe906e089b (patch) | |
| tree | 48ee703953db4f324db34daaa41dc615f58a8599 | |
| parent | c66a89fdca79d29d8799b470bed392b0b80f4d00 (diff) | |
| download | meson-29a26ea8175ebc9af66efa40191d9efe906e089b.tar.gz | |
tests: Avoid modifying '17 prebuild shared' test dir
Tests can tread on each other's toes when parallelism is high enough.
In this case, `test_prebuilt_shared_lib` creates an object file in the
`17 prebuilt shared` test dir.
`test_prebuilt_shared_lib_rpath_same_prefix` uses `shutil.copytree` to
copy that same test dir to a temporary location.
If the former test cleans up its object file while `copytree` is
running, the copy can fail with a fatal ENOENT `shutil.Error`.
Use `copy_srcdir` to prevent this from happening.
| -rw-r--r-- | unittests/allplatformstests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 6544bcce1..b5338b834 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -1766,7 +1766,7 @@ class AllPlatformTests(BasePlatformTests): def test_prebuilt_shared_lib(self): (cc, _, object_suffix, shared_suffix) = self.detect_prebuild_env() - tdir = os.path.join(self.unit_test_dir, '17 prebuilt shared') + tdir = self.copy_srcdir(os.path.join(self.unit_test_dir, '17 prebuilt shared')) source = os.path.join(tdir, 'alexandria.c') objectfile = os.path.join(tdir, 'alexandria.' + object_suffix) impfile = os.path.join(tdir, 'alexandria.lib') |
