use of org.opengrok.indexer.util.TestRepository in project OpenGrok by OpenGrok.
the class SearchEngineTest method setUpClass.
@BeforeAll
public static void setUpClass() throws Exception {
repository = new TestRepository();
repository.create(HistoryGuru.class.getResource("/repositories"));
RuntimeEnvironment env = RuntimeEnvironment.getInstance();
env.setSourceRoot(repository.getSourceRoot());
env.setDataRoot(repository.getDataRoot());
RepositoryFactory.initializeIgnoredNames(env);
env.setSourceRoot(repository.getSourceRoot());
env.setDataRoot(repository.getDataRoot());
env.setHistoryEnabled(false);
Indexer.getInstance().prepareIndexer(env, true, true, false, null, null);
env.setDefaultProjectsFromNames(new TreeSet<>(Collections.singletonList("/c")));
Indexer.getInstance().doIndexerExecution(true, null, null);
configFile = File.createTempFile("configuration", ".xml");
env.writeConfiguration(configFile);
RuntimeEnvironment.getInstance().readConfiguration(new File(configFile.getAbsolutePath()));
}
use of org.opengrok.indexer.util.TestRepository in project OpenGrok by OpenGrok.
the class HistoryContextTest method setUpClass.
@BeforeAll
public static void setUpClass() throws Exception {
repositories = new TestRepository();
repositories.create(HistoryContextTest.class.getResource("/repositories"));
RuntimeEnvironment.getInstance().setRepositories(repositories.getSourceRoot());
}
use of org.opengrok.indexer.util.TestRepository in project OpenGrok by OpenGrok.
the class SCCSRepositoryTest method setup.
@BeforeAll
public static void setup() throws Exception {
repository = new TestRepository();
URL repositoriesUrl = SCCSRepositoryTest.class.getResource("/repositories");
assertNotNull(repositoriesUrl);
repository.create(repositoriesUrl);
repositoryRoot = new File(repository.getSourceRoot(), "teamware");
assertTrue(repositoryRoot.isDirectory());
sccsRepository = (SCCSRepository) RepositoryFactory.getRepository(repositoryRoot);
assertNotNull(sccsRepository);
}
use of org.opengrok.indexer.util.TestRepository in project OpenGrok by OpenGrok.
the class SearchHelperTest method setUp.
@BeforeEach
public void setUp() throws Exception {
repository = new TestRepository();
repository.create(IndexerTest.class.getClassLoader().getResource("sources"));
env = RuntimeEnvironment.getInstance();
env.setSourceRoot(repository.getSourceRoot());
env.setDataRoot(repository.getDataRoot());
env.setHistoryEnabled(false);
}
use of org.opengrok.indexer.util.TestRepository in project OpenGrok by OpenGrok.
the class JFlexXrefTest method setUpClass.
@BeforeAll
public static void setUpClass() throws Exception {
ctags = new Ctags();
repository = new TestRepository();
repository.create(JFlexXrefTest.class.getClassLoader().getResource("sources"));
}
Aggregations