8239461: Use jcod rather than jar files in runtime tests

Reviewed-by: hseigel, lmesnik, dholmes
This commit is contained in:
Coleen Phillimore 2020-02-20 07:25:14 -05:00
parent 58a5910393
commit b4ffe4d8f7
16 changed files with 4209 additions and 31 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -28,6 +28,7 @@
* @summary Check for exception instead of assert.
* @modules java.base/jdk.internal.misc
* java.management
* @compile LambdaMath.jcod
* @run main ClassFileParserBug
*/
@ -39,9 +40,7 @@ public class ClassFileParserBug {
public static void main(String args[]) throws Throwable {
System.out.println("Regression test for bug 8040018");
String testsrc = System.getProperty("test.src") + "/";
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-jar", testsrc + File.separator + "test.jar");
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("LambdaMath");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
output.shouldContain("java.lang.ClassFormatError: Bad length on BootstrapMethods");
output.shouldHaveExitValue(1);