Search in sources :

Example 21 with TestRepository

use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.

the class IndexDatabaseTest method setUpClass.

@BeforeClass
public static void setUpClass() throws Exception {
    RuntimeEnvironment env = RuntimeEnvironment.getInstance();
    assertTrue("No ctags available", env.validateExuberantCtags());
    repository = new TestRepository();
    repository.create(IndexDatabase.class.getResourceAsStream("source.zip"));
    env.setSourceRoot(repository.getSourceRoot());
    env.setDataRoot(repository.getDataRoot());
    Indexer indexer = Indexer.getInstance();
    indexer.prepareIndexer(env, true, true, "/c", null, false, false, false, null, null, new ArrayList<String>(), false);
    indexer.doIndexerExecution(true, 1, null, null);
}
Also used : TestRepository(org.opensolaris.opengrok.util.TestRepository) RuntimeEnvironment(org.opensolaris.opengrok.configuration.RuntimeEnvironment) BeforeClass(org.junit.BeforeClass)

Example 22 with TestRepository

use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.

the class IndexerTest method setUp.

@Before
public void setUp() throws IOException {
    repository = new TestRepository();
    repository.create(IndexerTest.class.getResourceAsStream("source.zip"));
}
Also used : TestRepository(org.opensolaris.opengrok.util.TestRepository) Before(org.junit.Before)

Aggregations

TestRepository (org.opensolaris.opengrok.util.TestRepository)22 BeforeClass (org.junit.BeforeClass)17 Ctags (org.opensolaris.opengrok.analysis.Ctags)6 File (java.io.File)4 Before (org.junit.Before)4 RuntimeEnvironment (org.opensolaris.opengrok.configuration.RuntimeEnvironment)3 HistoryGuru (org.opensolaris.opengrok.history.HistoryGuru)3 IndexerTest (org.opensolaris.opengrok.index.IndexerTest)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 CharArrayWriter (java.io.CharArrayWriter)1 PrintStream (java.io.PrintStream)1 ArrayList (java.util.ArrayList)1 CAnalyzerFactoryTest (org.opensolaris.opengrok.analysis.c.CAnalyzerFactoryTest)1