lttng.ui: Add test in symbol map test to verify names
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 28 Oct 2016 15:26:29 +0000 (11:26 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Tue, 1 Nov 2016 14:16:15 +0000 (10:16 -0400)
The names are now "main" ... due to a missing seek.

Change-Id: I8b8b35a87ccc73cfe4876026eb862200098bc7b6
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/84124
Reviewed-by: Hudson CI
Reviewed-by: Genevieve Bastien <gbastien+lttng@versatic.net>
lttng/org.eclipse.tracecompass.lttng2.ust.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/ust/ui/swtbot/tests/CallStackViewTest.java

index e79c0cedde0ec01ade881ffbcfa1c9d89dcd8b11..de4ce52a3f7d1aaba00b00d4b05cb9885be5b6b3 100644 (file)
 
 package org.eclipse.tracecompass.lttng2.ust.ui.swtbot.tests;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.IOException;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -303,16 +305,15 @@ public class CallStackViewTest {
     /**
      * Test check callstack at a time with function map
      *
-     * @throws URISyntaxException
-     *             Malformed url
      * @throws IOException
      *             Missing file
      */
     @Test
-    public void testGoToTimeAndCheckStackWithNames() throws URISyntaxException, IOException {
+    public void testGoToTimeAndCheckStackWithNames() throws IOException {
         goToTime(TIMESTAMPS[0]);
         final SWTBotView viewBot = fBot.viewById(CallStackView.ID);
         viewBot.setFocus();
+        SWTBotTree tree = viewBot.bot().tree();
         Object mapObj = CtfTmfTestTraceUtils.class.getResource("cyg-profile-mapping.txt");
         assertTrue(mapObj instanceof URL);
         URL mapUrl = (URL) mapObj;
@@ -328,10 +329,11 @@ public class CallStackViewTest {
         shellBot.button("Browse...", 1).click();
         shellBot.button("OK").click();
         shellBot.waitUntil(Conditions.shellCloses(activeShell));
-
-        SWTBotTree tree = viewBot.bot().tree();
+        // FIXME: remove when updates are propagated
+        goToTime(TIMESTAMPS[0]);
         WaitUtils.waitForJobs();
         List<String> names = new ArrayList<>();
+
         for (SWTBotTreeItem swtBotTreeItem : tree.getAllItems()) {
             for (SWTBotTreeItem items : swtBotTreeItem.getItems()) {
                 for (SWTBotTreeItem item : items.getItems()) {
@@ -339,7 +341,9 @@ public class CallStackViewTest {
                 }
             }
         }
-        assertEquals(names, ImmutableList.of("glxgears-16073"));
+        List<String> functions = getVisibleStackFrames(viewBot);
+        assertEquals(ImmutableList.of("glxgears-16073"), names);
+        assertEquals(ImmutableList.of("main", "event_loop", "handle_event", "", ""), functions);
     }
 
     /**
This page took 0.026027 seconds and 5 git commands to generate.