From 25c74e5023af84d441d008ca25c355163b8906d3 Mon Sep 17 00:00:00 2001 From: Tomas Peterka Date: Mon, 26 Feb 2024 14:46:27 +0100 Subject: [PATCH] test: update tests that west.yaml becamse a generic yaml for configuration --- tests/local-template/{west.yaml => west.yml} | 6 +++--- tests/run.sh | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) rename tests/local-template/{west.yaml => west.yml} (74%) diff --git a/tests/local-template/west.yaml b/tests/local-template/west.yml similarity index 74% rename from tests/local-template/west.yaml rename to tests/local-template/west.yml index 23033b6..bdfa73d 100644 --- a/tests/local-template/west.yaml +++ b/tests/local-template/west.yml @@ -14,6 +14,6 @@ manifest: revision: v1.0.0 import: true - gira: - observe: - dep1-west: "file://${GIRA_TEST_ROOT}/remote/dep1/.git" +gira: + observe: + dep1-west: "file://${GIRA_TEST_ROOT}/remote/dep1/.git" diff --git a/tests/run.sh b/tests/run.sh index 734d462..b113d3f 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -15,7 +15,7 @@ envsubst < local-template/poetry/pyproject.toml > local/poetry/pyproject.toml envsubst < local-template/poetry/poetry.lock > local/poetry/poetry.lock envsubst < local-template/pyproject.toml > local/pyproject.toml envsubst < local-template/pubspec.yaml > local/pubspec.yaml -envsubst < local-template/west.yaml > local/west.yaml +envsubst < local-template/west.yml > local/west.yml envsubst < local-template/.gira.yaml > local/.gira.yaml @@ -70,8 +70,8 @@ grep OCD-567 output.txt echo "-- Test pubspec.yaml" git reset --hard rm -rf .gira_cache output.txt -sed -i 's/1.0.0/1.1.0/g' west.yaml -gira -c west.yaml > output.txt +sed -i 's/1.0.0/1.1.0/g' west.yml +gira -c west.yml > output.txt grep dep1-west output.txt grep OCD-1234 output.txt grep -v OCD-567 output.txt @@ -80,13 +80,13 @@ grep -v OCD-567 output.txt echo "-- Test moving from 1.0.0 to 1.1.0 and then to 1.1.1" git reset --hard rm -rf .gira_cache output.txt -sed -i 's/1.0.0/1.1.0/g' west.yaml -gira -c west.yaml > output.txt +sed -i 's/1.0.0/1.1.0/g' west.yml +gira -c west.yml > output.txt grep OCD-1234 output.txt grep -v OCD-567 output.txt # now move to 1.1.1 -sed -i 's/1.1.0/1.1.1/g' west.yaml -gira -c west.yaml > output.txt +sed -i 's/1.1.0/1.1.1/g' west.yml +gira -c west.yml > output.txt grep OCD-1234 output.txt grep OCD-567 output.txt @@ -94,14 +94,14 @@ grep OCD-567 output.txt echo "-- Test pre-commit" git reset --hard rm -rf .gira_cache output.txt -sed -i 's/1.0.0/1.1.1/g' west.yaml +sed -i 's/1.0.0/1.1.1/g' west.yml echo "" > .git/COMMIT_EDITMSG # clear the commit message -gira -c west.yaml .git/COMMIT_EDITMSG +gira -c west.yml .git/COMMIT_EDITMSG grep OCD-1234 .git/COMMIT_EDITMSG # gira should output there instead of stdout grep OCD-567 .git/COMMIT_EDITMSG # gira should output there instead of stdout echo "should stay" > randomFile.txt -gira -c west.yaml randomFile.txt # gira must not override anything else than the commit message file +gira -c west.yml randomFile.txt # gira must not override anything else than the commit message file grep "should stay" randomFile.txt # gira should not touch the file grep -v OCD-1234 randomFile.txt grep -v OCD-567 randomFile.txt