run the regression tester tool with the list of suggested inputs
This commit is contained in:
9
.github/workflows/quick-regression.yml
vendored
9
.github/workflows/quick-regression.yml
vendored
@ -46,6 +46,11 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
ccache -z
|
||||
python3 -m venv linuxenv
|
||||
source linuxenv/bin/activate
|
||||
python3 -m pip install numpy
|
||||
python3 -m pip install pyyaml
|
||||
python3 -m pip install junit_xml
|
||||
cmake -S cmake -B build \
|
||||
-C cmake/presets/gcc.cmake \
|
||||
-C cmake/presets/most.cmake \
|
||||
@ -69,3 +74,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
python3 tools/regression-tests/get-quick-list.py
|
||||
python3 tools/regression-tests/run_tests.py \
|
||||
--lmp-bin=build/lmp \
|
||||
--config-file=tools/regression-tests/config.yaml \
|
||||
--list-input=folder_list.txt
|
||||
|
||||
@ -258,10 +258,30 @@ if __name__ == "__main__":
|
||||
regex = make_regex(styles)
|
||||
if regex:
|
||||
inputs = get_examples_using_styles(regex, os.path.join(LAMMPS_DIR,'examples'))
|
||||
|
||||
# TODO: modify the regression tester tool to process the raw list of input scripts
|
||||
folder_list = []
|
||||
print("Suggested inputs for testing:")
|
||||
for inp in inputs:
|
||||
print(inp)
|
||||
|
||||
# get the folder that contains the input script
|
||||
full_path = str(inp)
|
||||
folder = full_path.rsplit('/', 1)[0]
|
||||
# add unique folders in the list
|
||||
if folder not in folder_list:
|
||||
folder_list.append(folder)
|
||||
|
||||
# input_list.txt is used for the regression tester tool
|
||||
# that lists the individual subfolders and the number of input scripts therein
|
||||
with open('folder_list.txt', 'w') as f:
|
||||
for folder in folder_list:
|
||||
cmd_str = f"ls {folder}/in.* | wc -l"
|
||||
p = subprocess.run(cmd_str, shell=True, text=True, capture_output=True)
|
||||
num_input = p.stdout.split('\n')[0]
|
||||
f.write(folder + ' ' + num_input + '\n')
|
||||
|
||||
|
||||
print("Found changes to the following styles:")
|
||||
print("Commands: ", styles['command'])
|
||||
print("Atom styles: ", styles['atom'])
|
||||
|
||||
Reference in New Issue
Block a user