OSDN Git Service

Compile checker run-tests with Jack
authorSebastien Hertz <shertz@google.com>
Fri, 19 Feb 2016 15:54:05 +0000 (16:54 +0100)
committerSebastien Hertz <shertz@google.com>
Tue, 23 Feb 2016 16:46:39 +0000 (17:46 +0100)
Bug: 25635944
Bug: 19467889
Change-Id: I3c3fcbcbd2f6c142dbea279a9ecd9d372e79b3b9

test/555-checker-regression-x86const/build
test/run-test

index 09dcc36..92ddfc9 100644 (file)
@@ -27,14 +27,12 @@ mkdir classes-ex
 mv classes/UnresolvedClass.class classes-ex
 
 if [ ${USE_JACK} = "true" ]; then
-  # Create .jack files from classes generated with javac.
-  ${JILL} classes --output classes.jack
-  ${JILL} classes-ex --output classes-ex.jack
+  jar cf classes.jill.jar -C classes .
+  jar cf classes-ex.jill.jar -C classes-ex .
 
-  # Create DEX files from .jack files.
-  ${JACK} --import classes.jack --output-dex .
+  ${JACK} --import classes.jill.jar --output-dex .
   zip $TEST_NAME.jar classes.dex
-  ${JACK} --import classes-ex.jack --output-dex .
+  ${JACK} --import classes-ex.jill.jar --output-dex .
   zip ${TEST_NAME}-ex.jar classes.dex
 else
   if [ ${NEED_DEX} = "true" ]; then
index f1875d7..a7a9876 100755 (executable)
@@ -677,9 +677,9 @@ function arch_supports_read_barrier() {
 # Tests named '<number>-checker-*' will also have their CFGs verified with
 # Checker when compiled with Optimizing on host.
 if [[ "$TEST_NAME" =~ ^[0-9]+-checker- ]]; then
-  # Jack does not necessarily generate the same DEX output than dx. Because these tests depend
-  # on a particular DEX output, keep building them with dx for now (b/19467889).
-  USE_JACK="false"
+  # Disable optimizations where Jack may simplify statements with constants
+  # (like 'null instanceof SomeType').
+  JACK="$JACK -D jack.optimization.expression-simplifier=false"
 
   if [ "$runtime" = "art" -a "$image_suffix" = "-optimizing" ]; then
     # Optimizing has read barrier support for certain architectures