From 7c07ed04790473e526cfb5ca013eb678f0bf2218 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 31 Dec 2019 11:33:17 -0800 Subject: [PATCH 1/2] End tests reliabily on CI --- src/test/debuggerTest.ts | 6 +++++- src/test/multiRootTest.ts | 6 +++++- src/test/testBootstrap.ts | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/test/debuggerTest.ts b/src/test/debuggerTest.ts index a1118b5cba48..0735a5e81028 100644 --- a/src/test/debuggerTest.ts +++ b/src/test/debuggerTest.ts @@ -19,6 +19,10 @@ function start() { extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'), launchArgs: [workspacePath], version: 'stable' - }).catch(console.error); + }).catch(ex => { + console.error('End Debugger tests (with errors)'); + console.error(ex); + process.exit(1); + }); } start(); diff --git a/src/test/multiRootTest.ts b/src/test/multiRootTest.ts index 47e22ed9537e..5647a2e27816 100644 --- a/src/test/multiRootTest.ts +++ b/src/test/multiRootTest.ts @@ -15,6 +15,10 @@ function start() { extensionTestsPath: path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'out', 'test', 'index'), launchArgs: [workspacePath], version: 'stable' - }).catch(console.error); + }).catch(ex => { + console.error('End Multiroot tests (with errors)'); + console.error(ex); + process.exit(1); + }); } start(); diff --git a/src/test/testBootstrap.ts b/src/test/testBootstrap.ts index 3a15660463a2..13112491fa74 100644 --- a/src/test/testBootstrap.ts +++ b/src/test/testBootstrap.ts @@ -108,4 +108,8 @@ async function start() { proc.once('close', end); } -start().catch(ex => console.error(ex)); +start().catch(ex => { + console.error('File testBootstrap.ts failed with Errors'); + console.error(ex); + process.exit(1); +}); From 47da14a8ee3e20778611fdc052caf3a4e0f6a887 Mon Sep 17 00:00:00 2001 From: Kartik Raj Date: Tue, 31 Dec 2019 14:08:07 -0800 Subject: [PATCH 2/2] Code reviews --- src/test/debuggerTest.ts | 3 +-- src/test/multiRootTest.ts | 3 +-- src/test/standardTest.ts | 3 +-- src/test/testBootstrap.ts | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/test/debuggerTest.ts b/src/test/debuggerTest.ts index 0735a5e81028..466a845947f8 100644 --- a/src/test/debuggerTest.ts +++ b/src/test/debuggerTest.ts @@ -20,8 +20,7 @@ function start() { launchArgs: [workspacePath], version: 'stable' }).catch(ex => { - console.error('End Debugger tests (with errors)'); - console.error(ex); + console.error('End Debugger tests (with errors)', ex); process.exit(1); }); } diff --git a/src/test/multiRootTest.ts b/src/test/multiRootTest.ts index 5647a2e27816..0d2ea8ccb4eb 100644 --- a/src/test/multiRootTest.ts +++ b/src/test/multiRootTest.ts @@ -16,8 +16,7 @@ function start() { launchArgs: [workspacePath], version: 'stable' }).catch(ex => { - console.error('End Multiroot tests (with errors)'); - console.error(ex); + console.error('End Multiroot tests (with errors)', ex); process.exit(1); }); } diff --git a/src/test/standardTest.ts b/src/test/standardTest.ts index 6295397e2315..05ae0bcf5483 100644 --- a/src/test/standardTest.ts +++ b/src/test/standardTest.ts @@ -18,8 +18,7 @@ function start() { launchArgs: [workspacePath], version: 'stable' }).catch(ex => { - console.error('End Standard tests (with errors)'); - console.error(ex); + console.error('End Standard tests (with errors)', ex); if (process.env.IS_SMOKE_TEST) { process.exit(1); } diff --git a/src/test/testBootstrap.ts b/src/test/testBootstrap.ts index 13112491fa74..8fa4423bd012 100644 --- a/src/test/testBootstrap.ts +++ b/src/test/testBootstrap.ts @@ -109,7 +109,6 @@ async function start() { } start().catch(ex => { - console.error('File testBootstrap.ts failed with Errors'); - console.error(ex); + console.error('File testBootstrap.ts failed with Errors', ex); process.exit(1); });