Skip to content

Commit 2af8ac7

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

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

.gitignore

+1
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

src/testRunner/externalCompileRunner.ts

+7-3
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;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Exit Code: 0
2+
Standard output:
3+
4+
> [email protected] build /xtermjs
5+
> tsc -b ./tsconfig.all.json
6+
7+
8+
9+
10+
Standard error:
+14
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)