ART: Fix old run scripts
The run scripts had not been updated when the central command script
was unified, so they were always choosing target mode.
Also update the run scripts so they abort when wrong options are
used.
Also strip superfluous whitespace from commands.
Change-Id: I13cc59f43734a86062fc3ce5ff4ea308c301d4d3
diff --git a/test/119-noimage-patchoat/run b/test/119-noimage-patchoat/run
index 745b0c9..c409cbb 100644
--- a/test/119-noimage-patchoat/run
+++ b/test/119-noimage-patchoat/run
@@ -14,10 +14,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Force relocation otherwise we will just use the already created core.oat/art pair.
-flags="${@/--no-relocate/--relocate}"
+flags="$@"
-if [ $(basename $RUN) == 'host-run-test-jar' ]; then
+# Force relocation otherwise we will just use the already created core.oat/art pair.
+# Note: relocate is the default.
+if [[ "${flags}" == *--no-relocate* ]] ; then
+ echo "Test 119-noimage-patchoat is not intended to run in no-relocate mode."
+ exit 1
+fi
+
+if [[ $@ == *--host* ]]; then
false_bin="/bin/false"
else
false_bin="/system/bin/false"