Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2af8ac7

Browse filesBrowse files
authored
Add xterm test to docker suite (microsoft#32149)
1 parent b32afb5 commit 2af8ac7
Copy full SHA for 2af8ac7

4 files changed

+32-3Lines changed: 32 additions & 3 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ tests/webTestServer.js.map
3434
tests/webhost/*.d.ts
3535
tests/webhost/webtsc.js
3636
tests/cases/**/*.js
37+
!tests/cases/docker/*.js/
3738
tests/cases/**/*.js.map
3839
*.config
3940
scripts/debug.bat
Collapse file

‎src/testRunner/externalCompileRunner.ts‎

Copy file name to clipboardExpand all lines: src/testRunner/externalCompileRunner.ts
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ ${sanitizeDockerfileOutput(result.stderr.toString())}`;
157157
}
158158

159159
function sanitizeDockerfileOutput(result: string): string {
160-
return stripAbsoluteImportPaths(sanitizeTimestamps(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result)))));
160+
return stripAbsoluteImportPaths(sanitizeTimestamps(sanitizeVersionSpecifiers(stripRushStageNumbers(stripANSIEscapes(normalizeNewlines(result))))));
161161
}
162162

163163
function normalizeNewlines(result: string): string {
@@ -176,10 +176,14 @@ function sanitizeTimestamps(result: string): string {
176176
return result.replace(/\[\d?\d:\d\d:\d\d (A|P)M\]/g, "[XX:XX:XX XM]")
177177
.replace(/\d+(\.\d+)? seconds?/g, "? seconds")
178178
.replace(/\d+(\.\d+)? minutes?/g, "")
179-
.replace(/\d+(\.\d+)?s/g, "?s")
180-
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx");
179+
.replace(/\d+(\.\d+)?s/g, "?s");
181180
}
182181

182+
function sanitizeVersionSpecifiers(result: string): string {
183+
return result
184+
.replace(/\d+.\d+.\d+-insiders.\d\d\d\d\d\d\d\d/g, "X.X.X-insiders.xxxxxxxx")
185+
.replace(/@\d+\.\d+\.\d+/g, "@X.X.X");
186+
}
183187

184188
/**
185189
* Import types and some other error messages use absolute paths in errors as they have no context to be written relative to;
Collapse file
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Exit Code: 0
2+
Standard output:
3+
4+
> xterm@X.X.X build /xtermjs
5+
> tsc -b ./tsconfig.all.json
6+
7+
8+
9+
10+
Standard error:
Collapse file
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# node-pty doesn't build on node 12 right now, so we lock to 8 - the version xterm itself tests against :(
2+
FROM node:8
3+
RUN git clone https://github.com/xtermjs/xterm.js.git /xtermjs
4+
WORKDIR /xtermjs
5+
RUN git pull
6+
COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz
7+
RUN mkdir /typescript
8+
RUN tar -xzvf /typescript.tgz -C /typescript
9+
RUN npm i typescript@/typescript/package
10+
RUN npm install
11+
# Set entrypoint back to bash (`node` base image made it `node`)
12+
ENTRYPOINT [ "/bin/bash", "-c" , "exec \"${@:0}\";"]
13+
# Build
14+
CMD npm run build

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.