Skip to content

Commit 259f2b8

Browse files
author
mmews
committed
Merge remote-tracking branch 'origin/master' into GH-2571
2 parents b20ed73 + ae67c5a commit 259f2b8

File tree

276 files changed

+21780
-16769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+21780
-16769
lines changed

n4js-libs/npm-test.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ echo "========= Running tests defined in the individual packages of yarn workspa
1818

1919

2020
echo "========= Running mangelhaft tests for all packages in yarn workspace 'n4js-libs' ..."
21-
REPORT_NAME="./build/report.xml"
2221
mkdir -p "./build"
2322
echo "Run mangelhaft ..."
24-
packages/n4js-mangelhaft-cli/src-gen/org/eclipse/n4js/mangelhaft/runner/node/NodeTestMain.js \
25-
./packages/org.eclipse.n4js.mangelhaft.test/test-catalog.json \
26-
--xunitReportFile $REPORT_NAME \
23+
./packages/n4js-mangelhaft-cli/src-gen/org/eclipse/n4js/mangelhaft/runner/node/NodeTestMain.js \
24+
packages/* \
25+
--xunitReportFile "./build/report.xml" \
2726
--sonarTestExecutionReportFile ./build/sqreport.xml \
2827
--xunitReportName test-report \
2928
--xunitReportPackage n4js-libs-report \
3029
--nycCoveragePath ./build/coverage.json
3130
echo "Done running mangehaft."
32-
echo "Saved test report at: ${REPORT_NAME}"

n4js-libs/packages/n4js-cli/src/n4js/Globals.n4js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export public const JRE_INFO_MAP = new Map<Platform, JreInfo>([
3737
[Platform.x64_sunos, null],
3838
[Platform.x32_win32, {bin: "bin/java.exe", name: "OpenJDK-jre_x86-32_windows_hotspot_2021-05-06-23-30.zip"}],
3939
[Platform.x64_win32, {bin: "bin/java.exe", name: "OpenJDK-jre_x64_windows_hotspot_2021-05-06-23-30.zip"}]]
40-
as Iterable<Iterable2<Platform, JreInfo>>);
40+
);
4141

4242

4343
@StringBased

n4js-libs/packages/n4js-mangelhaft-cli/src/n4js/org/eclipse/n4js/mangelhaft/runner/node/NodeTestAPI.n4js

-89
This file was deleted.

n4js-libs/packages/n4js-mangelhaft-cli/src/n4js/org/eclipse/n4js/mangelhaft/runner/node/NodeTestCLI.n4js

+10-5
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@ const cwd = process.cwd();
1717
const resolvePath = (p: string): string => lib_path.resolve(cwd, p);
1818

1919
const nomnomOptions: Object = {
20-
testCatalog: {
20+
testCatalogs: {
2121
position: 0,
22-
list: false,
23-
default: ".",
24-
metavar: "PATH|NPM-relpath",
25-
help: "Test catalog (JSON) or project location to be inspected for test cases."
22+
list: true,
23+
default: ["."],
24+
metavar: "PATH|NPM-relpath|glob",
25+
help: "Test catalog (JSON) or project location(s) to be inspected for test catalog(s)."
2626
},
2727
filter: {
2828
abbr: "f",
2929
list: true,
3030
help: "Filter for matching test cases."
3131
},
32+
mergeResult: {
33+
abbr: "mr",
34+
flag: true,
35+
help: "Merge all results into a single file stored in CWD."
36+
},
3237
xunitReportFile: {
3338
metavar: "PATH",
3439
transform: resolvePath,

n4js-libs/packages/n4js-mangelhaft-cli/src/n4js/org/eclipse/n4js/mangelhaft/runner/node/NodeTestMain.n4js

+1-9
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,5 @@
1010
* NumberFour AG - Initial API and implementation
1111
*/
1212

13-
import NodeTestAPI from "org/eclipse/n4js/mangelhaft/runner/node/NodeTestAPI";
14-
import {NodeTestCLI} from "org/eclipse/n4js/mangelhaft/runner/node/NodeTestCLI";
15-
import {waitAndExitProcess} from "org/eclipse/n4js/mangelhaft/util/proc";
1613

17-
waitAndExitProcess(async () => {
18-
const options = NodeTestCLI.parseCommandLine();
19-
if (options) {
20-
await NodeTestAPI.exec(options);
21-
}
22-
});
14+
import("./NodeTestRunner.js");

n4js-libs/packages/n4js-mangelhaft-cli/src/n4js/org/eclipse/n4js/mangelhaft/runner/node/NodeTestOptions.n4js

+8-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,20 @@ import { XUnitReportSpec } from "org/eclipse/n4js/mangelhaft/reporter/xunit/XUni
1515
*/
1616
export default public class NodeTestOptions extends XUnitReportSpec {
1717
/**
18-
* Test catalog to be tested.
18+
* One or more files/directories/globs pointing to the test catalog to be tested.
1919
*/
20-
public testCatalog: string;
20+
public testCatalogs: string[];
21+
2122
/**
2223
* Filter for matching test cases.
2324
*/
2425
public filter: string[];
2526

27+
/**
28+
* Merge all results into a single file stored in CWD.
29+
*/
30+
public mergeResult: boolean;
31+
2632
/**
2733
* Sonar base dir.
2834
*/

0 commit comments

Comments
 (0)