Add test condition to skip no kit tests if Visual studio is present

This commit is contained in:
KoeMai 2018-01-01 08:48:17 +01:00 коммит произвёл KoeMai
Родитель 8b79b05a15
Коммит 7aa909d085
2 изменённых файлов: 28 добавлений и 27 удалений

3
.vscode/launch.json поставляемый
Просмотреть файл

@ -42,7 +42,8 @@
],
"env": {
"CMT_TESTING": "1",
"CMT_QUIET_CONSOLE": "1"
"CMT_QUIET_CONSOLE": "1",
"HasVs": "true"
},
"preLaunchTask": "npm"
// "smartStep": true

Просмотреть файл

@ -793,30 +793,30 @@ suite('Compilation info', () => {
});
suite('CMake System tests', () => {
suite('No present kit',() => {
suiteSetup(()=>{
clearExistingKitConfigurationFile();
process.env.PATH = "";
(process.env.HasVs == 'true' ? suite.skip : suite)('No present kit',() => {
suiteSetup(()=>{
clearExistingKitConfigurationFile();
process.env.PATH = "";
});
test('Scan for no existing kit should return no selected kit', async() => {
const cmt = await getExtension();
await cmt.scanForKits();
expect(await cmt.selectKit()).to.be.eq(null);
});
test('Configure ', async() => {
const cmt = await getExtension();
await cmt.scanForKits();
expect(await cmt.configure()).to.be.eq(-1);
});
test('Build', async() => {
const cmt = await getExtension();
await cmt.scanForKits();
expect(await cmt.build()).to.be.eq(-1);
});
});
test('Scan for no existing kit should return no selected kit', async() => {
const cmt = await getExtension();
await cmt.scanForKits();
expect(await cmt.selectKit()).to.be.eq(null);
});
test('Configure ', async() => {
const cmt = await getExtension();
await cmt.scanForKits();
expect(await cmt.configure()).to.be.eq(-1);
});
test('Build', async() => {
const cmt = await getExtension();
await cmt.scanForKits();
expect(await cmt.build()).to.be.eq(-1);
});
});
});
});