Skip to content

Commit 1cd4fdc

Browse files
idodeclareVladimir Kotal
authored andcommitted
Retire CtagsInstalled check. ctags is fundamental to OpenGrok.
1 parent 2768fd7 commit 1cd4fdc

24 files changed

+14
-204
lines changed

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/CtagsTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,18 @@
2929
import static org.junit.Assert.assertEquals;
3030
import static org.junit.Assert.assertTrue;
3131
import org.junit.BeforeClass;
32-
import org.junit.Rule;
3332
import org.junit.Test;
34-
import org.opengrok.indexer.condition.ConditionalRun;
35-
import org.opengrok.indexer.condition.ConditionalRunRule;
36-
import org.opengrok.indexer.condition.CtagsInstalled;
3733
import org.opengrok.indexer.util.TestRepository;
3834

3935
/**
4036
*
4137
* @author Lubos Kosco
4238
*/
43-
@ConditionalRun(CtagsInstalled.class)
4439
public class CtagsTest {
4540

4641
private static Ctags ctags;
4742
private static TestRepository repository;
4843

49-
@Rule
50-
public ConditionalRunRule rule = new ConditionalRunRule();
51-
5244
@BeforeClass
5345
public static void setUpClass() throws Exception {
5446
ctags = new Ctags();

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/JFlexXrefTest.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import static org.junit.Assert.assertEquals;
4040
import static org.junit.Assert.assertTrue;
4141
import org.junit.BeforeClass;
42-
import org.junit.Rule;
4342
import org.junit.Test;
4443
import org.opengrok.indexer.analysis.c.CXref;
4544
import org.opengrok.indexer.analysis.c.CxxXref;
@@ -58,9 +57,7 @@
5857
import org.opengrok.indexer.analysis.sql.SQLXref;
5958
import org.opengrok.indexer.analysis.tcl.TclXref;
6059
import org.opengrok.indexer.analysis.uue.UuencodeXref;
61-
import org.opengrok.indexer.condition.ConditionalRun;
62-
import org.opengrok.indexer.condition.ConditionalRunRule;
63-
import org.opengrok.indexer.condition.CtagsInstalled;
60+
6461
import static org.opengrok.indexer.util.CustomAssertions.assertLinesEqual;
6562
import org.opengrok.indexer.util.TestRepository;
6663
import org.xml.sax.InputSource;
@@ -73,9 +70,6 @@ public class JFlexXrefTest {
7370
private static Ctags ctags;
7471
private static TestRepository repository;
7572

76-
@Rule
77-
public ConditionalRunRule rule = new ConditionalRunRule();
78-
7973
/**
8074
* This is what we expect to find at the beginning of the first line
8175
* returned by an xref.
@@ -165,7 +159,6 @@ private void bug15890LineCount(JFlexNonXref xref) throws Exception {
165159
* used to cause trouble.
166160
*/
167161
@Test
168-
@ConditionalRun(CtagsInstalled.class)
169162
public void testBug15890Anchor() throws Exception {
170163
bug15890Anchor(CXref.class, "c/bug15890.c");
171164
bug15890Anchor(CxxXref.class, "c/bug15890.c");
@@ -383,7 +376,6 @@ public void testEmptyJavaComment() throws IOException {
383376
}
384377

385378
@Test
386-
@ConditionalRun(CtagsInstalled.class)
387379
public void bug18586() throws IOException, InterruptedException {
388380
String filename = repository.getSourceRoot() + "/sql/bug18586.sql";
389381
Reader in = new InputStreamReader(new FileInputStream(filename), "UTF-8");
@@ -398,7 +390,6 @@ public void bug18586() throws IOException, InterruptedException {
398390
* This originally became a problem after upgrade to JFlex 1.5.0.
399391
*/
400392
@Test
401-
@ConditionalRun(CtagsInstalled.class)
402393
public void unterminatedHeredoc() throws IOException {
403394
JFlexXref xref = new JFlexXref(new ShXref(new StringReader(
404395
"cat << EOF\nunterminated heredoc")));

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/c/CAnalyzerFactoryTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,12 @@
4040
import org.apache.lucene.index.IndexableField;
4141
import org.junit.AfterClass;
4242
import org.junit.BeforeClass;
43-
import org.junit.Rule;
4443
import org.junit.Test;
4544
import org.opengrok.indexer.analysis.AbstractAnalyzer;
4645
import org.opengrok.indexer.analysis.Ctags;
4746
import org.opengrok.indexer.analysis.Scopes;
4847
import org.opengrok.indexer.analysis.Scopes.Scope;
4948
import org.opengrok.indexer.analysis.StreamSource;
50-
import org.opengrok.indexer.condition.ConditionalRun;
51-
import org.opengrok.indexer.condition.ConditionalRunRule;
52-
import org.opengrok.indexer.condition.CtagsInstalled;
5349
import org.opengrok.indexer.configuration.RuntimeEnvironment;
5450
import org.opengrok.indexer.search.QueryBuilder;
5551
import org.opengrok.indexer.util.TestRepository;
@@ -58,16 +54,12 @@
5854
*
5955
* @author Tomas Kotal
6056
*/
61-
@ConditionalRun(CtagsInstalled.class)
6257
public class CAnalyzerFactoryTest {
6358

6459
private static Ctags ctags;
6560
private static TestRepository repository;
6661
private static AbstractAnalyzer analyzer;
6762

68-
@Rule
69-
public ConditionalRunRule rule = new ConditionalRunRule();
70-
7163
private static StreamSource getStreamSource(final String fname) {
7264
return new StreamSource() {
7365
@Override

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/c/CxxAnalyzerFactoryTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,12 @@
4040
import org.apache.lucene.index.IndexableField;
4141
import org.junit.AfterClass;
4242
import org.junit.BeforeClass;
43-
import org.junit.Rule;
4443
import org.junit.Test;
4544
import org.opengrok.indexer.analysis.AbstractAnalyzer;
4645
import org.opengrok.indexer.analysis.Ctags;
4746
import org.opengrok.indexer.analysis.Scopes;
4847
import org.opengrok.indexer.analysis.Scopes.Scope;
4948
import org.opengrok.indexer.analysis.StreamSource;
50-
import org.opengrok.indexer.condition.ConditionalRun;
51-
import org.opengrok.indexer.condition.ConditionalRunRule;
52-
import org.opengrok.indexer.condition.CtagsInstalled;
5349
import org.opengrok.indexer.configuration.RuntimeEnvironment;
5450
import org.opengrok.indexer.search.QueryBuilder;
5551
import org.opengrok.indexer.util.TestRepository;
@@ -58,16 +54,12 @@
5854
*
5955
* @author Tomas Kotal
6056
*/
61-
@ConditionalRun(CtagsInstalled.class)
6257
public class CxxAnalyzerFactoryTest {
6358

6459
private static Ctags ctags;
6560
private static TestRepository repository;
6661
private static AbstractAnalyzer analyzer;
6762

68-
@Rule
69-
public ConditionalRunRule rule = new ConditionalRunRule();
70-
7163
private static StreamSource getStreamSource(final String fname) {
7264
return new StreamSource() {
7365
@Override

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/clojure/ClojureAnalyzerFactoryTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,11 @@
2727
import org.apache.lucene.document.Field;
2828
import org.junit.AfterClass;
2929
import org.junit.BeforeClass;
30-
import org.junit.Rule;
3130
import org.junit.Test;
3231
import org.opengrok.indexer.analysis.AbstractAnalyzer;
3332
import org.opengrok.indexer.analysis.Ctags;
3433
import org.opengrok.indexer.analysis.Definitions;
3534
import org.opengrok.indexer.analysis.StreamSource;
36-
import org.opengrok.indexer.condition.ConditionalRun;
37-
import org.opengrok.indexer.condition.ConditionalRunRule;
38-
import org.opengrok.indexer.condition.CtagsInstalled;
3935
import org.opengrok.indexer.configuration.RuntimeEnvironment;
4036
import org.opengrok.indexer.search.QueryBuilder;
4137
import org.opengrok.indexer.util.TestRepository;
@@ -55,16 +51,12 @@
5551
/**
5652
* @author Farid Zakaria
5753
*/
58-
@ConditionalRun(CtagsInstalled.class)
5954
public class ClojureAnalyzerFactoryTest {
6055

6156
private static Ctags ctags;
6257
private static TestRepository repository;
6358
private static AbstractAnalyzer analyzer;
6459

65-
@Rule
66-
public ConditionalRunRule rule = new ConditionalRunRule();
67-
6860
private static StreamSource getStreamSource(final String fname) {
6961
return new StreamSource() {
7062
@Override

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/csharp/CSharpAnalyzerFactoryTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import org.apache.lucene.document.Field;
3434
import org.junit.AfterClass;
3535
import org.junit.BeforeClass;
36-
import org.junit.Rule;
3736
import org.junit.Test;
3837
import static org.junit.Assert.*;
3938
import static org.opengrok.indexer.analysis.AnalyzerGuru.string_ft_nstored_nanalyzed_norms;
@@ -43,9 +42,6 @@
4342
import org.opengrok.indexer.analysis.Scopes;
4443
import org.opengrok.indexer.analysis.Scopes.Scope;
4544
import org.opengrok.indexer.analysis.StreamSource;
46-
import org.opengrok.indexer.condition.ConditionalRun;
47-
import org.opengrok.indexer.condition.ConditionalRunRule;
48-
import org.opengrok.indexer.condition.CtagsInstalled;
4945
import org.opengrok.indexer.configuration.RuntimeEnvironment;
5046
import org.opengrok.indexer.search.QueryBuilder;
5147
import org.opengrok.indexer.util.TestRepository;
@@ -54,16 +50,12 @@
5450
*
5551
* @author Tomas Kotal
5652
*/
57-
@ConditionalRun(CtagsInstalled.class)
5853
public class CSharpAnalyzerFactoryTest {
5954

6055
private static Ctags ctags;
6156
private static TestRepository repository;
6257
private static AbstractAnalyzer analyzer;
6358

64-
@Rule
65-
public ConditionalRunRule rule = new ConditionalRunRule();
66-
6759
private static StreamSource getStreamSource(final String fname) {
6860
return new StreamSource() {
6961
@Override

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/executables/JarAnalyzerTest.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,19 @@
1919

2020
/*
2121
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
22-
* Portions Copyright (c) 2018, Chris Fraire <[email protected]>.
22+
* Portions Copyright (c) 2018-2019, Chris Fraire <[email protected]>.
2323
*/
2424

2525
package org.opengrok.indexer.analysis.executables;
2626

2727
import java.io.File;
28-
import java.util.ArrayList;
2928
import java.util.Collections;
3029
import java.util.TreeSet;
3130
import org.junit.AfterClass;
3231
import static org.junit.Assert.assertTrue;
3332
import org.junit.BeforeClass;
34-
import org.junit.ClassRule;
3533
import org.junit.Test;
3634
import org.opengrok.indexer.authorization.AuthorizationFrameworkReloadTest;
37-
import org.opengrok.indexer.condition.ConditionalRun;
38-
import org.opengrok.indexer.condition.ConditionalRunRule;
39-
import org.opengrok.indexer.condition.CtagsInstalled;
4035
import org.opengrok.indexer.configuration.RuntimeEnvironment;
4136
import org.opengrok.indexer.index.Indexer;
4237
import org.opengrok.indexer.util.TestRepository;
@@ -51,7 +46,6 @@
5146
* <p>
5247
* Derived from Trond Norbye's {@code SearchEngineTest}
5348
*/
54-
@ConditionalRun(CtagsInstalled.class)
5549
public class JarAnalyzerTest {
5650

5751
private static final String TESTPLUGINS_JAR = "testplugins.jar";
@@ -61,9 +55,6 @@ public class JarAnalyzerTest {
6155
private static File configFile;
6256
private static boolean originalProjectsEnabled;
6357

64-
@ClassRule
65-
public static ConditionalRunRule rule = new ConditionalRunRule();
66-
6758
@BeforeClass
6859
public static void setUpClass() throws Exception {
6960
env = RuntimeEnvironment.getInstance();

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/java/JavaAnalyzerFactoryTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,12 @@
4040
import org.apache.lucene.index.IndexableField;
4141
import org.junit.AfterClass;
4242
import org.junit.BeforeClass;
43-
import org.junit.Rule;
4443
import org.junit.Test;
4544
import org.opengrok.indexer.analysis.AbstractAnalyzer;
4645
import org.opengrok.indexer.analysis.Ctags;
4746
import org.opengrok.indexer.analysis.Scopes;
4847
import org.opengrok.indexer.analysis.Scopes.Scope;
4948
import org.opengrok.indexer.analysis.StreamSource;
50-
import org.opengrok.indexer.condition.ConditionalRun;
51-
import org.opengrok.indexer.condition.ConditionalRunRule;
52-
import org.opengrok.indexer.condition.CtagsInstalled;
5349
import org.opengrok.indexer.configuration.RuntimeEnvironment;
5450
import org.opengrok.indexer.search.QueryBuilder;
5551
import org.opengrok.indexer.util.TestRepository;
@@ -58,16 +54,12 @@
5854
*
5955
* @author Tomas Kotal
6056
*/
61-
@ConditionalRun(CtagsInstalled.class)
6257
public class JavaAnalyzerFactoryTest {
6358

6459
private static Ctags ctags;
6560
private static TestRepository repository;
6661
private static AbstractAnalyzer analyzer;
6762

68-
@Rule
69-
public ConditionalRunRule rule = new ConditionalRunRule();
70-
7163
private static StreamSource getStreamSource(final String fname) {
7264
return new StreamSource() {
7365
@Override

opengrok-indexer/src/test/java/org/opengrok/indexer/analysis/pascal/PascalAnalyzerFactoryTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,13 @@
3737
import static org.junit.Assert.assertTrue;
3838
import static org.junit.Assert.fail;
3939
import org.junit.BeforeClass;
40-
import org.junit.Rule;
4140
import org.junit.Test;
4241
import static org.opengrok.indexer.analysis.AnalyzerGuru.string_ft_nstored_nanalyzed_norms;
4342

4443
import org.opengrok.indexer.analysis.AbstractAnalyzer;
4544
import org.opengrok.indexer.analysis.Ctags;
4645
import org.opengrok.indexer.analysis.Definitions;
4746
import org.opengrok.indexer.analysis.StreamSource;
48-
import org.opengrok.indexer.condition.ConditionalRun;
49-
import org.opengrok.indexer.condition.ConditionalRunRule;
50-
import org.opengrok.indexer.condition.CtagsInstalled;
5147
import org.opengrok.indexer.configuration.RuntimeEnvironment;
5248
import org.opengrok.indexer.search.QueryBuilder;
5349
import org.opengrok.indexer.util.TestRepository;
@@ -56,16 +52,12 @@
5652
*
5753
* @author alexanthony
5854
*/
59-
@ConditionalRun(CtagsInstalled.class)
6055
public class PascalAnalyzerFactoryTest {
6156

6257
private static Ctags ctags;
6358
private static TestRepository repository;
6459
private static AbstractAnalyzer analyzer;
6560

66-
@Rule
67-
public ConditionalRunRule rule = new ConditionalRunRule();
68-
6961
private static StreamSource getStreamSource(final String fname) {
7062
return new StreamSource() {
7163
@Override

opengrok-indexer/src/test/java/org/opengrok/indexer/condition/CtagsInstalled.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)