Skip to content

Commit

Permalink
try upload
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Kurz <[email protected]>
  • Loading branch information
scottkurz committed Feb 24, 2024
1 parent 6d7832e commit e7d3518
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/run-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,16 @@ jobs:
# Build the plugin.
- name: 'Build: Build-Package-RunTests'
run: bash ./tests/resources/ci/scripts/exec.sh ${{ matrix.targetPlatform }}

# Collect logs
- run: |
mkdir logs
find tests -type f -name "*.log" -exec cp {} logs \;
# save logs
- name: Upload Logs
uses: actions/upload-artifact@v2
with:
name: test-app-logs
path: logs

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.out
*.orig
*.log
.DS_Store
target/
*~
Expand Down
4 changes: 2 additions & 2 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-pomless</artifactId>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>4.0.6</version>
</extension>
</extensions>
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.net.URL;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -779,10 +780,19 @@ public void startDevMode(String cmd, String projectName, String projectPath, Str

// The value for JAVA_HOME comes from the underlying configuration. The configuration allows
// the java installation to be custom defined, execution environment defined, or workspace defined.
String time = getTimestamp();
envs.add("JAVA_HOME=" + javaInstallPath);
envs.add("MAVEN_ARGS=--log-file " + time + ".log");

projectTabController.runOnTerminal(projectName, projectPath, cmd, envs);
}

private String getTimestamp() {
long currentTime = System.currentTimeMillis();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd-HH:mm:ss.SSS");
return formatter.format(currentTime);
}


/**
* Informs the users of the error and prompts them to chose whether or not to allow the Liberty plugin stop command to be issued
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.context;
import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.go;
import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.goGlobal;
import static io.openliberty.tools.eclipse.test.it.utils.MagicWidgetFinder.goGlobalTerminal;
import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.checkRunInContainerCheckBox;
import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.deleteLibertyToolsRunConfigEntriesFromAppRunAs;
import static io.openliberty.tools.eclipse.test.it.utils.SWTBotPluginOperations.enableLibertyTools;
Expand Down Expand Up @@ -319,6 +320,7 @@ public static final void validateBeforeTestRun() {
* Tests the start with parameters menu action on a dashboard listed application.
*/
@Test
@Disabled
public void testLibertyConfigurationTabsExist() {

Shell configShell = launchRunConfigurationsDialogFromAppRunAs(MVN_APP_NAME);
Expand All @@ -335,6 +337,7 @@ public void testLibertyConfigurationTabsExist() {
}

@Test
@Disabled
@DisabledOnMac
public void testMavenCommandAssembly() throws IOException, InterruptedException, CommandNotFoundException {

Expand All @@ -348,6 +351,7 @@ public void testMavenCommandAssembly() throws IOException, InterruptedException,
}

@Test
@Disabled
public void testMavenWrapperCommandAssembly() throws IOException, InterruptedException, CommandNotFoundException {
IProject iProject = LibertyPluginTestUtils.getProject(MVN_WRAPPER_APP_NAME);
String projPath = iProject.getLocation().toOSString();
Expand All @@ -366,6 +370,14 @@ public void testDashboardStartActionWithWrapper() {
// Start dev mode.
launchDashboardAction(MVN_WRAPPER_APP_NAME, DashboardView.APP_MENU_ACTION_START);

/*
try {
Thread.sleep(15000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
*/
goGlobal("Terminal");

// Validate application is up and running.
Expand Down Expand Up @@ -412,6 +424,7 @@ public void testDashboardStartAction() {
* @throws InterruptedException
*/
@Test
@Disabled
public void testDashboardStopExternalServer() throws CommandNotFoundException, IOException, InterruptedException {

Path projAbsolutePath = wrapperProjectPath.toAbsolutePath();
Expand Down Expand Up @@ -444,6 +457,7 @@ public void testDashboardStopExternalServer() throws CommandNotFoundException, I
* Tests the start menu action on a dashboard listed application.
*/
@Test
@Disabled
public void testDashboardDebugAction() {
// Start dev mode.
launchDashboardAction(MVN_APP_NAME, DashboardView.APP_MENU_ACTION_DEBUG);
Expand All @@ -466,6 +480,7 @@ public void testDashboardDebugAction() {
* Tests the start with parameters menu action on a dashboard listed application.
*/
@Test
@Disabled
public void testDashboardStartWithCustomConfigAction() {

// Delete any previously created configs.
Expand Down Expand Up @@ -502,6 +517,7 @@ public void testDashboardStartWithCustomConfigAction() {
* Tests the start with parameters menu action on a dashboard listed application.
*/
@Test
@Disabled
public void testDashboardDebugWithCustomConfigAction() {

// Delete any previously created configs.
Expand Down Expand Up @@ -541,6 +557,7 @@ public void testDashboardDebugWithCustomConfigAction() {
* Tests the start, run tests, view test report, and stop dashboard actions.
*/
@Test
@Disabled
public void testDashboardActions() {

// Delete the test report files before we start this test.
Expand Down Expand Up @@ -590,6 +607,7 @@ public void testDashboardActions() {
* Run.
*/
@Test
@Disabled
public void testStartWithDefaultRunAsConfig() {

deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME);
Expand Down Expand Up @@ -617,6 +635,7 @@ public void testStartWithDefaultRunAsConfig() {
* -> Run.
*/
@Test
@Disabled
public void testStartWithCustomRunAsConfig() {
// Delete any previously created configs.
deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME);
Expand Down Expand Up @@ -649,6 +668,7 @@ public void testStartWithCustomRunAsConfig() {
* Tests the start, run tests, view IT report, view UT report, and stop run as shortcut actions.
*/
@Test
@Disabled
public void testRunAsShortcutActions() {

// Delete any previously created configs.
Expand Down Expand Up @@ -701,6 +721,7 @@ public void testRunAsShortcutActions() {
* (customized) -> Run.
*/
@Test
@Disabled
public void testStartWithCustomDebugAsConfig() {

deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME);
Expand Down Expand Up @@ -749,6 +770,7 @@ public void testStartWithCustomDebugAsConfig() {
* Tests the start/stop debug as shortcut actions.
*/
@Test
@Disabled
public void testStartWithDebugAsShortcut() {

// Delete any previously created configs.
Expand Down Expand Up @@ -800,6 +822,7 @@ public void testStartWithNoWrapperAndNoPreferencesSet() {
}

@Test
@Disabled
@DisabledOnMac
public void testStartWithWrapperAndNoPreferencesSet() {

Expand Down Expand Up @@ -836,6 +859,7 @@ public void testStartWithWrapperAndNoPreferencesSet() {
}

@Test
@Disabled
@DisabledOnMac
public void testStartWithNoWrapperAndPreferencesSet() {

Expand Down Expand Up @@ -871,6 +895,7 @@ public void testStartWithNoWrapperAndPreferencesSet() {
* configuration JRE tab.
*/
@Test
@Disabled
public void testDefaultJRECompliance() {
// Delete any previously created configs.
deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME);
Expand Down Expand Up @@ -903,6 +928,7 @@ public void testDefaultJRECompliance() {
* Tests that the Common Tab is added and can be opened
*/
@Test
@Disabled
public void testDefaultCommonTab() {

deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME);
Expand Down Expand Up @@ -931,6 +957,7 @@ public void testDefaultCommonTab() {
* @throws Exception
*/
@Test
@Disabled
public void testAddingProjectToDashboardManually() throws Exception {

IProject iProject = LibertyPluginTestUtils.getProject(NON_DFLT_NAME);
Expand Down Expand Up @@ -970,6 +997,7 @@ public void testAddingProjectToDashboardManually() throws Exception {
* out any existing "container" configurations.
*/
@Test
@Disabled
public void testLaunchConfigurationMatching() {

// Delete any previously created configs.
Expand Down Expand Up @@ -1009,6 +1037,7 @@ public void testLaunchConfigurationMatching() {
* Tests that the correct dependency projects are added to the debug source lookup list
*/
@Test
@Disabled
public void testDebugSourceLookupContent() {

deleteLibertyToolsRunConfigEntriesFromAppRunAs(MVN_APP_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,21 @@ public void run() {

}

public static void goGlobalTerminal() {
String terminal = "Terminal";
Option options = Option.getGlobalOptions();
Object o = findGlobal(terminal, options);

if (o != null) {
go(o, options);
} else {
logErr("Unable to find item in go(String) '" + terminal + "'", options);
}

CTabItem ctab = (CTabItem)o;
System.out.println("SKSK: terminal text = " + ctab.getText());
}

public static void goGlobal(final String name) {
goGlobal(name, Option.getGlobalOptions());
}
Expand Down

0 comments on commit e7d3518

Please sign in to comment.