mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 05:45:58 +02:00
no need to run indexer for these tests
This commit is contained in:
parent
b7eb03f5f9
commit
4f2aa8c7db
2 changed files with 5 additions and 9 deletions
|
@ -82,11 +82,11 @@ public class CheckerTestCase extends CodanTestCase {
|
||||||
|
|
||||||
public void loadCodeAndRun(String code) {
|
public void loadCodeAndRun(String code) {
|
||||||
loadcode(code);
|
loadcode(code);
|
||||||
runOnProject();
|
runCodan();
|
||||||
}
|
}
|
||||||
public void loadCodeAndRunCpp(String code) {
|
public void loadCodeAndRunCpp(String code) {
|
||||||
loadcode(code, true);
|
loadcode(code, true);
|
||||||
runOnProject();
|
runCodan();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -120,12 +120,7 @@ public class CodanTestCase extends BaseTestCase {
|
||||||
}
|
}
|
||||||
}, null);
|
}, null);
|
||||||
mj.join();
|
mj.join();
|
||||||
// Index the cproject
|
|
||||||
CCorePlugin.getIndexManager().setIndexerId(cprojects[0],
|
|
||||||
IPDOMManager.ID_FAST_INDEXER);
|
|
||||||
// wait until the indexer is done
|
|
||||||
assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000,
|
|
||||||
new NullProgressMonitor()));
|
|
||||||
} finally {
|
} finally {
|
||||||
mj.dispose();
|
mj.dispose();
|
||||||
}
|
}
|
||||||
|
@ -142,6 +137,7 @@ public class CodanTestCase extends BaseTestCase {
|
||||||
// Index the cproject
|
// Index the cproject
|
||||||
CCorePlugin.getIndexManager().setIndexerId(cproject,
|
CCorePlugin.getIndexManager().setIndexerId(cproject,
|
||||||
IPDOMManager.ID_FAST_INDEXER);
|
IPDOMManager.ID_FAST_INDEXER);
|
||||||
|
CCorePlugin.getIndexManager().reindex(cproject);
|
||||||
// wait until the indexer is done
|
// wait until the indexer is done
|
||||||
assertTrue(CCorePlugin.getIndexManager().joinIndexer(1000 * 60, // 1 min
|
assertTrue(CCorePlugin.getIndexManager().joinIndexer(1000 * 60, // 1 min
|
||||||
new NullProgressMonitor()));
|
new NullProgressMonitor()));
|
||||||
|
@ -191,7 +187,7 @@ public class CodanTestCase extends BaseTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public File loadcode(String code, boolean cpp) {
|
public File loadcode(String code, boolean cpp) {
|
||||||
String ext = cpp ? ".cc" : ".c"; //$NON-NLS-1$ //$NON-NLS-2$
|
String ext = cpp ? ".cpp" : ".c"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
File testFile = null;
|
File testFile = null;
|
||||||
try {
|
try {
|
||||||
testFile = File.createTempFile("test", ext, tmpDir); //$NON-NLS-1$
|
testFile = File.createTempFile("test", ext, tmpDir); //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue