-
Notifications
You must be signed in to change notification settings - Fork 788
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip-ci] Packit/TMT: Run unit, validate and integration tests
This commit adds enables unit, validate and integration testing via TMT. system and ostree tests will be added in followup PRs. Signed-off-by: Lokesh Mandvekar <[email protected]>
- Loading branch information
Showing
8 changed files
with
88 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
set -exo pipefail | ||
|
||
make PREFIX=/usr install | ||
if [[ ! -f /usr/bin/skopeo ]]; then | ||
make PREFIX=/usr install | ||
fi | ||
|
||
echo "cd ./integration;" go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} | ||
cd ./integration | ||
go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} | ||
go test $TESTFLAGS ${BUILDTAGS:+-tags "$BUILDTAGS"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
require: | ||
- make | ||
- podman-docker | ||
|
||
/unit: | ||
tag: upstream | ||
summary: Run unit test | ||
test: make -C ../.. test-unit | ||
|
||
/validate: | ||
tag: upstream | ||
summary: Run validate test | ||
test: make -C ../.. tools validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
require: | ||
- golang | ||
- make | ||
- podman | ||
- skopeo | ||
|
||
duration: 30m | ||
|
||
tag: [ upstream, downstream ] | ||
summary: Run integration tests | ||
test: make -C ../.. test-integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
discover: | ||
how: fmf | ||
execute: | ||
how: tmt | ||
|
||
/upstream: | ||
summary: Run tests on upstream PRs | ||
discover+: | ||
filter: tag:upstream | ||
adjust+: | ||
enabled: false | ||
when: initiator is not defined or initiator != packit | ||
|
||
/downstream: | ||
summary: Run tests on bodhi / errata and dist-git PRs | ||
discover+: | ||
filter: tag:downstream | ||
adjust+: | ||
enabled: false | ||
when: initiator == packit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters