use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.
the class CtagsTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
ctags = new Ctags();
ctags.setBinary(RuntimeEnvironment.getInstance().getCtags());
repository = new TestRepository();
repository.create(CtagsTest.class.getResourceAsStream("/org/opensolaris/opengrok/index/source.zip"));
/*
* This setting is only needed for bug19195 but it does not seem
* that it is possible to specify it just for single test case.
* The config file contains assembly specific settings so it should
* not be harmful to other test cases.
*/
String extraOptionsFile = repository.getSourceRoot() + "/bug19195/ctags.config";
ctags.setCTagsExtraOptionsFile(extraOptionsFile);
assertTrue("No point in running ctags tests without valid ctags", RuntimeEnvironment.getInstance().validateExuberantCtags());
}
use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.
the class FileHistoryCacheTest method setUp.
/**
* Set up the test environment with repositories and a cache instance.
*
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
repositories = new TestRepository();
repositories.create(getClass().getResourceAsStream("repositories.zip"));
cache = new FileHistoryCache();
cache.initialize();
}
use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.
the class GitHistoryParserTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
repository = new TestRepository();
repository.create(HistoryGuru.class.getResourceAsStream("repositories.zip"));
}
use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.
the class HistoryGuruTest method setUpClass.
@BeforeClass
public static void setUpClass() throws Exception {
repository = new TestRepository();
repository.create(HistoryGuru.class.getResourceAsStream("repositories.zip"));
FileUtilities.getAllFiles(new File(repository.getSourceRoot()), files, true);
RuntimeEnvironment.getInstance().setVerbose(true);
HistoryGuru instance = HistoryGuru.getInstance();
instance.addRepositories(repository.getSourceRoot());
// create cache with initial set of repos
instance.createCache();
// now create cache for more repos
Collection<String> repos = new ArrayList<>();
repos.add("git");
repos.add("bazaar");
repos.add("mercurial");
repos.add("teamware");
repos.add("rcs_test");
repos.add("nonexistent");
instance.createCache(repos);
}
use of org.opensolaris.opengrok.util.TestRepository in project OpenGrok by OpenGrok.
the class MercurialRepositoryTest method setUpTestRepository.
/**
* Set up a test repository. Should be called by the tests that need it. The
* test repository will be destroyed automatically when the test finishes.
*/
private void setUpTestRepository() throws IOException {
repository = new TestRepository();
repository.create(getClass().getResourceAsStream("repositories.zip"));
}
Aggregations