Skip to content

Commit

Permalink
Add sharness test framework
Browse files Browse the repository at this point in the history
Will be used to add tests of the ISO generation scripts.

Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson committed Jun 15, 2023
1 parent 79514ce commit 229ad75
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tests/sharness"]
path = create-install-image/tests/sharness
url = https://github.com/felipec/sharness.git
3 changes: 3 additions & 0 deletions create-install-image/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/tests/test-results/
/tests/trash directory.*
/tests/trash_directory.*
13 changes: 13 additions & 0 deletions create-install-image/tests/0000-sanity.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

test_description="sanity check before running real tests"

DIR0="$(dirname "$0")"
TESTDIR="$(realpath "$DIR0")"
. $TESTDIR/sharness/sharness.sh

test_expect_success "verify test environment" "
echo \"XCPTEST_REPOROOT=$XCPTEST_REPOROOT\" | grep '://'
"

test_done
1 change: 1 addition & 0 deletions create-install-image/tests/Makefile
1 change: 1 addition & 0 deletions create-install-image/tests/sharness
Submodule sharness added at e45751

0 comments on commit 229ad75

Please sign in to comment.