[WIP ]reorganized dir structure
This commit is contained in:
11
tests/com.minres.scviewer.database.test/.classpath
Normal file
11
tests/com.minres.scviewer.database.test/.classpath
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src/">
|
||||
<attributes>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
2
tests/com.minres.scviewer.database.test/.gitignore
vendored
Normal file
2
tests/com.minres.scviewer.database.test/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/bin/
|
||||
/target/
|
39
tests/com.minres.scviewer.database.test/.project
Normal file
39
tests/com.minres.scviewer.database.test/.project
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.minres.scviewer.database.test</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ds.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@@ -0,0 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
pluginProject.extensions=false
|
||||
resolve.requirebundle=false
|
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
|
||||
<booleanAttribute key="append.args" value="true"/>
|
||||
<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
|
||||
<booleanAttribute key="askclear" value="false"/>
|
||||
<booleanAttribute key="automaticAdd" value="true"/>
|
||||
<booleanAttribute key="automaticValidate" value="false"/>
|
||||
<stringAttribute key="bootstrap" value=""/>
|
||||
<stringAttribute key="checked" value="[NONE]"/>
|
||||
<booleanAttribute key="clearConfig" value="true"/>
|
||||
<booleanAttribute key="clearws" value="true"/>
|
||||
<booleanAttribute key="clearwslog" value="false"/>
|
||||
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
|
||||
<booleanAttribute key="default" value="true"/>
|
||||
<setAttribute key="deselected_workspace_bundles">
|
||||
<setEntry value="com.minres.scviewer.e4.application"/>
|
||||
<setEntry value="com.minres.scviewer.ui"/>
|
||||
</setAttribute>
|
||||
<booleanAttribute key="includeOptional" value="true"/>
|
||||
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.minres.scviewer.database.test"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=com.minres.scviewer.database.test"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.minres.scviewer.database.test"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms40m -Xmx512m"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="product" value="com.minres.scviewer.e4.product"/>
|
||||
<booleanAttribute key="run_in_ui_thread" value="true"/>
|
||||
<setAttribute key="selected_target_bundles">
|
||||
<setEntry value="com.google.guava@default:default"/>
|
||||
<setEntry value="javax.annotation@default:default"/>
|
||||
<setEntry value="javax.inject@default:default"/>
|
||||
<setEntry value="javax.servlet@default:default"/>
|
||||
<setEntry value="org.apache.ant@default:default"/>
|
||||
<setEntry value="org.apache.commons.jxpath@default:default"/>
|
||||
<setEntry value="org.apache.felix.gogo.command@default:default"/>
|
||||
<setEntry value="org.apache.felix.gogo.runtime@default:default"/>
|
||||
<setEntry value="org.codehaus.groovy@default:default"/>
|
||||
<setEntry value="org.eclipse.ant.core@default:default"/>
|
||||
<setEntry value="org.eclipse.core.commands@default:default"/>
|
||||
<setEntry value="org.eclipse.core.contenttype@default:default"/>
|
||||
<setEntry value="org.eclipse.core.expressions@default:default"/>
|
||||
<setEntry value="org.eclipse.core.filesystem.macosx@default:false"/>
|
||||
<setEntry value="org.eclipse.core.filesystem@default:default"/>
|
||||
<setEntry value="org.eclipse.core.jobs@default:default"/>
|
||||
<setEntry value="org.eclipse.core.resources@default:default"/>
|
||||
<setEntry value="org.eclipse.core.runtime@default:true"/>
|
||||
<setEntry value="org.eclipse.core.variables@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.core.contexts@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.core.di.annotations@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.core.di.extensions@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.core.di@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.core.services@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.emf.xpath@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.ui.di@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.ui.model.workbench@default:default"/>
|
||||
<setEntry value="org.eclipse.e4.ui.services@default:default"/>
|
||||
<setEntry value="org.eclipse.emf.common@default:default"/>
|
||||
<setEntry value="org.eclipse.emf.ecore@default:default"/>
|
||||
<setEntry value="org.eclipse.equinox.app@default:default"/>
|
||||
<setEntry value="org.eclipse.equinox.bidi@default:default"/>
|
||||
<setEntry value="org.eclipse.equinox.common@2:true"/>
|
||||
<setEntry value="org.eclipse.equinox.preferences@default:default"/>
|
||||
<setEntry value="org.eclipse.equinox.registry@default:default"/>
|
||||
<setEntry value="org.eclipse.equinox.util@default:default"/>
|
||||
<setEntry value="org.eclipse.jface@default:default"/>
|
||||
<setEntry value="org.eclipse.osgi.compatibility.state@default:false"/>
|
||||
<setEntry value="org.eclipse.osgi.services@default:default"/>
|
||||
<setEntry value="org.eclipse.osgi@-1:true"/>
|
||||
<setEntry value="org.eclipse.swt.cocoa.macosx.x86_64@default:false"/>
|
||||
<setEntry value="org.eclipse.swt@default:default"/>
|
||||
<setEntry value="org.hamcrest.core@default:default"/>
|
||||
<setEntry value="org.junit@default:default"/>
|
||||
</setAttribute>
|
||||
<setAttribute key="selected_workspace_bundles">
|
||||
<setEntry value="com.minres.scviewer.database.sqlite@default:true"/>
|
||||
<setEntry value="com.minres.scviewer.database.test@default:default"/>
|
||||
<setEntry value="com.minres.scviewer.database.text@default:true"/>
|
||||
<setEntry value="com.minres.scviewer.database.ui.swt@default:default"/>
|
||||
<setEntry value="com.minres.scviewer.database.ui@default:default"/>
|
||||
<setEntry value="com.minres.scviewer.database.vcd@default:default"/>
|
||||
<setEntry value="com.minres.scviewer.database@default:true"/>
|
||||
<setEntry value="com.opcoach.e4.preferences@default:default"/>
|
||||
</setAttribute>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
<booleanAttribute key="tracing" value="false"/>
|
||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
||||
<booleanAttribute key="useDefaultConfig" value="true"/>
|
||||
<booleanAttribute key="useDefaultConfigArea" value="false"/>
|
||||
<booleanAttribute key="useProduct" value="false"/>
|
||||
</launchConfiguration>
|
15
tests/com.minres.scviewer.database.test/META-INF/MANIFEST.MF
Normal file
15
tests/com.minres.scviewer.database.test/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,15 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: SCViewer database tests
|
||||
Bundle-SymbolicName: com.minres.scviewer.database.test
|
||||
Bundle-Version: 1.0.1.qualifier
|
||||
Bundle-Vendor: MINRES Technologies GnbH
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Bundle: org.junit,
|
||||
com.minres.scviewer.database,
|
||||
com.minres.scviewer.database.sqlite;bundle-version="1.0.0",
|
||||
com.minres.scviewer.database.text;bundle-version="1.0.0",
|
||||
com.minres.scviewer.database.vcd;bundle-version="1.0.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Service-Component: OSGI-INF/component.xml
|
||||
Automatic-Module-Name: com.minres.scviewer.database.test
|
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="com.minres.scviewer.database.test">
|
||||
<implementation class="com.minres.scviewer.database.test.DatabaseServicesTest"/>
|
||||
<reference bind="setFactory" cardinality="1..1" interface="com.minres.scviewer.database.IWaveformDbFactory" name="IWaveformDbFactory" policy="static" unbind="unsetFactory"/>
|
||||
</scr:component>
|
4
tests/com.minres.scviewer.database.test/build.properties
Normal file
4
tests/com.minres.scviewer.database.test/build.properties
Normal file
@@ -0,0 +1,4 @@
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
OSGI-INF/
|
||||
source.. = src/
|
2
tests/com.minres.scviewer.database.test/inputs/.gitignore
vendored
Normal file
2
tests/com.minres.scviewer.database.test/inputs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/.scviewer.*
|
||||
/.my_db.txlog*
|
254
tests/com.minres.scviewer.database.test/inputs/my_db.txlog
Normal file
254
tests/com.minres.scviewer.database.test/inputs/my_db.txlog
Normal file
@@ -0,0 +1,254 @@
|
||||
scv_tr_stream (ID 1, name "tr.pipelined_stream", kind "transactor")
|
||||
scv_tr_stream (ID 2, name "tr.addr_stream", kind "transactor")
|
||||
scv_tr_stream (ID 3, name "tr.data_stream", kind "transactor")
|
||||
scv_tr_generator (ID 4, name "read", scv_tr_stream 1,
|
||||
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||
end_attribute (ID 1, name "data", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 5, name "write", scv_tr_stream 1,
|
||||
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||
end_attribute (ID 1, name "data", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 6, name "addr", scv_tr_stream 2,
|
||||
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 7, name "rdata", scv_tr_stream 3,
|
||||
end_attribute (ID 0, name "data", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 8, name "wdata", scv_tr_stream 3,
|
||||
begin_attribute (ID 0, name "data", type "UNSIGNED")
|
||||
)
|
||||
tx_begin 1 4 0 s
|
||||
a 0
|
||||
tx_record_attribute 1 "data_size" UNSIGNED = 24
|
||||
tx_begin 2 6 0 s
|
||||
a 0
|
||||
tx_relation "addr_phase" 2 1
|
||||
tx_end 2 6 180 ns
|
||||
tx_begin 3 7 180 ns
|
||||
tx_relation "data_phase" 3 1
|
||||
tx_begin 4 4 180 ns
|
||||
a 0
|
||||
tx_record_attribute 4 "data_size" UNSIGNED = 24
|
||||
tx_begin 5 6 180 ns
|
||||
a 0
|
||||
tx_relation "addr_phase" 5 4
|
||||
tx_end 5 6 300 ns
|
||||
tx_end 3 7 420 ns
|
||||
a 0
|
||||
tx_end 1 4 420 ns
|
||||
a 0
|
||||
tx_begin 6 4 420 ns
|
||||
a 1
|
||||
tx_record_attribute 6 "data_size" UNSIGNED = 24
|
||||
tx_begin 7 6 420 ns
|
||||
a 1
|
||||
tx_relation "addr_phase" 7 6
|
||||
tx_begin 8 7 420 ns
|
||||
tx_relation "data_phase" 8 4
|
||||
tx_end 7 6 480 ns
|
||||
tx_end 8 7 620 ns
|
||||
a 0
|
||||
tx_end 4 4 620 ns
|
||||
a 0
|
||||
tx_begin 9 4 620 ns
|
||||
a 1
|
||||
tx_record_attribute 9 "data_size" UNSIGNED = 24
|
||||
tx_begin 10 6 620 ns
|
||||
a 1
|
||||
tx_relation "addr_phase" 10 9
|
||||
tx_begin 11 7 620 ns
|
||||
tx_relation "data_phase" 11 6
|
||||
tx_end 11 7 700 ns
|
||||
a 1
|
||||
tx_end 6 4 700 ns
|
||||
a 1
|
||||
tx_end 10 6 760 ns
|
||||
tx_begin 12 7 760 ns
|
||||
tx_relation "data_phase" 12 9
|
||||
tx_begin 13 4 760 ns
|
||||
a 2
|
||||
tx_record_attribute 13 "data_size" UNSIGNED = 24
|
||||
tx_begin 14 6 760 ns
|
||||
a 2
|
||||
tx_relation "addr_phase" 14 13
|
||||
tx_end 14 6 880 ns
|
||||
tx_end 12 7 980 ns
|
||||
a 1
|
||||
tx_end 9 4 980 ns
|
||||
a 1
|
||||
tx_begin 15 4 980 ns
|
||||
a 2
|
||||
tx_record_attribute 15 "data_size" UNSIGNED = 24
|
||||
tx_begin 16 6 980 ns
|
||||
a 2
|
||||
tx_relation "addr_phase" 16 15
|
||||
tx_begin 17 7 980 ns
|
||||
tx_relation "data_phase" 17 13
|
||||
tx_end 16 6 1040 ns
|
||||
tx_end 17 7 1200 ns
|
||||
a 2
|
||||
tx_end 13 4 1200 ns
|
||||
a 2
|
||||
tx_begin 18 4 1200 ns
|
||||
a 120
|
||||
tx_record_attribute 18 "data_size" UNSIGNED = 24
|
||||
tx_begin 19 6 1200 ns
|
||||
a 120
|
||||
tx_relation "addr_phase" 19 18
|
||||
tx_begin 20 7 1200 ns
|
||||
tx_relation "data_phase" 20 15
|
||||
tx_end 19 6 1300 ns
|
||||
tx_end 20 7 1340 ns
|
||||
a 2
|
||||
tx_end 15 4 1340 ns
|
||||
a 2
|
||||
tx_begin 21 4 1340 ns
|
||||
a 11
|
||||
tx_record_attribute 21 "data_size" UNSIGNED = 24
|
||||
tx_begin 22 6 1340 ns
|
||||
a 11
|
||||
tx_relation "addr_phase" 22 21
|
||||
tx_begin 23 7 1340 ns
|
||||
tx_relation "data_phase" 23 18
|
||||
tx_end 23 7 1420 ns
|
||||
a 120
|
||||
tx_end 18 4 1420 ns
|
||||
a 120
|
||||
tx_end 22 6 1540 ns
|
||||
tx_begin 24 7 1540 ns
|
||||
tx_relation "data_phase" 24 21
|
||||
tx_begin 25 4 1540 ns
|
||||
a 147
|
||||
tx_record_attribute 25 "data_size" UNSIGNED = 24
|
||||
tx_begin 26 6 1540 ns
|
||||
a 147
|
||||
tx_relation "addr_phase" 26 25
|
||||
tx_end 24 7 1660 ns
|
||||
a 11
|
||||
tx_end 21 4 1660 ns
|
||||
a 11
|
||||
tx_end 26 6 1740 ns
|
||||
tx_begin 27 7 1740 ns
|
||||
tx_relation "data_phase" 27 25
|
||||
tx_begin 28 4 1740 ns
|
||||
a 99
|
||||
tx_record_attribute 28 "data_size" UNSIGNED = 24
|
||||
tx_begin 29 6 1740 ns
|
||||
a 99
|
||||
tx_relation "addr_phase" 29 28
|
||||
tx_end 29 6 1800 ns
|
||||
tx_end 27 7 1980 ns
|
||||
a 147
|
||||
tx_end 25 4 1980 ns
|
||||
a 147
|
||||
tx_begin 30 4 1980 ns
|
||||
a 55
|
||||
tx_record_attribute 30 "data_size" UNSIGNED = 24
|
||||
tx_begin 31 6 1980 ns
|
||||
a 55
|
||||
tx_relation "addr_phase" 31 30
|
||||
tx_begin 32 7 1980 ns
|
||||
tx_relation "data_phase" 32 28
|
||||
tx_end 32 7 2060 ns
|
||||
a 99
|
||||
tx_end 28 4 2060 ns
|
||||
a 99
|
||||
tx_end 31 6 2100 ns
|
||||
tx_begin 33 7 2100 ns
|
||||
tx_relation "data_phase" 33 30
|
||||
tx_begin 34 4 2100 ns
|
||||
a 126
|
||||
tx_record_attribute 34 "data_size" UNSIGNED = 24
|
||||
tx_begin 35 6 2100 ns
|
||||
a 126
|
||||
tx_relation "addr_phase" 35 34
|
||||
tx_end 33 7 2340 ns
|
||||
a 55
|
||||
tx_end 30 4 2340 ns
|
||||
a 55
|
||||
tx_end 35 6 2340 ns
|
||||
tx_begin 36 7 2340 ns
|
||||
tx_relation "data_phase" 36 34
|
||||
tx_begin 37 5 2340 ns
|
||||
a 204
|
||||
tx_record_attribute 37 "data_size" UNSIGNED = 24
|
||||
tx_begin 38 6 2340 ns
|
||||
a 204
|
||||
tx_relation "addr_phase" 38 37
|
||||
tx_end 38 6 2400 ns
|
||||
tx_end 36 7 2540 ns
|
||||
a 126
|
||||
tx_end 34 4 2540 ns
|
||||
a 126
|
||||
tx_begin 39 5 2540 ns
|
||||
a 242
|
||||
tx_record_attribute 39 "data_size" UNSIGNED = 24
|
||||
tx_begin 40 6 2540 ns
|
||||
a 242
|
||||
tx_relation "addr_phase" 40 39
|
||||
tx_begin 41 8 2540 ns
|
||||
a 211
|
||||
tx_relation "data_phase" 41 37
|
||||
tx_end 41 8 2640 ns
|
||||
tx_end 37 5 2640 ns
|
||||
a 211
|
||||
tx_end 40 6 2780 ns
|
||||
tx_begin 42 8 2780 ns
|
||||
a 58
|
||||
tx_relation "data_phase" 42 39
|
||||
tx_begin 43 5 2780 ns
|
||||
a 135
|
||||
tx_record_attribute 43 "data_size" UNSIGNED = 24
|
||||
tx_begin 44 6 2780 ns
|
||||
a 135
|
||||
tx_relation "addr_phase" 44 43
|
||||
tx_end 44 6 2960 ns
|
||||
tx_end 42 8 3 us
|
||||
tx_end 39 5 3 us
|
||||
a 58
|
||||
tx_begin 45 5 3 us
|
||||
a 26
|
||||
tx_record_attribute 45 "data_size" UNSIGNED = 24
|
||||
tx_begin 46 6 3 us
|
||||
a 26
|
||||
tx_relation "addr_phase" 46 45
|
||||
tx_begin 47 8 3 us
|
||||
a 31
|
||||
tx_relation "data_phase" 47 43
|
||||
tx_end 47 8 3140 ns
|
||||
tx_end 43 5 3140 ns
|
||||
a 31
|
||||
tx_end 46 6 3200 ns
|
||||
tx_begin 48 8 3200 ns
|
||||
a 37
|
||||
tx_relation "data_phase" 48 45
|
||||
tx_begin 49 5 3200 ns
|
||||
a 176
|
||||
tx_record_attribute 49 "data_size" UNSIGNED = 24
|
||||
tx_begin 50 6 3200 ns
|
||||
a 176
|
||||
tx_relation "addr_phase" 50 49
|
||||
tx_end 50 6 3300 ns
|
||||
tx_end 48 8 3380 ns
|
||||
tx_end 45 5 3380 ns
|
||||
a 37
|
||||
tx_begin 51 5 3380 ns
|
||||
a 58
|
||||
tx_record_attribute 51 "data_size" UNSIGNED = 24
|
||||
tx_begin 52 6 3380 ns
|
||||
a 58
|
||||
tx_relation "addr_phase" 52 51
|
||||
tx_begin 53 8 3380 ns
|
||||
a 220
|
||||
tx_relation "data_phase" 53 49
|
||||
tx_end 52 6 3440 ns
|
||||
tx_end 53 8 3560 ns
|
||||
tx_end 49 5 3560 ns
|
||||
a 220
|
||||
tx_begin 54 8 3560 ns
|
||||
a 109
|
||||
tx_relation "data_phase" 54 51
|
||||
tx_end 54 8 3660 ns
|
||||
tx_end 51 5 3660 ns
|
||||
a 109
|
400319
tests/com.minres.scviewer.database.test/inputs/my_db.vcd
Normal file
400319
tests/com.minres.scviewer.database.test/inputs/my_db.vcd
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,238 @@
|
||||
scv_tr_stream (ID 1, name "tr.pipelined_stream", kind "transactor")
|
||||
scv_tr_stream (ID 2, name "tr.addr_stream", kind "transactor")
|
||||
scv_tr_stream (ID 3, name "tr.data_stream", kind "transactor")
|
||||
scv_tr_generator (ID 4, name "read", scv_tr_stream 1,
|
||||
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||
end_attribute (ID 1, name "data", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 5, name "write", scv_tr_stream 1,
|
||||
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||
end_attribute (ID 1, name "data", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 6, name "addr", scv_tr_stream 2,
|
||||
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 7, name "rdata", scv_tr_stream 3,
|
||||
end_attribute (ID 0, name "data", type "UNSIGNED")
|
||||
)
|
||||
scv_tr_generator (ID 8, name "wdata", scv_tr_stream 3,
|
||||
begin_attribute (ID 0, name "data", type "UNSIGNED")
|
||||
)
|
||||
tx_begin 1 4 0 s
|
||||
a 0
|
||||
tx_record_attribute 1 "data_size" UNSIGNED = 24
|
||||
tx_begin 2 6 0 s
|
||||
a 0
|
||||
tx_relation "addr_phase" 2 1
|
||||
tx_end 2 6 180 ns
|
||||
tx_begin 3 7 180 ns
|
||||
tx_relation "data_phase" 3 1
|
||||
tx_begin 4 4 180 ns
|
||||
a 0
|
||||
tx_record_attribute 4 "data_size" UNSIGNED = 24
|
||||
tx_begin 5 6 180 ns
|
||||
a 0
|
||||
tx_relation "addr_phase" 5 4
|
||||
tx_end 5 6 300 ns
|
||||
tx_end 3 7 420 ns
|
||||
a 0
|
||||
tx_end 1 4 420 ns
|
||||
a 0
|
||||
tx_begin 6 4 420 ns
|
||||
a 1
|
||||
tx_record_attribute 6 "data_size" UNSIGNED = 24
|
||||
tx_begin 7 6 420 ns
|
||||
a 1
|
||||
tx_relation "addr_phase" 7 6
|
||||
tx_begin 8 7 420 ns
|
||||
tx_relation "data_phase" 8 4
|
||||
tx_end 7 6 480 ns
|
||||
tx_end 8 7 620 ns
|
||||
a 0
|
||||
tx_end 4 4 620 ns
|
||||
a 0
|
||||
tx_begin 9 4 620 ns
|
||||
a 1
|
||||
tx_record_attribute 9 "data_size" UNSIGNED = 24
|
||||
tx_begin 10 6 620 ns
|
||||
a 1
|
||||
tx_relation "addr_phase" 10 9
|
||||
tx_begin 11 7 620 ns
|
||||
tx_relation "data_phase" 11 6
|
||||
tx_end 11 7 700 ns
|
||||
a 1
|
||||
tx_end 6 4 700 ns
|
||||
a 1
|
||||
tx_end 10 6 760 ns
|
||||
tx_begin 12 7 760 ns
|
||||
tx_relation "data_phase" 12 9
|
||||
tx_begin 13 4 760 ns
|
||||
a 2
|
||||
tx_record_attribute 13 "data_size" UNSIGNED = 24
|
||||
tx_begin 14 6 760 ns
|
||||
a 2
|
||||
tx_relation "addr_phase" 14 13
|
||||
tx_end 14 6 880 ns
|
||||
tx_end 12 7 980 ns
|
||||
a 1
|
||||
tx_end 9 4 980 ns
|
||||
a 1
|
||||
tx_begin 15 4 980 ns
|
||||
a 2
|
||||
tx_record_attribute 15 "data_size" UNSIGNED = 24
|
||||
tx_begin 16 6 980 ns
|
||||
a 2
|
||||
tx_relation "addr_phase" 16 15
|
||||
tx_begin 17 7 980 ns
|
||||
tx_relation "data_phase" 17 13
|
||||
tx_end 16 6 1040 ns
|
||||
tx_end 17 7 1200 ns
|
||||
a 2
|
||||
tx_end 13 4 1200 ns
|
||||
a 2
|
||||
tx_begin 18 4 1200 ns
|
||||
a 120
|
||||
tx_record_attribute 18 "data_size" UNSIGNED = 24
|
||||
tx_begin 19 6 1200 ns
|
||||
a 120
|
||||
tx_relation "addr_phase" 19 18
|
||||
tx_begin 20 7 1200 ns
|
||||
tx_relation "data_phase" 20 15
|
||||
tx_end 19 6 1300 ns
|
||||
tx_end 20 7 1340 ns
|
||||
a 2
|
||||
tx_end 15 4 1340 ns
|
||||
a 2
|
||||
tx_begin 21 4 1340 ns
|
||||
a 11
|
||||
tx_record_attribute 21 "data_size" UNSIGNED = 24
|
||||
tx_begin 22 6 1340 ns
|
||||
a 11
|
||||
tx_relation "addr_phase" 22 21
|
||||
tx_begin 23 7 1340 ns
|
||||
tx_relation "data_phase" 23 18
|
||||
tx_end 23 7 1420 ns
|
||||
a 120
|
||||
tx_end 18 4 1420 ns
|
||||
a 120
|
||||
tx_end 22 6 1540 ns
|
||||
tx_begin 24 7 1540 ns
|
||||
tx_relation "data_phase" 24 21
|
||||
tx_begin 25 4 1540 ns
|
||||
a 147
|
||||
tx_record_attribute 25 "data_size" UNSIGNED = 24
|
||||
tx_begin 26 6 1540 ns
|
||||
a 147
|
||||
tx_relation "addr_phase" 26 25
|
||||
tx_end 24 7 1660 ns
|
||||
a 11
|
||||
tx_end 21 4 1660 ns
|
||||
a 11
|
||||
tx_end 26 6 1740 ns
|
||||
tx_begin 27 7 1740 ns
|
||||
tx_relation "data_phase" 27 25
|
||||
tx_begin 28 4 1740 ns
|
||||
a 99
|
||||
tx_record_attribute 28 "data_size" UNSIGNED = 24
|
||||
tx_begin 29 6 1740 ns
|
||||
a 99
|
||||
tx_relation "addr_phase" 29 28
|
||||
tx_end 29 6 1800 ns
|
||||
tx_end 27 7 1980 ns
|
||||
a 147
|
||||
tx_end 25 4 1980 ns
|
||||
a 147
|
||||
tx_begin 30 4 1980 ns
|
||||
a 55
|
||||
tx_record_attribute 30 "data_size" UNSIGNED = 24
|
||||
tx_begin 31 6 1980 ns
|
||||
a 55
|
||||
tx_relation "addr_phase" 31 30
|
||||
tx_begin 32 7 1980 ns
|
||||
tx_relation "data_phase" 32 28
|
||||
tx_end 32 7 2060 ns
|
||||
a 99
|
||||
tx_end 28 4 2060 ns
|
||||
a 99
|
||||
tx_end 31 6 2100 ns
|
||||
tx_begin 33 7 2100 ns
|
||||
tx_relation "data_phase" 33 30
|
||||
tx_begin 34 4 2100 ns
|
||||
a 126
|
||||
tx_record_attribute 34 "data_size" UNSIGNED = 24
|
||||
tx_begin 35 6 2100 ns
|
||||
a 126
|
||||
tx_relation "addr_phase" 35 34
|
||||
tx_end 33 7 2340 ns
|
||||
a 55
|
||||
tx_end 30 4 2340 ns
|
||||
a 55
|
||||
tx_end 35 6 2340 ns
|
||||
tx_begin 36 7 2340 ns
|
||||
tx_relation "data_phase" 36 34
|
||||
tx_begin 37 5 2340 ns
|
||||
a 204
|
||||
tx_record_attribute 37 "data_size" UNSIGNED = 24
|
||||
tx_begin 38 6 2340 ns
|
||||
a 204
|
||||
tx_relation "addr_phase" 38 37
|
||||
tx_end 38 6 2400 ns
|
||||
tx_end 36 7 2540 ns
|
||||
a 126
|
||||
tx_end 34 4 2540 ns
|
||||
a 126
|
||||
tx_begin 39 5 2540 ns
|
||||
a 242
|
||||
tx_record_attribute 39 "data_size" UNSIGNED = 24
|
||||
tx_begin 40 6 2540 ns
|
||||
a 242
|
||||
tx_relation "addr_phase" 40 39
|
||||
tx_begin 41 8 2540 ns
|
||||
a 211
|
||||
tx_relation "data_phase" 41 37
|
||||
tx_end 41 8 2640 ns
|
||||
tx_end 37 5 2640 ns
|
||||
a 211
|
||||
tx_end 40 6 2780 ns
|
||||
tx_begin 42 8 2780 ns
|
||||
a 58
|
||||
tx_relation "data_phase" 42 39
|
||||
tx_begin 43 5 2780 ns
|
||||
a 135
|
||||
tx_record_attribute 43 "data_size" UNSIGNED = 24
|
||||
tx_begin 44 6 2780 ns
|
||||
a 135
|
||||
tx_relation "addr_phase" 44 43
|
||||
tx_end 44 6 2960 ns
|
||||
tx_end 42 8 3 us
|
||||
tx_end 39 5 3 us
|
||||
a 58
|
||||
tx_begin 45 5 3 us
|
||||
a 26
|
||||
tx_record_attribute 45 "data_size" UNSIGNED = 24
|
||||
tx_begin 46 6 3 us
|
||||
a 26
|
||||
tx_relation "addr_phase" 46 45
|
||||
tx_begin 47 8 3 us
|
||||
a 31
|
||||
tx_relation "data_phase" 47 43
|
||||
tx_end 47 8 3140 ns
|
||||
tx_end 43 5 3140 ns
|
||||
a 31
|
||||
tx_end 46 6 3200 ns
|
||||
tx_begin 48 8 3200 ns
|
||||
a 37
|
||||
tx_relation "data_phase" 48 45
|
||||
tx_begin 49 5 3200 ns
|
||||
a 176
|
||||
tx_record_attribute 49 "data_size" UNSIGNED = 24
|
||||
tx_begin 50 6 3200 ns
|
||||
a 176
|
||||
tx_relation "addr_phase" 50 49
|
||||
tx_end 50 6 3300 ns
|
||||
tx_end 48 8 3380 ns
|
||||
tx_end 45 5 3380 ns
|
||||
a 37
|
||||
tx_begin 51 5 3380 ns
|
||||
a 58
|
||||
tx_record_attribute 51 "data_
|
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
MANIFEST-000045
|
@@ -0,0 +1 @@
|
||||
2018/11/03-15:38:59.715484 139851522529088Delete type=3 #1
|
Binary file not shown.
400319
tests/com.minres.scviewer.database.test/inputs/my_ldb.vcd
Normal file
400319
tests/com.minres.scviewer.database.test/inputs/my_ldb.vcd
Normal file
File diff suppressed because it is too large
Load Diff
BIN
tests/com.minres.scviewer.database.test/inputs/my_sqldb.txdb
Normal file
BIN
tests/com.minres.scviewer.database.test/inputs/my_sqldb.txdb
Normal file
Binary file not shown.
3915
tests/com.minres.scviewer.database.test/inputs/simple_system.vcd
Executable file
3915
tests/com.minres.scviewer.database.test/inputs/simple_system.vcd
Executable file
File diff suppressed because it is too large
Load Diff
22
tests/com.minres.scviewer.database.test/pom.xml
Normal file
22
tests/com.minres.scviewer.database.test/pom.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>com.minres.scviewer.database.test</artifactId>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<parent>
|
||||
<groupId>com.minres.scviewer</groupId>
|
||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<relativePath>../..</relativePath>
|
||||
</parent>
|
||||
<packaging>eclipse-test-plugin</packaging>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.tycho</groupId>
|
||||
<artifactId>tycho-surefire-plugin</artifactId>
|
||||
<version>${tycho-version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@@ -0,0 +1,157 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* MINRES Technologies GmbH - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package com.minres.scviewer.database.test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.NavigableMap;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.minres.scviewer.database.AssociationType;
|
||||
import com.minres.scviewer.database.DataType;
|
||||
import com.minres.scviewer.database.ISignal;
|
||||
import com.minres.scviewer.database.ITx;
|
||||
import com.minres.scviewer.database.ITxAttribute;
|
||||
import com.minres.scviewer.database.ITxEvent;
|
||||
import com.minres.scviewer.database.ITxEvent.Type;
|
||||
import com.minres.scviewer.database.ITxStream;
|
||||
import com.minres.scviewer.database.IWaveform;
|
||||
import com.minres.scviewer.database.IWaveformDb;
|
||||
import com.minres.scviewer.database.IWaveformDbFactory;
|
||||
|
||||
public class DatabaseServicesTest {
|
||||
|
||||
|
||||
private static IWaveformDbFactory waveformDbFactory;
|
||||
|
||||
private IWaveformDb waveformDb;
|
||||
|
||||
public synchronized void setFactory(IWaveformDbFactory service) {
|
||||
waveformDbFactory = service;
|
||||
}
|
||||
|
||||
public synchronized void unsetFactory(IWaveformDbFactory service) {
|
||||
if (waveformDbFactory == service) {
|
||||
waveformDbFactory = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
waveformDb=waveformDbFactory.getDatabase();
|
||||
}
|
||||
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testVCD() throws Exception {
|
||||
File f = new File("inputs/my_db.vcd").getAbsoluteFile();
|
||||
assertTrue(f.exists());
|
||||
waveformDb.load(f);
|
||||
assertNotNull(waveformDb);
|
||||
List<IWaveform> waves= waveformDb.getAllWaves();
|
||||
assertEquals(14, waves.size());
|
||||
assertEquals(2, waveformDb.getChildNodes().size());
|
||||
IWaveform bus_data_wave = waves.get(0);
|
||||
ISignal<?> bus_data_sig = (ISignal<?>) bus_data_wave;
|
||||
Entry<Long, ?> bus_data_entry = bus_data_sig.getEvents().floorEntry(1400000000L);
|
||||
assertTrue("01111000".equals(bus_data_entry.getValue().toString()));
|
||||
IWaveform rw_wave = waves.get(2);
|
||||
ISignal<?> rw_sig = (ISignal<?>) rw_wave;
|
||||
Entry<Long, ?> rw_entry = rw_sig.getEvents().floorEntry(2360000000L);
|
||||
assertTrue("1".equals(rw_entry.getValue().toString()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTxSQLite() throws Exception {
|
||||
File f = new File("inputs/my_sqldb.txdb").getAbsoluteFile();
|
||||
assertTrue(f.exists());
|
||||
waveformDb.load(f);
|
||||
assertNotNull(waveformDb);
|
||||
assertEquals(3, waveformDb.getAllWaves().size());
|
||||
assertEquals(1, waveformDb.getChildNodes().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTxText() throws Exception {
|
||||
File f = new File("inputs/my_db.txlog").getAbsoluteFile();
|
||||
assertTrue(f.exists());
|
||||
waveformDb.load(f);
|
||||
assertNotNull(waveformDb);
|
||||
assertEquals(3, waveformDb.getAllWaves().size());
|
||||
assertEquals(1, waveformDb.getChildNodes().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTxTextTruncated() throws Exception {
|
||||
File f = new File("inputs/my_db_truncated.txlog").getAbsoluteFile();
|
||||
assertTrue(f.exists());
|
||||
waveformDb.load(f);
|
||||
assertNotNull(waveformDb);
|
||||
assertEquals(3, waveformDb.getAllWaves().size());
|
||||
assertEquals(1, waveformDb.getChildNodes().size());
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void testTxLDb() throws Exception {
|
||||
File f = new File("inputs/my_ldb.txldb").getAbsoluteFile();
|
||||
assertTrue(f.exists());
|
||||
waveformDb.load(f);
|
||||
assertNotNull(waveformDb);
|
||||
assertEquals(1, waveformDb.getChildNodes().size());
|
||||
List<IWaveform> waves = waveformDb.getAllWaves();
|
||||
assertEquals(3, waves.size());
|
||||
IWaveform wave = waves.get(0);
|
||||
assertTrue(wave instanceof ITxStream<?>);
|
||||
ITxStream<?> stream = (ITxStream<?>) wave;
|
||||
assertEquals(2, stream.getGenerators().size());
|
||||
NavigableMap<Long, List<ITxEvent>> eventsList = stream.getEvents();
|
||||
assertEquals(27, eventsList.size());
|
||||
Entry<Long, List<ITxEvent>> eventEntry = eventsList.firstEntry();
|
||||
assertEquals(100000000L, (long) eventEntry.getKey());
|
||||
List<ITxEvent> events = eventEntry.getValue();
|
||||
assertEquals(1, events.size());
|
||||
ITxEvent event = events.get(0);
|
||||
assertEquals(Type.BEGIN, event.getType());
|
||||
ITx tx = event.getTransaction();
|
||||
assertEquals(3L, (long) tx.getId());
|
||||
List<ITxAttribute> attrs = tx.getAttributes();
|
||||
assertEquals(1, attrs.size());
|
||||
ITxAttribute attr = attrs.get(0);
|
||||
assertEquals("data", attr.getName());
|
||||
assertEquals(DataType.UNSIGNED, attr.getDataType());
|
||||
assertEquals(AssociationType.END, attr.getType());
|
||||
assertTrue(attr.getValue() instanceof Integer);
|
||||
assertEquals(0, (int) attr.getValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHierarchicalVCD() throws Exception {
|
||||
File f = new File("inputs/simple_system.vcd").getAbsoluteFile();
|
||||
assertTrue(f.exists());
|
||||
waveformDb.load(f);
|
||||
assertNotNull(waveformDb);
|
||||
assertEquals(779, waveformDb.getAllWaves().size());
|
||||
assertEquals(1, waveformDb.getChildNodes().size());
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user