Skip to content

Commit

Permalink
[LaunchTestsOnLsf] Invoke java with assertions enabled (#1066)
Browse files Browse the repository at this point in the history
* [Gradle] Enable assertions for testLsf task

Signed-off-by: Eddie Hung <[email protected]>

* Revert "[Gradle] Enable assertions for testLsf task"

This reverts commit 9794157.

Signed-off-by: Eddie Hung <[email protected]>

* [LaunchTestsOnLsf] Invoke java with assertions enabled

Signed-off-by: Eddie Hung <[email protected]>

* Revert "[LaunchTestsOnLsf] Invoke java with assertions enabled"

This reverts commit b86852b.

Signed-off-by: Eddie Hung <[email protected]>

* [LaunchTestsOnLsf] Invoke java with assertions enabled

Signed-off-by: Eddie Hung <[email protected]>

---------

Signed-off-by: Eddie Hung <[email protected]>
  • Loading branch information
eddieh-xlnx authored Sep 19, 2024
1 parent 8797324 commit a2c1284
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/com/xilinx/rapidwright/util/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ public void setCommand(String command) {
* @param memoryLimitMB maximum memory in MB
* @param arguments command arguments as single string
*/
public void setRapidWrightCommand(Class<?> mainClass, int memoryLimitMB, String arguments) {
public void setRapidWrightCommand(Class<?> mainClass, int memoryLimitMB, boolean enableAssertions, String arguments) {
command = System.getProperty("java.home")+"/bin/java -cp "
+ System.getProperty("java.class.path") + " -Xmx"+memoryLimitMB+"m "
+ (enableAssertions ? "-ea " : "")
+ mainClass.getCanonicalName()+" "+arguments;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ public static void main(String[] args) {
int memMB = pair.getSecond()*1024;
LSFJob job = new LSFJob();
job.setRunDir(toJobDir(pair.getFirst()));
job.setRapidWrightCommand(RunTest.class, memMB,'"'+testsJar.toString()+"\" \""+pair.getFirst()+'"');
job.setRapidWrightCommand(RunTest.class, memMB, true,
'"'+testsJar.toString()+"\" \""+pair.getFirst()+'"');
job.setLsfResourceMemoryLimit(memMB);
jq.addJob(job);
jobsToTests.put(job, pair.getFirst());
Expand Down

0 comments on commit a2c1284

Please sign in to comment.