Skip to content

Commit

Permalink
fix(emulator): Yet another set of small fixes (#5242)
Browse files Browse the repository at this point in the history
* Updated wrong platform in kura.properties file; fixed launch config

Signed-off-by: pierantoniomerlino <[email protected]>

* Fixed system test

Signed-off-by: pierantoniomerlino <[email protected]>

---------

Signed-off-by: pierantoniomerlino <[email protected]>
  • Loading branch information
pierantoniomerlino authored May 22, 2024
1 parent 457b953 commit e7cd70d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<setEntry value="org.apache.geronimo.specs.geronimo-json_1.0_spec@default:default"/>
<setEntry value="org.apache.geronimo.specs.geronimo-jta_1.1_spec@default:default"/>
<setEntry value="org.apache.logging.log4j.api@default:default"/>
<setEntry value="org.apache.logging.log4j.core@default:default"/>
<setEntry value="org.apache.logging.log4j.core@3:default"/>
<setEntry value="org.apache.logging.log4j.slf4j.impl@default:default"/>
<setEntry value="org.apache.servicemix.bundles.c3p0@default:default"/>
<setEntry value="org.eclipse.equinox.cm@default:default"/>
Expand Down Expand Up @@ -153,6 +153,7 @@
<setEntry value="org.eclipse.kura.linux.bluetooth@default:default"/>
<setEntry value="org.eclipse.kura.localization.resources@default:false"/>
<setEntry value="org.eclipse.kura.localization@default:default"/>
<setEntry value="org.eclipse.kura.net.configuration@default:default"/>
<setEntry value="org.eclipse.kura.request.handler.jaxrs@default:default"/>
<setEntry value="org.eclipse.kura.rest.asset.provider@default:default"/>
<setEntry value="org.eclipse.kura.rest.configuration.provider@default:default"/>
Expand All @@ -175,4 +176,4 @@
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfigArea" value="true"/>
</launchConfiguration>
</launchConfiguration>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kura.version=kura_emulator
kura.marketplace.compatibility.version=
kura.company=Eclipse
kura.project=Dev
kura.platform=dynacor
kura.platform=DevPlatform
kura.device.name=DevEmulator
kura.model.id=DevModelId
kura.model.name=DevModelName
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
/*******************************************************************************
* Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others
*
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
*
* SPDX-License-Identifier: EPL-2.0
*
*
* Contributors:
* Eurotech
*******************************************************************************/
package org.eclipse.kura.core.system.test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.eclipse.kura.core.testutil.TestUtil;
import org.eclipse.kura.executor.Command;
import org.eclipse.kura.executor.CommandExecutorService;
import org.eclipse.kura.executor.CommandStatus;
import org.eclipse.kura.system.SystemService;
import org.eclipse.kura.test.annotation.TestTarget;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.BufferedReader;
import java.io.File;
Expand All @@ -29,22 +31,20 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.eclipse.kura.core.testutil.TestUtil;
import org.eclipse.kura.executor.Command;
import org.eclipse.kura.executor.CommandExecutorService;
import org.eclipse.kura.executor.CommandStatus;
import org.eclipse.kura.system.SystemService;
import org.eclipse.kura.test.annotation.TestTarget;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

public class SystemServiceTest {

private static final String UNKNOWN = "UNKNOWN";
private static final String LINUX = "Linux"; // Ubuntu
private static SystemService systemService = null;
private static CommandExecutorService executorService = null;
private static CountDownLatch dependencyLatch = new CountDownLatch(2); // initialize with number of dependencies
private static CountDownLatch dependencyLatch = new CountDownLatch(2); // initialize with number of dependencies
private boolean onCloudbees = false;

@BeforeClass
Expand Down Expand Up @@ -100,9 +100,9 @@ public void testGetPrimaryMacAddress() {
@TestTarget(targetPlatforms = { TestTarget.PLATFORM_ALL })
@Test
public void testGetPlatform() {
String[] expected = { "dynacor", // emulated
"Ubuntu", // Ubuntu
"BeagleBone" // BeagleBone
String[] expected = { "DevPlatform", // emulated
"Ubuntu", // Ubuntu
"BeagleBone" // BeagleBone
};

try {
Expand All @@ -122,7 +122,7 @@ public void testGetPlatform() {
@TestTarget(targetPlatforms = { TestTarget.PLATFORM_ALL })
@Test
public void testGetOsDistro() {
String[] expected = { "DevOsDitribution", // emulated
String[] expected = { "DevOsDitribution", // emulated
LINUX };

try {
Expand All @@ -142,8 +142,8 @@ public void testGetOsDistro() {
@TestTarget(targetPlatforms = { TestTarget.PLATFORM_ALL })
@Test
public void testGetOsDistroVersion() {
String[] expected = { "DevOsDitributionVersion", // emulated
"N/A" // Ubuntu
String[] expected = { "DevOsDitributionVersion", // emulated
"N/A" // Ubuntu
};

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ kura.name=Kura
kura.version=kura_emulator
kura.company=Eclipse
kura.project=Dev
kura.platform=dynacor
kura.platform=DevPlatform
kura.device.name=DevEmulator
kura.model.id=DevModelId
kura.model.name=DevModelName
Expand Down

0 comments on commit e7cd70d

Please sign in to comment.