Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace test data first in the update script #39

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions dev_scripts/update_to_aas_core_meta_codegen_and_testgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,13 @@ def _replace_test_data(

print(f"Removing the test data from: {test_data_dir}")

for pth in [
test_data_dir / name
for name in ("Descend", "DescendOnce", "Json", "Xml", "XOrDefault")
]:
if pth.exists():
print(f"Removing {pth} ...")
shutil.rmtree(pth)
for pth in sorted(
sub_pth
for sub_pth in test_data_dir.iterdir()
if sub_pth.is_dir()
):
print(f"Removing {pth} ...")
shutil.rmtree(pth)

print(f"Copying the test data from: {aas_core_testgen_repo} ...")
for pth in [aas_core_testgen_repo / "test_data" / name for name in ("Json", "Xml")]:
Expand Down Expand Up @@ -590,12 +590,12 @@ def main() -> int:
aas_core_codegen_revision=aas_core_codegen_revision,
)

_replace_test_data(our_repo=our_repo, aas_core_testgen_repo=aas_core_testgen_repo)

exit_code = _generate_test_code(our_repo=our_repo)
if exit_code is not None:
return exit_code

_replace_test_data(our_repo=our_repo, aas_core_testgen_repo=aas_core_testgen_repo)

_reformat_code(our_repo=our_repo)

_run_tests_and_rerecord(our_repo=our_repo)
Expand Down
Loading