diff options
author | Benoit Lamarche <benoitlamarche@google.com> | 2015-06-03 18:57:20 +0200 |
---|---|---|
committer | Benoit Lamarche <benoitlamarche@google.com> | 2015-06-17 17:59:02 +0200 |
commit | 397c97b3fd080ea3db25851e7de1c07bc3f9cba1 (patch) | |
tree | bbab3263c7750052793311e80323b0300070ffeb /jack-tests/tests | |
parent | 48b0af54ccabf715f1ead0a5c281984bbdc04237 (diff) | |
download | toolchain_jack-397c97b3fd080ea3db25851e7de1c07bc3f9cba1.zip toolchain_jack-397c97b3fd080ea3db25851e7de1c07bc3f9cba1.tar.gz toolchain_jack-397c97b3fd080ea3db25851e7de1c07bc3f9cba1.tar.bz2 |
Adapt and fix DependenciesTests
Bug: 21486756
(cherry picked from commit 2b27649753700cc3ab6194afc51f8192c472d241)
Change-Id: I69da6542c52940f13b6304675e8324386bb4228f
Diffstat (limited to 'jack-tests/tests')
-rw-r--r-- | jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java index fce94f9..ca77390 100644 --- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java +++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java @@ -21,24 +21,15 @@ import com.android.jack.analysis.dependency.type.TypeDependencies; import com.android.jack.library.FileType; import com.android.jack.library.FileTypeDoesNotExistException; import com.android.jack.library.InputJackLibrary; -import com.android.jack.library.JackLibraryFactory; -import com.android.jack.test.category.KnownBugs; import com.android.jack.test.helper.IncrementalTestHelper; import com.android.jack.test.toolchain.AbstractTestTools; import com.android.sched.util.file.CannotReadException; -import com.android.sched.util.file.Directory; -import com.android.sched.util.file.FileOrDirectory.ChangePermission; -import com.android.sched.util.file.FileOrDirectory.Existence; -import com.android.sched.util.file.FileOrDirectory.Permission; -import com.android.sched.vfs.DirectFS; import com.android.sched.vfs.InputVFile; import junit.framework.Assert; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Test; -import org.junit.experimental.categories.Category; import java.io.IOException; import java.io.InputStreamReader; @@ -63,7 +54,6 @@ public class DependenciesTest009 { * identical. */ @Test - @Ignore public void testDependency001() throws Exception { IncrementalTestHelper ite = new IncrementalTestHelper(AbstractTestTools.createTempDir()); @@ -81,11 +71,9 @@ public class DependenciesTest009 { ite.incrementalBuildFromFolder(); - DirectFS directFS = null; + InputJackLibrary inputJackLibrary = null; try { - directFS = new DirectFS(new Directory(ite.getCompilerStateFolder().getPath(), null, - Existence.MUST_EXIST, Permission.READ, ChangePermission.NOCHANGE), Permission.READ); - InputJackLibrary inputJackLibrary = JackLibraryFactory.getInputLibrary(directFS); + inputJackLibrary = AbstractTestTools.getInputJackLibrary(ite.getCompilerStateFolder()); TypeDependencies typeDependencies = readTypeDependencies(inputJackLibrary); @@ -102,8 +90,8 @@ public class DependenciesTest009 { assert dependencies1.equals(dependencies2); Assert.assertEquals(dependencies1, dependencies2); } finally { - if (directFS != null) { - directFS.close(); + if (inputJackLibrary != null) { + inputJackLibrary.close(); } } } |