Skip to content

Commit

Permalink
Set vm.bits property
Browse files Browse the repository at this point in the history
Fail the test harness if property is wrong

Signed-off-by: Sophia Guo <sophia.gwf@gmail.com>
  • Loading branch information
sophia-guo committed Dec 3, 2020
1 parent dd469ee commit 42bc84d
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions closed/test/jtreg-ext/requires/OpenJ9PropsExt.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* ===========================================================================
* (c) Copyright IBM Corp. 2019, 2019 All Rights Reserved
* (c) Copyright IBM Corp. 2019, 2020 All Rights Reserved
* ===========================================================================
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -35,10 +35,26 @@ public class OpenJ9PropsExt implements Callable<Map<String, String>> {
public Map<String, String> call() {

Map<String, String> map = new HashMap<>();
map.put("vm.graal.enabled", "false");

try {
map.put("vm.graal.enabled", "false");
map.put("vm.bits", vmBits());
}
catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
return map;
}

/**
* @return VM bitness, the value of the "sun.arch.data.model" property.
*/
protected String vmBits() throws Exception {
String dataModel = System.getProperty("sun.arch.data.model");
if (dataModel != null) {
return dataModel;
} else {
throw new Exception("Can't get 'sun.arch.data.model' property");
}
}
}

0 comments on commit 42bc84d

Please sign in to comment.