X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.tmf.core.tests%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Ftmf%2Fcore%2Ftests%2Fstatesystem%2FVerifyHistoryFile.java;h=b65cd3e88b5d725d39b8da9a23956c6a09f4c6e5;hb=cad06250739254199ce5cc3f938b41971c5f2d7c;hp=74d7c012e0da8245761bebf941eb2815ea223fc3;hpb=54a7a54c8d5652fc7fa44e73fc95ade990b0db47;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java index 74d7c012e0..b65cd3e88b 100644 --- a/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java +++ b/org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/statesystem/VerifyHistoryFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012 Ericsson + * Copyright (c) 2012, 2013 Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which @@ -17,12 +17,14 @@ import java.io.IOException; import java.util.List; import org.eclipse.linuxtools.internal.tmf.core.statesystem.HistoryBuilder; -import org.eclipse.linuxtools.internal.tmf.core.statesystem.IStateHistoryBackend; -import org.eclipse.linuxtools.internal.tmf.core.statesystem.historytree.HistoryTreeBackend; +import org.eclipse.linuxtools.internal.tmf.core.statesystem.backends.IStateHistoryBackend; +import org.eclipse.linuxtools.internal.tmf.core.statesystem.backends.historytree.HistoryTreeBackend; import org.eclipse.linuxtools.tmf.core.exceptions.AttributeNotFoundException; +import org.eclipse.linuxtools.tmf.core.exceptions.StateSystemDisposedException; import org.eclipse.linuxtools.tmf.core.exceptions.TimeRangeException; import org.eclipse.linuxtools.tmf.core.interval.ITmfStateInterval; -import org.eclipse.linuxtools.tmf.core.statesystem.IStateSystemQuerier; +import org.eclipse.linuxtools.tmf.core.statesystem.IStateChangeInput; +import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateSystem; /** * Small program to ensure a history file does not contain any "holes". @@ -30,26 +32,26 @@ import org.eclipse.linuxtools.tmf.core.statesystem.IStateSystemQuerier; * trigger NPE's elsewhere in the stack. * * @author alexmont - * */ -@SuppressWarnings({"nls","javadoc"}) +@SuppressWarnings("javadoc") public class VerifyHistoryFile { // Enter the .ht file name to test here - public final static String pathToHistoryFile = ""; + public static final String pathToHistoryFile = ""; private static File htFile; private static IStateHistoryBackend htBackend; - private static IStateSystemQuerier ss; + private static ITmfStateSystem ss; private static long startTime; private static long endTime; private static int nbErrors; public static void main(String[] args) throws IOException, - TimeRangeException, AttributeNotFoundException { + TimeRangeException, AttributeNotFoundException, + StateSystemDisposedException { htFile = new File(pathToHistoryFile); - htBackend = new HistoryTreeBackend(htFile); + htBackend = new HistoryTreeBackend(htFile, IStateChangeInput.IGNORE_PROVIDER_VERSION); ss = HistoryBuilder.openExistingHistory(htBackend); startTime = ss.getStartTime(); @@ -65,7 +67,8 @@ public class VerifyHistoryFile { } private static void verifyAttribute(int attribute) - throws TimeRangeException, AttributeNotFoundException { + throws TimeRangeException, AttributeNotFoundException, + StateSystemDisposedException { List intervals; System.out.print("Checking attribute " + attribute);