Skip to content

Commit 9855506

Browse files
coolgwpevik
authored andcommitted
shell_loader_cmd.sh: New test case check needs_cmds
Link: https://lore.kernel.org/ltp/20260109061716.20258-5-wegao@suse.com/ Suggested-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Petr Vorel <pvorel@suse.cz> Reviewed-by: Cyril Hrubis <chrubis@suse.cz> Signed-off-by: Wei Gao <wegao@suse.com>
1 parent cd9292b commit 9855506

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

testcases/lib/run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ shell_loader.sh
66
shell_loader_all_filesystems.sh
77
shell_loader_c_child.sh
88
shell_loader_filesystems.sh
9+
shell_loader_cmd.sh
910
shell_loader_kconfigs.sh
1011
shell_loader_supported_archs.sh
1112
shell_loader_tcnt.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/sh
2+
# SPDX-License-Identifier: GPL-2.0-or-later
3+
# Copyright (c) 2025 Wei Gao <wegao@suse.cz>
4+
#
5+
# ---
6+
# env
7+
# {
8+
# "needs_cmds": [
9+
# {
10+
# "cmd": "ls",
11+
# "optional": 1
12+
# },
13+
# {
14+
# "cmd": "mkfs.ext4 >= 1.0.0",
15+
# "optional": 1
16+
# }
17+
# ]
18+
# }
19+
# ---
20+
21+
. tst_loader.sh
22+
23+
tst_test()
24+
{
25+
tst_res TPASS "We are running with needs_cmds"
26+
}
27+
28+
. tst_run.sh

0 commit comments

Comments
 (0)