summaryrefslogtreecommitdiffstats
path: root/extras/scripts/tests/test_crcchecker.sh
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2020-09-22 15:11:51 +0000
committerOle Tr�an <otroan@employees.org>2020-09-23 08:09:54 +0000
commit6a3d4cc9a11efbe73a1cda35a64c619eebde0b24 (patch)
treed669cc2362139b9fa25d20fe962e2cd880d8298e /extras/scripts/tests/test_crcchecker.sh
parent5b7ea9122e5d9efc632633909933347c98cf3bfc (diff)
vppapigen: crcchecker: harmonize the in_progress marking
The format for deprecation is "option deprecated" now, so harmonize the in-progress marking to logically be "option in_progress" At the same time recognize the legacy/erroneous types of marking, print the warning. Change-Id: If418dfadd69ffb112550164d63d13420e51cefd7 Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'extras/scripts/tests/test_crcchecker.sh')
-rwxr-xr-xextras/scripts/tests/test_crcchecker.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/extras/scripts/tests/test_crcchecker.sh b/extras/scripts/tests/test_crcchecker.sh
index 07b6bbf7f4b..9cfc66ae523 100755
--- a/extras/scripts/tests/test_crcchecker.sh
+++ b/extras/scripts/tests/test_crcchecker.sh
@@ -77,6 +77,29 @@ git add crccheck.api
git commit -m "deprecated api";
extras/scripts/crcchecker.py --check-patchset
+echo "TEST 7.1: Verify we can delete deprecated message (old/confused style)"
+cat >crccheck_dep.api <<EOL
+option version="1.0.0";
+autoreply define crccheck
+{
+ option status="deprecated";
+ bool foo;
+};
+EOL
+git add crccheck_dep.api
+git commit -m "deprecated api";
+# delete API
+cat >crccheck_dep.api <<EOL
+option version="1.0.0";
+autoreply define crccheck_2
+{
+ bool foo;
+};
+EOL
+git add crccheck_dep.api
+git commit -m "deprecated api";
+extras/scripts/crcchecker.py --check-patchset
+
echo "TEST 8: Verify that we can not rename a non-deprecated message"
sed -i -e 's/crccheck_2/crccheck_3/g' crccheck.api
git add crccheck.api
@@ -107,6 +130,13 @@ git add crccheck.api
git commit -m "renamed in-progress api";
extras/scripts/crcchecker.py --check-patchset
+echo "TEST11.1: Switch to new designation of in-progress API"
+sed -i -e 's/status="in_progress"/in_progress/g' crccheck.api
+git add crccheck.api
+git commit -m "new designation of in-progress api";
+extras/scripts/crcchecker.py --check-patchset
+
+
echo "TEST12: Verify we can add a field to an in-progress API"
sed -i -e 's/foobar;/foobar; bool new_baz;/g' crccheck.api
git add crccheck.api