diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2023-07-27 00:22:08 +0800 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-08-15 06:18:49 -1000 |
commit | 6fa4e40651e8f3c11d036aa58146dedf0ef2a885 (patch) | |
tree | 5b3f9c89bdd790b59fba2e24c2b1d552494ba9eb | |
parent | 13a94b094b6e0f72352f65af82ff43614d306953 (diff) | |
download | poky-6fa4e40651e8f3c11d036aa58146dedf0ef2a885.tar.gz |
oeqa/utils/nfs: allow requesting non-udp ports
Allows setting up NFS over TCP as well.
(From OE-Core rev: a177ce907ec7a044659ec49c679e66f49cd71c43)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e1ff9b9a3b7f7924aea67d2024581bea2e916036)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-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', '') |