mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
CommandLineTest: Run findBuildPaths only once
Previously, it was ran before each test, but just running it once before all tests is sufficient. So switch from @Before to @BeforeClass and make the its result variable static.
This commit is contained in:
parent
bdfa7f305c
commit
fc0478eaa9
@ -35,7 +35,7 @@ import java.io.File;
|
||||
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
import org.fest.assertions.Assertions;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import processing.app.helpers.OSUtils;
|
||||
@ -43,11 +43,11 @@ import processing.app.helpers.PreferencesMap;
|
||||
|
||||
public class CommandLineTest {
|
||||
|
||||
File buildPath;
|
||||
File arduinoPath;
|
||||
private static File buildPath;
|
||||
private static File arduinoPath;
|
||||
|
||||
@Before
|
||||
public void findBuildPaths() throws Exception {
|
||||
@BeforeClass
|
||||
public static void findBuildPaths() throws Exception {
|
||||
buildPath = new File(System.getProperty("user.dir"));
|
||||
while (!new File(buildPath, "build").isDirectory()) {
|
||||
buildPath = buildPath.getParentFile();
|
||||
|
Loading…
x
Reference in New Issue
Block a user