diff options
author | Anuj Mittal <anuj.mittal@intel.com> | 2023-07-27 00:22:08 +0800 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2023-09-15 03:47:11 -1000 |
commit | a1886b3532f17ef156bd706939f82f519f64a888 (patch) | |
tree | 0b5c0e857f9b10bc356e0eb12467dd8b6c13a53b /meta/lib | |
parent | 9e2099f2a8ff7650c177f92150820647573ed00d (diff) | |
download | poky-a1886b3532f17ef156bd706939f82f519f64a888.tar.gz |
oeqa/utils/nfs: allow requesting non-udp ports
Allows setting up NFS over TCP as well.
(From OE-Core rev: 148e009374dcbd2101223cf33f2ff69c75895b71)
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>
Diffstat (limited to 'meta/lib')
-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 a37686c914..c9bac050a4 100644 --- a/meta/lib/oeqa/utils/nfs.py +++ b/meta/lib/oeqa/utils/nfs.py | |||
@@ -8,7 +8,7 @@ from oeqa.utils.commands import bitbake, get_bb_var, Command | |||
8 | from oeqa.utils.network import get_free_port | 8 | from oeqa.utils.network import get_free_port |
9 | 9 | ||
10 | @contextlib.contextmanager | 10 | @contextlib.contextmanager |
11 | def unfs_server(directory, logger = None): | 11 | def unfs_server(directory, logger = None, udp = True): |
12 | unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native") | 12 | unfs_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "unfs3-native") |
13 | if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")): | 13 | if not os.path.exists(os.path.join(unfs_sysroot, "usr", "bin", "unfsd")): |
14 | # build native tool | 14 | # build native tool |
@@ -22,7 +22,7 @@ def unfs_server(directory, logger = None): | |||
22 | exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode()) | 22 | exports.write("{0} (rw,no_root_squash,no_all_squash,insecure)\n".format(directory).encode()) |
23 | 23 | ||
24 | # find some ports for the server | 24 | # find some ports for the server |
25 | nfsport, mountport = get_free_port(udp = True), get_free_port(udp = True) | 25 | nfsport, mountport = get_free_port(udp), get_free_port(udp) |
26 | 26 | ||
27 | nenv = dict(os.environ) | 27 | nenv = dict(os.environ) |
28 | nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '') | 28 | nenv['PATH'] = "{0}/sbin:{0}/usr/sbin:{0}/usr/bin:".format(unfs_sysroot) + nenv.get('PATH', '') |