diff options
| author | 2018-02-12 11:06:54 +0000 | |
|---|---|---|
| committer | 2018-02-12 11:06:54 +0000 | |
| commit | d8c88c7125b1de357f67d61c31eeef2ecfe17dd9 (patch) | |
| tree | 6a72b1328c1444cfbef33d8988b80993a5a63778 | |
| parent | 1fbd5309858e5f70b5adaa1d70b9e438eaf18d33 (diff) | |
Revert "Ensure that run-test preserves exit status"
Fails:
test-art-host-run-test-debug-no-prebuild-interp-ac-no-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-no-jvmti-cdex-fast-134-nodex2oat-nofallback32
This reverts commit 1fbd5309858e5f70b5adaa1d70b9e438eaf18d33.
Change-Id: I29809f7bb26e4a9d81634bcf24d9ce151a41a583
| -rw-r--r-- | test/030-bad-finalizer/expected.txt | 1 | ||||
| -rwxr-xr-x | test/030-bad-finalizer/run | 19 | ||||
| -rw-r--r-- | test/034-call-null/expected.txt | 1 | ||||
| -rwxr-xr-x | test/034-call-null/run | 19 | ||||
| -rw-r--r-- | test/038-inner-null/expected.txt | 1 | ||||
| -rwxr-xr-x | test/038-inner-null/run | 19 | ||||
| -rw-r--r-- | test/054-uncaught/expected.txt | 1 | ||||
| -rwxr-xr-x | test/054-uncaught/run | 19 | ||||
| -rw-r--r-- | test/714-invoke-custom-lambda-metafactory/expected.txt | 1 | ||||
| -rwxr-xr-x | test/714-invoke-custom-lambda-metafactory/run | 19 | ||||
| -rwxr-xr-x | test/etc/run-test-jar | 8 |
11 files changed, 1 insertions, 107 deletions
diff --git a/test/030-bad-finalizer/expected.txt b/test/030-bad-finalizer/expected.txt index 0aca6f2e93..74e208c3f9 100644 --- a/test/030-bad-finalizer/expected.txt +++ b/test/030-bad-finalizer/expected.txt @@ -2,4 +2,3 @@ About to null reference. Finalizer started and spinning... Finalizer done spinning. Finalizer sleeping forever now. -exit status: 2 diff --git a/test/030-bad-finalizer/run b/test/030-bad-finalizer/run deleted file mode 100755 index 7a0d0d05ab..0000000000 --- a/test/030-bad-finalizer/run +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Squash the exit status and put it in expected -./default-run "$@" -echo "exit status:" $? diff --git a/test/034-call-null/expected.txt b/test/034-call-null/expected.txt index 11aefde417..4e0281e556 100644 --- a/test/034-call-null/expected.txt +++ b/test/034-call-null/expected.txt @@ -1,3 +1,2 @@ Exception in thread "main" java.lang.NullPointerException: Attempt to invoke direct method 'void Main.doStuff(int, int[][], java.lang.String, java.lang.String[][])' on a null object reference at Main.main(Main.java:26) -exit status: 1 diff --git a/test/034-call-null/run b/test/034-call-null/run deleted file mode 100755 index 7a0d0d05ab..0000000000 --- a/test/034-call-null/run +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Squash the exit status and put it in expected -./default-run "$@" -echo "exit status:" $? diff --git a/test/038-inner-null/expected.txt b/test/038-inner-null/expected.txt index d148eff407..2e925644e3 100644 --- a/test/038-inner-null/expected.txt +++ b/test/038-inner-null/expected.txt @@ -2,4 +2,3 @@ new Special() Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'void Main$Blort.repaint()' on a null object reference at Main$Special.callInner(Main.java:31) at Main.main(Main.java:20) -exit status: 1 diff --git a/test/038-inner-null/run b/test/038-inner-null/run deleted file mode 100755 index 7a0d0d05ab..0000000000 --- a/test/038-inner-null/run +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Squash the exit status and put it in expected -./default-run "$@" -echo "exit status:" $? diff --git a/test/054-uncaught/expected.txt b/test/054-uncaught/expected.txt index 878260a07d..7d7f03c3a7 100644 --- a/test/054-uncaught/expected.txt +++ b/test/054-uncaught/expected.txt @@ -18,4 +18,3 @@ Uncaught exception DEFAULT! java.lang.NullPointerException: Hi diddly-ho, neighborino. at Main.catchTheUncaught(Main.java:63) at Main.main(Main.java:26) -exit status: 1 diff --git a/test/054-uncaught/run b/test/054-uncaught/run deleted file mode 100755 index 7a0d0d05ab..0000000000 --- a/test/054-uncaught/run +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Squash the exit status and put it in expected -./default-run "$@" -echo "exit status:" $? diff --git a/test/714-invoke-custom-lambda-metafactory/expected.txt b/test/714-invoke-custom-lambda-metafactory/expected.txt index 54b6c24798..cbe98404c5 100644 --- a/test/714-invoke-custom-lambda-metafactory/expected.txt +++ b/test/714-invoke-custom-lambda-metafactory/expected.txt @@ -2,4 +2,3 @@ Exception in thread "main" java.lang.BootstrapMethodError: Exception from call s at Main.main(Main.java:25) Caused by: java.lang.NullPointerException: Bootstrap method returned null ... 1 more -exit status: 1 diff --git a/test/714-invoke-custom-lambda-metafactory/run b/test/714-invoke-custom-lambda-metafactory/run deleted file mode 100755 index 7a0d0d05ab..0000000000 --- a/test/714-invoke-custom-lambda-metafactory/run +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# -# Copyright 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Squash the exit status and put it in expected -./default-run "$@" -echo "exit status:" $? diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index 59c902264a..055cffbbb4 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -886,14 +886,11 @@ if [ "$HOST" = "n" ]; then adb push $cmdfile $DEX_LOCATION/cmdline.sh > /dev/null 2>&1 fi - exit_status=0 if [ "$DRY_RUN" != "y" ]; then adb shell sh $DEX_LOCATION/cmdline.sh - exit_status=$? fi rm -f $cmdfile - exit $exit_status else # Host run. export ANDROID_PRINTF_LOG=brief @@ -999,12 +996,10 @@ else trap 'kill -INT -$pid' INT $cmdline "$@" 2>&1 & pid=$! wait $pid - exit_value=$? # Add extra detail if time out is enabled. - if [ $exit_value = 124 ] && [ "$TIME_OUT" = "timeout" ]; then + if [ ${PIPESTATUS[0]} = 124 ] && [ "$TIME_OUT" = "timeout" ]; then echo -e "\e[91mTEST TIMED OUT!\e[0m" >&2 fi - exit $exit_value else # With a thread dump that uses gdb if a timeout. trap 'kill -INT -$pid' INT @@ -1027,7 +1022,6 @@ else # The test timed out. echo -e "\e[91mTEST TIMED OUT!\e[0m" >&2 fi - exit $test_exit_status fi fi fi |