From: Jonathan Rajotte Date: Wed, 2 Dec 2015 21:04:29 +0000 (-0500) Subject: Simple RCPTT test for opening a single trace and integrate to build X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=be3347d92bc3914eeb493e0e05c3298773fc265c;p=deliverable%2Ftracecompass.git Simple RCPTT test for opening a single trace and integrate to build This commit act as a foundation for RCP testing via the RCP Testing Tools[1]. More information can be found in "README.md". [1] https://www.eclipse.org/rcptt/ Change-Id: Ia59dccc9d1eda38c84c88b89fc26d5da052d3007 Signed-off-by: Jonathan Rajotte Signed-off-by: Marc-Andre Laperle Reviewed-on: https://git.eclipse.org/r/61810 Reviewed-by: Hudson CI Reviewed-by: Bernd Hufmann Tested-by: Bernd Hufmann --- diff --git a/pom.xml b/pom.xml index 02eae8b1ed..5ede88e6a2 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ 4.0.0 - 3.3 + ${required-maven-version} org.eclipse.tracecompass @@ -38,6 +38,7 @@ + 3.3 UTF-8 UTF-8 @@ -48,6 +49,7 @@ tracecompass-e4.5 http://download.eclipse.org/eclipse/updates/4.5 + 2.1.0-SNAPSHOT 0 @@ -91,6 +93,16 @@ JBoss Public Repository Group http://repository.jboss.org/nexus/content/groups/public/ + + rcptt-snapshots + RCPTT Maven Snapshots repository + https://repo.eclipse.org/content/repositories/rcptt-snapshots/ + + + rcptt-releases + RCPTT Maven repository + https://repo.eclipse.org/content/repositories/rcptt-releases/ + @@ -301,7 +313,7 @@ - 3.3 + ${required-maven-version} 1.8 @@ -528,6 +540,18 @@ 1.8 + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + + + + org.eclipse.rcptt + rcptt-maven-plugin + ${rcptt-version} + + org.apache.maven.plugins maven-site-plugin diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/.project b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/.project new file mode 100644 index 0000000000..51f72db2a0 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/.project @@ -0,0 +1,55 @@ + + + + org.eclipse.tracecompass.rcp.rcptt.tests + + + + + + org.eclipse.rcptt.core.builder.q7Builder + + + + + + org.eclipse.rcptt.core.rcpttnature + + + + 1449617592986 + target + 9 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-dependency + + + + 1449617592989 + target + 9 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-aut + + + + 1449617592992 + target + 6 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-* + + + + diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/README.md b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/README.md new file mode 100644 index 0000000000..aae5684376 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/README.md @@ -0,0 +1,35 @@ +# tracecompass-rcptt-test +Blackbox UI test using RCPTT for Trace Compass + +## How to run ? + +You can run this project either via maven or via the RCP Testing Tool. + +### Local maven run + +``` +mvn clean install +``` + +Results will be located under ./target/results. + +By default maven will use the RCP built in ../org.eclipse.tracecompass.rcp.product +Therefore, if you only want to execute the tests in this folder and not the rest of the build, +you need to make sure that the product has been built first (mvn clean install in the product folder). + +Test traces are being made available in a path defined as the "dataPath" system property. The test traces are being downloaded as part of the maven build and extracted in target/dependency/tracecompass-test-traces-ctf-jar + +### Via RCPTT + +In order to have the RCP and test traces, it is better to run with Maven first. +Once this is done, the project (this directory) can be imported in RCPTT. + +To run the tests, open test_suite/open_trace_suite then click Execute at the top-right corner + +A predefined launch is provided to ease with launching the tests. +This launch sets up the AUT path and dataPath (test traces). + +If you are not using the default paths make sure to pass the correct arguments to +the AUT in the run configurations. + +![](http://i.imgur.com/J4ohsPE.png) \ No newline at end of file diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/TraceCompassAUT.launch/TraceCompass.launch b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/TraceCompassAUT.launch/TraceCompass.launch new file mode 100644 index 0000000000..2dcc26a55e --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/TraceCompassAUT.launch/TraceCompass.launch @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/empty_workspace.ctx b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/empty_workspace.ctx new file mode 100644 index 0000000000..0ee8e299e4 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/empty_workspace.ctx @@ -0,0 +1,33 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.workspace +Element-Name: empty_workspace +Element-Type: context +Element-Version: 2.0 +Id: _hJ3OQI7-EeWIk8i4YSH9dg +Runtime-Version: 2.1.0.201511240016 +Save-Time: 12/2/15 3:06 PM + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf +Content-Type: q7/binary +Entry-Name: .q7.content + +UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAkALmNvbnRlbnRVVAUAAQAAAACVj8kKwjAYhO99ipC7 +iRtYS5eDCFYQEQ/VU5E0tkGz0P6a+vamQos38TYM38wwYdLKO3ryuhFaRXhCxhhxxXQhVBnhB1xHPk5i +L9R1STi7C9NwUjMDQBi0xOr61pgL40HWq5VWwFtArRTBUDvtat2QagLnR7gCMAGl1lqiZUlcOT3t0h75 +sTXEe6aLfzjqODpwGKmLdDSXBl75ly2KCOfVdrY/pIvRmmfpzRfz83GzLEocewiFrPuggLrf9N/jsfcG +UEsHCF/Js6jBAAAAUwEAAFBLAQIUABQACAgIAAAAIQBfybOowQAAAFMBAAAIAAkAAAAAAAAAAAAAAAAA +AAAuY29udGVudFVUBQABAAAAAFBLBQYAAAAAAQABAD8AAAAAAQAAAAA= +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf-- diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/environment.ctx b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/environment.ctx new file mode 100644 index 0000000000..09461429a9 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/environment.ctx @@ -0,0 +1,29 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: environment +Element-Type: context +Element-Version: 2.0 +Id: _P_dMII_MEeWoZ73dvYVv8A +Runtime-Version: 2.1.0.201511240016 +Save-Time: 12/2/15 3:06 PM + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +// Get and set the data path for the running test +global [val data_path [substitute-variables "${system_property:dataPath}"]] +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/reset_workbench.ctx b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/reset_workbench.ctx new file mode 100644 index 0000000000..c0d7f8a67f --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/context/reset_workbench.ctx @@ -0,0 +1,34 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.workbench +Element-Name: reset_workbench +Element-Type: context +Element-Version: 2.0 +Id: _AAhGYI_QEeWoZ73dvYVv8A +Runtime-Version: 2.1.0.201511240016 +Save-Time: 12/2/15 3:07 PM + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf +Content-Type: q7/binary +Entry-Name: .q7.content + +UEsDBBQACAgIAAAAIQAAAAAAAAAAAAAAAAAIAAkALmNvbnRlbnRVVAUAAQAAAAB1jrtuwzAMRfd8hcC9 +Uh9DAyNOYBRF4aFDl6bpYiQyYwuVREGiH59fpYCDLF3Jc+69m93srBgxJkO+hAd5DwK9ptb4roSBz3dr +2G1XG4qdRG1NSCijDswyafTHaKjYU/w5Zad/Ic84s5idKa6Jj5fE3OFTke8l9MyhUGqaJkmukzlXfb3X +C/J/zdVc3hfzD1GOWrRqAbNPEUH4o8MSIibkZlomgjBtCU1V9W+Huvl4xT19Pz+14+FzXFcgQl4dULMZ +sc7c7Rpr/DAzkU2S3VkORt7AoLarX1BLBwjGZSHP1wAAAEoBAABQSwECFAAUAAgICAAAACEAxmUhz9cA +AABKAQAACAAJAAAAAAAAAAAAAAAAAAAALmNvbnRlbnRVVAUAAQAAAABQSwUGAAAAAAEAAQA/AAAAFgEA +AAAA +------=_.q7.content-3d2e0690-ce48-3609-83e0-c704d49f1eaf-- diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/pom.xml b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/pom.xml new file mode 100644 index 0000000000..8870355ce6 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/pom.xml @@ -0,0 +1,108 @@ + + 4.0.0 + + + org.eclipse.tracecompass.rcp.tests + Trace Compass RCP Product Tests + + + org.eclipse.tracecompass.rcp-parent + org.eclipse.tracecompass + 2.0.0-SNAPSHOT + + + rcpttTest + + + ${project.build.directory}/dependency/tracecompass-test-traces-ctf-jar + + tar.gz + + + + + org.eclipse.tracecompass.testtraces + tracecompass-test-traces-ctf + 1.2.0 + + + + + trace-compass-test-traces + Trace Compass Test Traces + http://archive.eclipse.org/tracecompass/tracecompass-test-traces/maven + + + + + + windows-rcptt + + + Windows + + + + zip + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-dependencies + generate-resources + + unpack-dependencies + + + true + true + true + true + + + + + + org.eclipse.rcptt + rcptt-maven-plugin + true + + + org.eclipse.tracecompass + org.eclipse.tracecompass.rcp.product + ${aut.extension} + + + -Xmx1024m + -DdataPath=${dataPath} + + + + ${rcptt-version} + + + open_trace_suite + + + + + + + diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/rcptt.properties b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/rcptt.properties new file mode 100644 index 0000000000..19d9115a2b --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/rcptt.properties @@ -0,0 +1,21 @@ +--- RCPTT project settings --- +Format-Version: 1.0 +Element-Name: Project Settings +Element-Type: projectMetadata +Element-Version: 2.0 +Id: _jwDcII74EeWIk8i4YSH9dg +Runtime-Version: 2.1.0.201511240016 +Save-Time: 12/2/15 3:06 PM + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/test_suites/open_trace_suite.suite b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/test_suites/open_trace_suite.suite new file mode 100644 index 0000000000..804cca2fa1 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/test_suites/open_trace_suite.suite @@ -0,0 +1,30 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Element-Name: open_trace_suite +Element-Type: testsuite +Element-Version: 2.0 +Id: _3WKjAJIMEeWlJ7F5c_Pz9A +Runtime-Version: 2.1.0.201512080016 +Save-Time: 12/8/15 5:50 PM + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ + +Superset of open trace test suites. +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8 +Content-Type: text/testcase +Entry-Name: testcase-items + +__FHjoJ39EeWj1rJFbZoWLw // kind: 'test' name: 'open_trace' path: '../tests/open_trace.test' + +------=_testcase-items-62c497da-4241-31f4-811a-6b453a3ecff8-- diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/tests/open_trace.test b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/tests/open_trace.test new file mode 100644 index 0000000000..e53f41eee9 --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/tests/open_trace.test @@ -0,0 +1,45 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Contexts: _hJ3OQI7-EeWIk8i4YSH9dg,_P_dMII_MEeWoZ73dvYVv8A,_AAhGYI_QEeWoZ73dvYVv8A +Element-Name: open_trace +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: __FHjoJ39EeWj1rJFbZoWLw +Runtime-Version: 2.1.0.201512080016 +Save-Time: 12/8/15 5:50 PM +Testcase-Type: ecl +Verifications: _gJhZUI8DEeWIk8i4YSH9dg + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ + +Open a trace containig a dynamic kernel trace. +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-view "Project Explorer" | get-tree | select "Tracing/Traces [0]" | get-menu "Import..." | click +set-dialog-result Folder $data_path +with [get-window "Trace Import"] { + get-button "Browse..." | click + with [get-tree] { + get-item "tracecompass-test-traces-ctf-jar/kernel_vm" | check + select "tracecompass-test-traces-ctf-jar/kernel_vm" + } + get-button Finish | click +} +get-view "Project Explorer" | get-tree | get-item "Tracing/Traces \\[1\\]" | get-property "getItemCount()" | equals 1 + | verify-true +get-view "Project Explorer" | get-tree | select "Tracing/Traces [1]/kernel_vm" | double-click +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/validation/no_warning_errors_aggressive.verification b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/validation/no_warning_errors_aggressive.verification new file mode 100644 index 0000000000..7bd2ae656d --- /dev/null +++ b/rcp/org.eclipse.tracecompass.rcp.rcptt.tests/validation/no_warning_errors_aggressive.verification @@ -0,0 +1,32 @@ +--- RCPTT verification --- +Format-Version: 1.0 +Element-Name: no_warning_errors_aggressive +Element-Type: verification +Element-Version: 2.0 +Id: _gJhZUI8DEeWIk8i4YSH9dg +Runtime-Version: 2.1.0.201511240016 +Save-Time: 12/2/15 3:11 PM +Verification-Type: org.eclipse.rcptt.verifications.log + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +/******************************************************************************* +* Copyright (c) 2015 Efficios Inc. +* 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 +*******************************************************************************/ + +Use (?s) flag (a.k.a DOTALL) to catch line terminator +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.errorlog.verification-3ceb5b18-8b7c-3939-9191-416e6e78eb57 +Content-Type: text/errorlog-verification +Entry-Name: .errorlog.verification + +DENIED: +6 0 .* Message:(?s).* + +------=_.errorlog.verification-3ceb5b18-8b7c-3939-9191-416e6e78eb57-- diff --git a/rcp/pom.xml b/rcp/pom.xml index 864291c65d..893a283d6f 100644 --- a/rcp/pom.xml +++ b/rcp/pom.xml @@ -39,6 +39,7 @@ org.eclipse.tracecompass.rcp.product + org.eclipse.tracecompass.rcp.rcptt.tests