Skip to content

Commit

Permalink
[GR-50672] Fix coverage failures.
Browse files Browse the repository at this point in the history
PullRequest: graal/16848
  • Loading branch information
wirthi committed Feb 9, 2024
2 parents 94399ce + 8e259a0 commit 5ac6621
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

import jdk.graal.compiler.test.SubprocessUtil;
import org.graalvm.word.LocationIdentity;
import org.junit.Assert;
import org.junit.Assume;
Expand Down Expand Up @@ -231,6 +232,7 @@ public boolean checkAssertions() {

@Test
public void test() {
Assume.assumeFalse("JaCoCo causes failure", SubprocessUtil.isJaCoCoAttached()); // GR-50672
assumeManagementLibraryIsLoadable();
runTest(new InvariantsTool());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
*/
package jdk.graal.compiler.truffle.test;

import java.nio.Buffer;

import jdk.graal.compiler.test.SubprocessUtil;
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.HostAccess;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.interop.InteropLibrary;
import com.oracle.truffle.api.interop.InvalidBufferOffsetException;
Expand All @@ -32,12 +41,6 @@
import com.oracle.truffle.api.test.polyglot.ProxyLanguage;
import com.oracle.truffle.api.test.polyglot.ProxyLanguage.LanguageContext;
import com.oracle.truffle.api.test.polyglot.ValueAPITest;
import org.graalvm.polyglot.Context;
import org.graalvm.polyglot.HostAccess;
import org.junit.Before;
import org.junit.Test;

import java.nio.Buffer;

public class PolyglotHostObjectPartialEvaluationTest extends PartialEvaluationTest {

Expand All @@ -58,6 +61,7 @@ public static Object constantFalse() {

@Test
public void hasBufferElements() {
Assume.assumeFalse("JaCoCo causes failure", SubprocessUtil.isJaCoCoAttached()); // GR-50672
for (final Buffer buffer : ValueAPITest.makeTestBuffers()) {
getContext().initialize(ProxyLanguage.ID);
final Object bufferHostObject = LanguageContext.get(null).getEnv().asGuestValue(buffer);
Expand All @@ -75,6 +79,7 @@ public Object execute(VirtualFrame frame) {

@Test
public void isBufferWritable() {
Assume.assumeFalse("JaCoCo causes failure", SubprocessUtil.isJaCoCoAttached()); // GR-50672
for (final Buffer buffer : ValueAPITest.makeTestBuffers()) {
getContext().initialize(ProxyLanguage.ID);
final Object bufferHostObject = LanguageContext.get(null).getEnv().asGuestValue(buffer);
Expand Down

0 comments on commit 5ac6621

Please sign in to comment.