-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: include new testing tools and utils (#11399)
* Squashed 'tests/lib/external/snapd-testing-tools/' changes from dc6be12e76..575f5d2016 575f5d2016 Merge pull request #13 from snapcore/new-utils-section 4701612434 avoid installing and removing snapd in ubuntu focal 4d0317633d shellcheck in xenial is not needed d95cb2e627 Moving some tools to the new utils section 839a0ce808 Merge pull request #10 from snapcore/new-spread-shellcheck-tool 5d5efd6fbe Merge pull request #12 from snapcore/run-shellchek-in-old-version 497b7d691f Force testing shellchek with versions 0.8 and 0.7 b3cb5a5a0a Update the copyright 872b64e05b Merge pull request #11 from Meulengracht/main aa8799d0f8 tools/repack-kernel: fix SC2061 a44a987381 Merge pull request #9 from snapcore/check-spread-yaml-files 5cfa7cb84d New shellcheck for spread tasks a9f6e09e0d Merge pull request #8 from Meulengracht/main cd7926a85f New check-test-format tool 210b232d9c tools/repack-kernel: fix additional shellchecks ac67796b5c Merge pull request #7 from Meulengracht/main 13fd7270b7 tools/repack-kernel: PR feedback comments 3844702a17 Merge pull request #6 from Meulengracht/main 4afdeefe42 tests/repack-kernel: move restore above execute to pass ./run-checks e755eca0f8 Merge pull request #5 from Meulengracht/main 6199fc48f9 tools: add core22 targets in os.query 057919c07a Merge pull request #4 from mvo5/remove-ubuntu-21.04-eol 26b35af9b3 Merge pull request #1 from Meulengracht/main b0fa82117a many: remove Ubuntu 21.04 (hirsute), it's EOL 878fd76976 repack-kernel: remove some cds and add a newline 4b84abd26b repack-kernel: fix issue in test related to wrong help message pattern 2e7fd675a7 repack-kernel: additional fixes to error messages. additional failure tests 545d72ef20 repack-kernel: additional fixes to tool based on feedback, additional tests da1e43b4bb repack-kernel: change the install apt command for initramfs 131bcd11b2 repack-kernel: fix prepare command and error message having to much copy-pasta 9b2aef208f repack-kernel: add more tests, fix setup command b98c024146 review feedback 5b76f3fe99 remove nested.sh, restructure repack-kernel and add test 0e5b5052e3 nested.sh: add missing command for waiting for snap command 9591a6e700 nested.sh: fix issues with OVMF 4db61f2b13 remove scripts that were hard to reuse, handle missing variables 9b956243e1 use env for path instead of hardcoding b8e9d73349 core: add shared shell scripts for building image and controlling the L2 VM git-subtree-dir: tests/lib/external/snapd-testing-tools git-subtree-split: 575f5d201619fc18f83c404222fc98e2ff696b04 * Usinr new utils and tools from the snapd-testing-tools project * Squashed 'tests/lib/external/snapd-testing-tools/' changes from 575f5d2016..61a4c3142d 61a4c3142d Merge pull request #14 from snapcore/include-support-s390x 3a1a65f6e1 Update the comments about shellchek 5ddfb7e1db New support for s390x arch in os.query tool git-subtree-dir: tests/lib/external/snapd-testing-tools git-subtree-split: 61a4c3142d43d3e72330fd570ee16106d861ed24
- Loading branch information
1 parent
01e0636
commit 5d6b7ab
Showing
23 changed files
with
148 additions
and
1,332 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
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
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
37 changes: 37 additions & 0 deletions
37
tests/lib/external/snapd-testing-tools/tests/spread-shellcheck/task.yaml
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,37 @@ | ||
summary: smoke test for the spread-shellcheck tool | ||
|
||
systems: [ ubuntu-20.04-64 ] | ||
|
||
prepare: | | ||
snap install shellcheck | ||
restore: | | ||
snap remove shellcheck | ||
execute: | | ||
spread-shellcheck -h | MATCH "usage: spread-shellcheck" | ||
# Check the format of the spread tests in this project | ||
spread-shellcheck "$PROJECT_PATH/tests" | ||
# Check failing tasks | ||
cp "$PWD/tasks/task1" "$PWD/tasks/task.yaml" | ||
spread-shellcheck "$PWD/tasks" 2>&1 | MATCH "SC1035" | ||
rm "$PWD/tasks/task.yaml" | ||
cp "$PWD/tasks/task2" "$PWD/tasks/task.yaml" | ||
spread-shellcheck "$PWD/tasks" 2>&1 | MATCH "SC1035" | ||
rm "$PWD/tasks/task.yaml" | ||
cp "$PWD/tasks/task3" "$PWD/tasks/task.yaml" | ||
spread-shellcheck "$PWD/tasks" 2>&1 | MATCH "SC1035" | ||
rm "$PWD/tasks/task.yaml" | ||
cp "$PWD/tasks/task4" "$PWD/tasks/task.yaml" | ||
spread-shellcheck "$PWD/tasks" 2>&1 | MATCH "SC1035" | ||
rm "$PWD/tasks/task.yaml" | ||
# Check that dirs can be excluded | ||
cp "$PWD/tasks/task4" "$PWD/tasks/task.yaml" | ||
spread-shellcheck "$PROJECT_PATH/tests" -e "$PWD/tasks" | ||
rm "$PWD/tasks/task.yaml" |
13 changes: 13 additions & 0 deletions
13
tests/lib/external/snapd-testing-tools/tests/spread-shellcheck/tasks/task1
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 @@ | ||
summary: this is the summary | ||
|
||
prepare: | | ||
echo "preparing" | ||
|
||
restore: | | ||
echo "restoring" | ||
|
||
debug: | | ||
echo "debuging" | ||
|
||
execute: | | ||
![ -z "something" ] |
13 changes: 13 additions & 0 deletions
13
tests/lib/external/snapd-testing-tools/tests/spread-shellcheck/tasks/task2
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 @@ | ||
summary: this is the summary | ||
|
||
prepare: | | ||
![ -z "something" ] | ||
|
||
restore: | | ||
echo "restoring" | ||
|
||
debug: | | ||
echo "debuging" | ||
|
||
execute: | | ||
echo "executing" |
13 changes: 13 additions & 0 deletions
13
tests/lib/external/snapd-testing-tools/tests/spread-shellcheck/tasks/task3
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 @@ | ||
summary: this is the summary | ||
|
||
prepare: | | ||
echo "preparing" | ||
|
||
restore: | | ||
![ -z "something" ] | ||
|
||
debug: | | ||
echo "debuging" | ||
|
||
execute: | | ||
echo "executing" |
13 changes: 13 additions & 0 deletions
13
tests/lib/external/snapd-testing-tools/tests/spread-shellcheck/tasks/task4
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 @@ | ||
summary: this is the summary | ||
|
||
prepare: | | ||
echo "preparing" | ||
|
||
restore: | | ||
echo "restoring" | ||
|
||
debug: | | ||
![ -z "something" ] | ||
|
||
execute: | | ||
echo "executing" |
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
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.