diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2023-07-27 00:22:08 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-26 20:51:00 +0100 |
commit | 8bc29e1c87284a8263a88fc89ca1d73d4e3ec070 (patch) | |
tree | ddfa6f0d7c525c21ca0eaa79e6f184c85bf72c76 /meta/lib/oeqa | |
parent | 939e433c4805f0b7bb2818a0ff5cc8827a5b9a16 (diff) | |
download | poky-8bc29e1c87284a8263a88fc89ca1d73d4e3ec070.tar.gz |
oeqa/utils/nfs: allow requesting non-udp ports
Allows setting up NFS over TCP as well.
(From OE-Core rev: e1ff9b9a3b7f7924aea67d2024581bea2e916036)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/utils/nfs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/nfs.py b/meta/lib/oeqa/utils/nfs.py index b66ed42a58..903469bfee 100644 --- a/meta/lib/oeqa/utils/nfs.py +++ b/meta/lib/oeqa/utils/nfs.py | |||
@@ -12,7 +12,7 @@ from oeqa.utils.commands import bitbake, get_bb_var, Command | |||
12 | from oeqa.utils.network import get_free_port | 12 | from oeqa.utils.network import get_free_port |
13 | 13 | ||
14 | @contextlib.contextmanager | 14 | @contextlib.contextmanager |
15 | def unfs_server(directory, logger = None): | 15 | def unfs_server(directory, logger = None, udp = True): |
16 | unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native") | 16 | unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native") |
17 | if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")): | 17 | if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")): |
18 | # build native tool | 18 | # build native tool |
@@ -26,7 +26,7 @@ def unfs_server(directory, logger = None): | |||
26 | exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode()) | 26 | exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode()) |
27 | 27 | ||
28 | # find some ports for the server | 28 | # find some ports for the server |
29 | nfsport, mountport = get_free_port(udp = True), get_free_port(udp = True) | 29 | nfsport, mountport = get_free_port(udp), get_free_port(udp) |
30 | 30 | ||
31 | nenv = dict(os.environ) | 31 | nenv = dict(os.environ) |
32 | nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '') | 32 | nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '') |