Skip to content

Commit

Permalink
Merge pull request #13 from NipunaMadhushan/master
Browse files Browse the repository at this point in the history
Change test execution build
  • Loading branch information
NipunaMadhushan authored Dec 6, 2023
2 parents 92991b1 + 02d9d3a commit 133fdc5
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
15 changes: 3 additions & 12 deletions ballerina-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,9 @@ task ballerinaTest {

doLast {
testPackages.each { testPackage ->
exec {
workingDir "${project.projectDir}/${testPackage}"
environment "JAVA_OPTS", "-DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true"
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
commandLine 'cmd', '/c', "${balJavaDebugParam} bal.bat test ${nativeFlag}" +
" ${testParams} ${groupParams} ${disableGroups} ${windowsDisableGroups} ${debugParams}" +
" && exit %%ERRORLEVEL%%"
} else {
commandLine 'sh', '-c', "bal test ${nativeFlag} ${testParams}" +
" ${groupParams} ${disableGroups} ${debugParams}"
}
}
def env = "JAVA_OPTS -DBALLERINA_DEV_COMPILE_BALLERINA_ORG=true ${testParams} ${groupParams}" +
" ${disableGroups} ${windowsDisableGroups} ${debugParams}"
executeBalCommand("test", "${project.projectDir}/${testPackage}", env)
}
}
}
Expand Down
19 changes: 18 additions & 1 deletion ballerina-tests/zipkin-server-tests/tests/get_http_version.bal
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
// Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
//
// WSO2 LLC. licenses this file to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file except
// in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

import ballerina/toml;

const string DEPENDENCIES_TOML_FILE = "../../ballerina/Dependencies.toml";
const string DEPENDENCIES_TOML_FILE = "Dependencies.toml";

type DependenciesTomlData record {|
ProjectDetails ballerina;
Expand All @@ -11,6 +27,7 @@ type Package record {|
string org;
string name;
string version;
string scope?;
Dependency[] dependencies?;
Module[] modules?;
|};
Expand Down
2 changes: 1 addition & 1 deletion ballerina-tests/zipkin-server-tests/tests/test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function testClientSpanTags() returns error? {
test:assertTrue(containsTag("src.object.name", clientSpanTagKeys));
test:assertEquals(clientSpanTags["src.object.name"], "ballerina/http/Client");
test:assertTrue(containsTag("src.position", clientSpanTagKeys));
test:assertEquals(clientSpanTags["src.position"], "tests/test.bal:124:17");
test:assertEquals(clientSpanTags["src.position"], "tests/test.bal:125:17");
}

@test:Config
Expand Down

0 comments on commit 133fdc5

Please sign in to comment.