Skip to content

Commit

Permalink
Merge pull request #6 from eProsima/feature/speedup_testing
Browse files Browse the repository at this point in the history
Speedup testing [6501]
  • Loading branch information
Luis Gasco committed Oct 2, 2019
2 parents 9c1f272 + 1914e0e commit add3e22
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/test/java/com/eprosima/fastrtps/FastRTPSGenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import static org.junit.Assert.assertEquals;

import java.util.ArrayList;
import java.nio.file.Paths;
import java.nio.file.Files;

public class FastRTPSGenTest
{
Expand Down Expand Up @@ -40,12 +42,19 @@ public void runTests()

//Configure Fast-RTPS for the tests
ArrayList<String[]> commands = new ArrayList<String[]>();
commands.add(new String[]{"mkdir -p " + OUTPUT_PATH, "."});
commands.add(new String[]{"rm -rf Fast-RTPS", OUTPUT_PATH});
commands.add(new String[]{"git clone -b " + branch + " https://github.com/eProsima/Fast-RTPS.git", OUTPUT_PATH});
commands.add(new String[]{"mkdir build", OUTPUT_PATH + "/Fast-RTPS"});
if (Files.notExists(Paths.get(OUTPUT_PATH + "/Fast-RTPS/build")))
{
commands.add(new String[]{"mkdir -p " + OUTPUT_PATH, "."});
commands.add(new String[]{"rm -rf Fast-RTPS", OUTPUT_PATH});
commands.add(new String[]{"git clone -b " + branch + " https://github.com/eProsima/Fast-RTPS.git", OUTPUT_PATH});
commands.add(new String[]{"mkdir build", OUTPUT_PATH + "/Fast-RTPS"});
}
else
{
commands.add(new String[]{"git checkout -f " + branch, OUTPUT_PATH + "/Fast-RTPS"});
}
commands.add(new String[]{"cmake .. -DTHIRDPARTY=ON -DCMAKE_INSTALL_PREFIX=install", OUTPUT_PATH + "/Fast-RTPS/build"});
commands.add(new String[]{"make install", OUTPUT_PATH + "/Fast-RTPS/build"});
commands.add(new String[]{"make -j" + Runtime.getRuntime().availableProcessors() + " install", OUTPUT_PATH + "/Fast-RTPS/build"});

for(String[] command: commands)
{
Expand Down

0 comments on commit add3e22

Please sign in to comment.