aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/tests/run_plugin_tests.sh
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-10 10:03:56 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-08-10 10:38:07 +0200
commit26cdf5ba84165ff89b74964ceb317e5939a1a083 (patch)
tree9383dc9fdc4e99099446783e51a6772bf26e1df3 /src/objective-c/tests/run_plugin_tests.sh
parent0557f6cd4115419c95a96527f7eff96b2a81c510 (diff)
fix run_plugin_tests.sh
Diffstat (limited to 'src/objective-c/tests/run_plugin_tests.sh')
-rwxr-xr-xsrc/objective-c/tests/run_plugin_tests.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/objective-c/tests/run_plugin_tests.sh b/src/objective-c/tests/run_plugin_tests.sh
index ea1722c937..bcab3bb9cf 100755
--- a/src/objective-c/tests/run_plugin_tests.sh
+++ b/src/objective-c/tests/run_plugin_tests.sh
@@ -42,7 +42,10 @@ $PROTOC \
exit 1
}
-# Verify names of the imported protos in generated code
+# TODO(jtattermusch): rewrite the tests to make them more readable.
+# Also, the way they are written, they need one extra command to run in order to
+# clear $? after they run (see end of this script)
+# Verify names of the imported protos in generated code don't contain dashes.
[ "`cat PluginTest/TestDashFilename.pbrpc.h |
egrep '#import ".*\.pb(objc|rpc)\.h"$' |
egrep '-'`" ] && {
@@ -50,8 +53,12 @@ $PROTOC \
exit 1
}
[ "`cat PluginTest/TestDashFilename.pbrpc.m |
- egrep '#import ".*\.pb(objc|rpc)\.m"$' |
+ egrep '#import ".*\.pb(objc|rpc)\.h"$' |
egrep '-'`" ] && {
echo >&2 "protoc generated import with wrong filename."
exit 1
}
+
+# Run one extra command to clear $? before exiting the script to prevent
+# failing even when tests pass.
+echo "Plugin tests passed."