File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Ocitools integration tests
1+ # oci-runtime-tool integration tests
22
3- Ocitools uses the [ Sharness] [ ] test harness, installed as a [ Git
3+ This project uses the [ Sharness] [ ] test harness, installed as a [ Git
44submodule] submodule] . To setup the test installation after a clone,
55run:
66
@@ -17,6 +17,21 @@ Run the tests with:
1717And read the ` Makefile ` source to find other useful targets
1818(e.g. [ ` prove ` ] [ prove ] ).
1919
20+ ## Naming
21+
22+ 0 - Global ` oci-runtime-tool ` options.
23+
24+ ## Dependencies
25+
26+ * [ GNU Core Utilities] [ coreutils ] for [ ` cat ` ] [ cat.1 ] ,
27+ [ ` echo ` ] [ echo.1 ] , [ ` head ` ] [ head.1 ] , and [ `sed] [ sed.1 ] .
28+
29+ [ coreutils ] : http://www.gnu.org/software/coreutils/coreutils.html
2030[ prove ] : http://perldoc.perl.org/prove.html
2131[ Sharness ] : http://mlafeldt.github.io/sharness/
2232[ submodule ] : http://git-scm.com/docs/git-submodule
33+
34+ [ cat.1 ] : http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cat.html
35+ [ echo.1 ] : http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
36+ [ head.1 ] : http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html
37+ [ sed.1 ] : http://pubs.opengroup.org/onlinepubs/9699919799/utilities/head.html
Original file line number Diff line number Diff line change 1+ command -v cat > /dev/null 2> /dev/null && test_set_prereq CAT
2+ command -v echo > /dev/null 2> /dev/null && test_set_prereq ECHO
3+ command -v head > /dev/null 2> /dev/null && test_set_prereq HEAD
4+ command -v sed > /dev/null 2> /dev/null && test_set_prereq SED
5+
6+ true
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ test_description=' Test ocitools global options'
4+
5+ . ./sharness.sh
6+
7+ test_expect_success CAT,HEAD ' Test oci-runtime-tool --help' "
8+ oci-runtime-tool --help | head -n2 >actual &&
9+ cat <<-EOF >expected &&
10+ NAME:
11+ oci-runtime-tool - OCI (Open Container Initiative) runtime tools
12+ EOF
13+ test_cmp expected actual
14+ "
15+
16+ test_expect_success ECHO,SED ' Test oci-runtime-tool --version' "
17+ oci-runtime-tool --version | sed 's/commit: [0-9a-f]*$/commit: HASH/' >actual &&
18+ echo 'oci-runtime-tool version 0.0.1, commit: HASH' >expected &&
19+ test_cmp expected actual
20+ "
21+
22+ test_done
You can’t perform that action at this time.
0 commit comments