Skip to content

Commit

Permalink
Move all tests to tests/ subfolder
Browse files Browse the repository at this point in the history
Rename existing 'test' folder containing linter script to 'tools' to
avoid confusion.
  • Loading branch information
KKoukiou committed May 17, 2024
1 parent 910890a commit 2c30bc8
Show file tree
Hide file tree
Showing 599 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-code-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:

- name: Run static code tests
run: |
export PATH="$HOME/.local/bin:$PATH"; ./test/static-code
export PATH="$HOME/.local/bin:$PATH"; ./tools/static-code
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions scripts/run_kickstart_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function should_skip_test() {
# Find all tests in the . folder. These tests will be filtered by TESTTYPE parameter
# if specified.
function find_tests() {
local tests=$(find . -maxdepth 1 -name '*.sh' -a -perm -o+x)
local tests=$(find tests/ -maxdepth 1 -name '*.sh' -a -perm -o+x)
local newtests=""
local skipped_tests=""
Expand Down Expand Up @@ -246,7 +246,7 @@ if [[ $# != 0 ]]; then
tests=""
# Allow people to leave off the .sh.
for t in $*; do
for t in tests/$*; do
if [[ "${t}" == *.sh ]]; then
test="${t}"
else
Expand All @@ -261,7 +261,7 @@ elif [[ "${ghprbActualCommit}" != "" ]]; then
tests=""
candidates="$(for f in ${files}; do
# Only accept files that are .sh or .ks.in files in this top-level directory.
# Only accept files that are .sh or .ks.in files in the 'tests' directory.
# Those are the tests. If either file for a particular test changed, we want
# to run the test. The first step of figuring this out is stripping off
# the file extension.
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_manager/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def find_by_group(cls, root, group):
@classmethod
def _find_all(cls, root):
ret = set()
find_pattern = os.path.join(root, "*.ks.in")
find_pattern = os.path.join(root, "**/*.ks.in", recursive=True)
for f in iglob(find_pattern):
ret.add(KickstartTest(f))

Expand Down
6 changes: 3 additions & 3 deletions scripts/test_manager/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def _include_kickstart_parts(self, content):
if not match:
return content

include_content = self._load_file_content(match[1])
include_content = self._load_lib_file_content(match[1])
return self._re_ks_include.sub(include_content, content)

def _load_file_content(self, file):
file_path = os.path.join(self._root, file)
def _load_lib_file_content(self, file):
file_path = os.path.join(self._root, "lib", file)

if not os.path.exists(file_path):
raise IncludeFileMissingError("KSINCLUDE file {} missing in test".format(file_path))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2c30bc8

Please sign in to comment.