Redo PR 241: parsing complex scenarios of quoting and escaping. (#243)

* Redo PR 241: parsing complex scenarios of quoting and escaping.

* add temporary logging to see how much of the new test is executing

* Break up the new windows test in two to compare smaller baseline/output strings.

* Try cl instead of gcc so that the CI machines don't find the tool in their path and report full (machine dependent) path for compiler path.

* Undo previous mistake, we need gcc not cl but ensure preconfigure adds a path to these compilers inside our repository

* Cover more interesting scenarios for compiler path while also ensuring uniformity between systems

* Fix linux test baseline according to latest changes in the dryrun
This commit is contained in:
Andreea Isac 2021-12-02 15:56:57 -08:00 коммит произвёл GitHub
Родитель ef33b871d9
Коммит c9a2877828
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
13 изменённых файлов: 1087 добавлений и 277 удалений

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

@ -492,14 +492,14 @@ async function parseAnySwitchFromToolArguments(args: string, excludeArgs: string
};
let stderr: any = (result: string): void => {
logger.messageNoCR(`Error while running the compiler args parser script '${parseCompilerArgsScriptFile}'` +
`for regions "${compilerArgRegions}": "${result}"`, "Normal");
logger.message(`Error while running the compiler args parser script '${parseCompilerArgsScriptFile}'` +
`for regions ("${compilerArgRegions})": "${result}"`, "Normal");
};
// Running the compiler arguments parsing script can use the system locale.
const result: util.SpawnProcessResult = await util.spawnChildProcess(runCommand, scriptArgs, util.getWorkspaceRoot(), false, stdout, stderr);
if (result.returnCode !== 0) {
logger.messageNoCR(`The compiler args parser script '${parseCompilerArgsScriptFile}' failed with error code ${result.returnCode}`, "Normal");
logger.message(`The compiler args parser script '${parseCompilerArgsScriptFile}' failed with error code ${result.returnCode} for regions (${compilerArgRegions})`, "Normal");
}
} catch (error) {
logger.message(error);
@ -532,16 +532,30 @@ function parseMultipleSwitchFromToolArguments(args: string, sw: string, removeSu
// (example): -DMY_DEFINE='"SOME_VALUE"'
function anythingBetweenQuotes(fullyQuoted: boolean): string {
let anythingBetweenReverseQuote: string = '\\`[^\\`]*?\\`';
let anythingBetweenSingleQuote: string = "\\'[^\\']*?\\'";
let anythingBetweenDoubleQuote: string = '\\"[^\\"]*?\\"';
// The basic pattern for anything between quotes accepts equally single quote, double quote or back tick.
// One pattern that is accepted is to wrap between escaped quotes and allow inside anything (including non-escaped quotes) except escaped quotes.
// Another pattern that is accepted is to wrap between non-escaped quotes and allow inside anything (including escaped quotes) except non-escaped quotes.
// One problem with the "..." pattern is that a simple "\" (or anything ending with \") will not know if the backslash is part of the inside of quote-quote
// or together with the following quote represents a \" and needs to look forward for another ending quote.
// If there is another quote somewhere else later in the command line (another -D or a file name wrapped in quotes) everything until that first upcoming quote
// will be included.
// Example that doesn't work: -DSLASH_DEFINE="\" -DSOME_OTHER_SWITCH "drive:\folder\file.extension"
// SLASH_DEFINE is equal to '\" -DSOME_OTHER_SWITCH '
// Example that works: -DGIT_VERSION=" \" 1.2.3 \" "
// GIT_VERSION is equal to ' \" 1.2.3 \" '
// Unfortunately, we also can't identify this to log in the output channel for later analysis of more makefile switch and quoting user scenarios.
// Fortunately, we didn't encounter the last scenario, only the first.
function anythingBetweenQuotesBasicPattern(quoteChar: string): string {
return '\\\\\\' + quoteChar + "((?!\\\\\\" + quoteChar + ").)*\\\\\\" + quoteChar + "|" + // \" anything(except \") \"
"\\" + quoteChar + "(\\\\\\" + quoteChar + "|[^\\" + quoteChar + "])*?[^\\\\\\" + quoteChar + "]?\\" + quoteChar; // " anything (except ") "
}
// If the switch is fully quoted with ', like ('-DMY_DEFINE="MyValue"'), don't allow single quotes
// inside the switch value.
// One example of what can be broken if we don't do this: gcc '-DDEF1=' '-DDef2=val2'
// in which case DEF1 would be seen as DEF1=' ' instead of empty =
let str: string = anythingBetweenReverseQuote + '|' + anythingBetweenDoubleQuote + (fullyQuoted ? "" : '|' + anythingBetweenSingleQuote);
return str;
// If the switch is fully quoted with ', like ('-DMY_DEFINE="MyValue"'), don't allow single quotes
// inside the switch value.
// One example of what can be broken if we don't do this: gcc '-DDEF1=' '-DDef2=val2'
// in which case DEF1 would be seen as DEF1=' ' instead of empty =
let str: string = anythingBetweenQuotesBasicPattern("`") + '|' + anythingBetweenQuotesBasicPattern('"') + (fullyQuoted ? "" : '|' + anythingBetweenQuotesBasicPattern("'"));
return str;
}
function mainPattern(fullyQuoted: boolean): string {
@ -584,7 +598,7 @@ function parseMultipleSwitchFromToolArguments(args: string, sw: string, removeSu
match = regexp.exec(args);
while (match) {
let matchIndex: number = (match[2].startsWith("'") && match[2].endsWith("'")) ? 8 : 18;
let matchIndex: number = (match[2].startsWith("'") && match[2].endsWith("'")) ? 8 : 26;
let result: string = match[matchIndex];
if (result) {
if (removeSurroundingQuotes) {

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

@ -1,3 +1,4 @@
@echo off
set PATH="%cd%\bin\InterestingSmallMakefile\CL\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\12.34.56789\bin\Hostx86\x86";%PATH%
set PATH=%cd%\bin\GitHub\compilers;%PATH%

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

@ -3,8 +3,17 @@
"makefile.buildLog": "./dummy_dryrun.log",
"makefile.makePath": "c:/some/other/fake/path",
"makefile.loggingLevel": "Debug",
"makefile.additionalCompilerNames": ["MyOwnFakeCompiler"],
"makefile.configureOnOpen": false,
"makefile.configurations": [
{
"name": "complex_escaped_quotes",
"buildLog": "./complex_escaped_quotes_dryrun.log"
},
{
"name": "complex_escaped_quotes_winOnly",
"buildLog": "./complex_escaped_quotes_winOnly_dryrun.log"
},
{
"name": "InterestingSmallMakefile_windows_configDebug",
"buildLog": "./InterestingSmallMakefile_windows_dryrunDebug.log"

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

@ -6,6 +6,7 @@ Found build log path setting "./8cc_linux_dryrun.log" defined for configuration
Resolving build log path to "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/8cc_linux_dryrun.log"
Deduced command 'c:/some/other/fake/path ' for configuration 8cc_linux
Saving opened files before build.
Loading configurations from cache is not necessary.
Preprocessing: "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/8cc_linux_dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
@ -183,7 +184,6 @@ Found the following 29 build targets defined in the makefile: 8cc;all;buffer.o;c
Complete list of build targets: 8cc;all;buffer.o;clean;cleanobj;cpp.o;debug.o;dict.o;encoding.o;error.o;file.o;fulltest;gen.o;lex.o;main.o;map.o;parse.o;path.o;runtests;self;set.o;stage1;stage2;stage3;test;testtest;utiltest;utiltest.o;vector.o
Parsing build targets elapsed time: 0
Configure finished. The status for all the subphases that ran:
loadFromCache: return code = -3, elapsed time = 0
generateParseContent: return code = 0, elapsed time = 0
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0

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

@ -8,6 +8,7 @@ Found build log path setting "./InterestingSmallMakefile_windows_dryrunDebug.log
Resolving build log path to "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\InterestingSmallMakefile_windows_dryrunDebug.log"
Deduced command 'c:\some\other\fake\path.exe ' for configuration InterestingSmallMakefile_windows_configDebug
Saving opened files before build.
Loading configurations from cache is not necessary.
Preprocessing: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\InterestingSmallMakefile_windows_dryrunDebug.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
@ -193,7 +194,6 @@ Found the following 21 build targets defined in the makefile: Arch1_main.exe;Arc
Complete list of build targets: Arch1_main.exe;Arch2_main.exe;Arch3_main.exe;Execute_Arch1;Execute_Arch2;Execute_Arch3;all;buildArch1;buildArch2;buildArch3;builds;clean;create_dirs;create_dirs_Arch1;create_dirs_Arch2;create_dirs_Arch3;install;rebuild;runs;simple;simple/simple.exe
Parsing build targets elapsed time: 0
Configure finished. The status for all the subphases that ran:
loadFromCache: return code = -3, elapsed time = 0
generateParseContent: return code = 0, elapsed time = 0
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0

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

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

@ -0,0 +1,250 @@
Pre-configuring...
Script: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\.vscode\preconfigure.bat"
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>call "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\.vscode\preconfigure.bat"
The pre-configure succeeded.
Setting configuration - complex_escaped_quotes
Found build log path setting "./complex_escaped_quotes_dryrun.log" defined for configuration "complex_escaped_quotes
Resolving build log path to "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\complex_escaped_quotes_dryrun.log"
Deduced command 'c:\some\other\fake\path.exe ' for configuration complex_escaped_quotes
Saving opened files before build.
Preprocessing: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\complex_escaped_quotes_dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
Updating the CppTools IntelliSense Configuration Provider.
Parsing dry-run output for CppTools Custom Configuration Provider.
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\"some.value\" -DBETWEEN_EMPTY=\"\" -DBETWEEN_SPACE=\"some value\" -DBETWEEN_INNER_QUOTE=\"some"value\" -DBETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\"some.value\";BETWEEN_EMPTY=\"\";BETWEEN_SPACE=\"some value\";BETWEEN_INNER_QUOTE=\"some"value\";BETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN=\"some.value\"' -D'"BETWEEN_EMPTY"=\"\"' myfile.cpp -D'BETWEEN_SPACE=\"some value\"' -D "BETWEEN_INNER_QUOTE=\"some value\"" -DBETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\"some.value\";"BETWEEN_EMPTY"=\"\";BETWEEN_SPACE=\"some value\";BETWEEN_INNER_QUOTE=\"some value\";BETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN="some.value" -DBETWEEN_EMPTY="" -DBETWEEN_SPACE="some value" -DBETWEEN_INNER_QUOTE="some\"value" -DBETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value" -DEND_WITH_BACKSLASH="value\"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN="some.value";BETWEEN_EMPTY="";BETWEEN_SPACE="some value";BETWEEN_INNER_QUOTE="some\"value";BETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value";END_WITH_BACKSLASH="value\"
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN="some.value"' -D'"BETWEEN_EMPTY"=""' myfile.cpp -D'BETWEEN_SPACE="some value"' -D 'BETWEEN_INNER_QUOTE="some value"' -DBETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN="some.value";"BETWEEN_EMPTY"="";BETWEEN_SPACE="some value";BETWEEN_INNER_QUOTE="some value";BETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder" -I "../../" -I "../folder with space/subfolder" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/" -I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/" "myfile.cpp"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/' '-I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder"' -I".." '-I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/"' '-I "../folder with space/"' "myfile.cpp" -I `{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"`
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\'some.value\' -DBETWEEN_EMPTY=\'\' -DBETWEEN_SPACE=\'some value\' -DBETWEEN_INNER_QUOTE=\'some'value\' -DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';BETWEEN_EMPTY=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some'value\';BETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D"'BETWEEN_EMPTY'=\'\'" myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D "BETWEEN_INNER_QUOTE=\'some value\'" -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';'BETWEEN_EMPTY'=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some value\';BETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/' -I"../folder with space/" myfile.cpp -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN='some.value' -DBETWEEN_EMPTY='' -DBETWEEN_SPACE='some value' -DBETWEEN_INNER_QUOTE='some\'value' -DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' -DEND_WITH_BACKSLASH='value\'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN='some.value';BETWEEN_EMPTY='';BETWEEN_SPACE='some value';BETWEEN_INNER_QUOTE='some\'value';BETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value';END_WITH_BACKSLASH='value\'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D 'BETWEEN_INNER_QUOTE=\'some value\'' -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';\'BETWEEN_EMPTY\'=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some value\';BETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder' -I '../../' -I '../folder with space/subfolder' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/' "myfile.cpp"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/' -I '../folder with space/' "myfile.cpp" -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: msvc-x64
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Sending Workspace Browse Configuration: -----------------------------------
Browse Path: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/";{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\subfolder
Standard: c++17
Compiler Path: MyOwnFakeCompiler.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
----------------------------------------------------------------------------
Parsing for IntelliSense elapsed time: 0
Parsing for launch targets.
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\"some.value\" -DBETWEEN_EMPTY=\"\" -DBETWEEN_SPACE=\"some value\" -DBETWEEN_INNER_QUOTE=\"some"value\" -DBETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN=\"some.value\"' -D'"BETWEEN_EMPTY"=\"\"' myfile.cpp -D'BETWEEN_SPACE=\"some value\"' -D "BETWEEN_INNER_QUOTE=\"some value\"" -DBETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN="some.value" -DBETWEEN_EMPTY="" -DBETWEEN_SPACE="some value" -DBETWEEN_INNER_QUOTE="some\"value" -DBETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value" -DEND_WITH_BACKSLASH="value\"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN="some.value"' -D'"BETWEEN_EMPTY"=""' myfile.cpp -D'BETWEEN_SPACE="some value"' -D 'BETWEEN_INNER_QUOTE="some value"' -DBETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder" -I "../../" -I "../folder with space/subfolder" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/" -I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/" "myfile.cpp"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/' '-I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder"' -I".." '-I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/"' '-I "../folder with space/"' "myfile.cpp" -I `{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"`
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\'some.value\' -DBETWEEN_EMPTY=\'\' -DBETWEEN_SPACE=\'some value\' -DBETWEEN_INNER_QUOTE=\'some'value\' -DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D"'BETWEEN_EMPTY'=\'\'" myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D "BETWEEN_INNER_QUOTE=\'some value\'" -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/' -I"../folder with space/" myfile.cpp -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN='some.value' -DBETWEEN_EMPTY='' -DBETWEEN_SPACE='some value' -DBETWEEN_INNER_QUOTE='some\'value' -DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' -DEND_WITH_BACKSLASH='value\'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D 'BETWEEN_INNER_QUOTE=\'some value\'' -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder' -I '../../' -I '../folder with space/subfolder' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/' "myfile.cpp"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/' -I '../folder with space/' "myfile.cpp" -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found the following 1 launch targets defined in the makefile: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Complete list of launch targets: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Parsing for launch targets elapsed time: 0
Generating parse content for build targets.
Parsing for build targets from: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\complex_escaped_quotes_dryrun.log"
No build targets have been detected.
Complete list of build targets:
Parsing build targets elapsed time: 0
Configure finished. The status for all the subphases that ran:
loadFromCache: return code = -3, elapsed time = 0
generateParseContent: return code = 0, elapsed time = 0
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0
parseLaunch: return code = 0, elapsed time = 0
dryrunTargets: return code = 0, elapsed time = 0
parseTargets: return code = 0, elapsed time = 0
Configure succeeded.
Configure elapsed time: 0

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

@ -0,0 +1,22 @@
# Various compiler command line fragments with interesting quoting and escaping scenarios to verify the extension's parser.
# Wrapping with escaped double quotes (only applicable to -D. -I even if it parses the same, APIs like path making relative/absolute will fail.
# and they are not used in real code bases).
MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\"some.value\" -DBETWEEN_EMPTY=\"\" -DBETWEEN_SPACE=\"some value\" -DBETWEEN_INNER_QUOTE=\"some"value\" -DBETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
MyOwnFakeCompiler '-DBETWEEN=\"some.value\"' -D'"BETWEEN_EMPTY"=\"\"' myfile.cpp -D'BETWEEN_SPACE=\"some value\"' -D "BETWEEN_INNER_QUOTE=\"some value\"" -DBETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
# Wrapping with double quotes (-I '" is not used in real code bases and also, even if the extension parses that the same as -D '", correctly,
# path APIs for making absolute/relative will fail, so no use to test.
MyOwnFakeCompiler "myfile.cpp" -DBETWEEN="some.value" -DBETWEEN_EMPTY="" -DBETWEEN_SPACE="some value" -DBETWEEN_INNER_QUOTE="some\"value" -DBETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value" -DEND_WITH_BACKSLASH="value\"
MyOwnFakeCompiler '-DBETWEEN="some.value"' -D'"BETWEEN_EMPTY"=""' myfile.cpp -D'BETWEEN_SPACE="some value"' -D 'BETWEEN_INNER_QUOTE="some value"' -DBETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
MyOwnFakeCompiler -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder" -I "../../" -I "../folder with space/subfolder" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/" -I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/" "myfile.cpp"
MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/' '-I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder"' -I".." '-I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/"' '-I "../folder with space/"' "myfile.cpp" -I `{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"`
# Repeat all of the above for single quotes
MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\'some.value\' -DBETWEEN_EMPTY=\'\' -DBETWEEN_SPACE=\'some value\' -DBETWEEN_INNER_QUOTE=\'some'value\' -DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D"'BETWEEN_EMPTY'=\'\'" myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D "BETWEEN_INNER_QUOTE=\'some value\'" -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/' -I"../folder with space/" myfile.cpp -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/'
MyOwnFakeCompiler "myfile.cpp" -DBETWEEN='some.value' -DBETWEEN_EMPTY='' -DBETWEEN_SPACE='some value' -DBETWEEN_INNER_QUOTE='some\'value' -DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' -DEND_WITH_BACKSLASH='value\'
MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D 'BETWEEN_INNER_QUOTE=\'some value\'' -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder' -I '../../' -I '../folder with space/subfolder' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/' "myfile.cpp"
MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/' -I '../folder with space/' "myfile.cpp" -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/'

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

@ -0,0 +1,234 @@
Pre-configuring...
Script: "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/.vscode/preconfigure_nonwin.sh"
The pre-configure succeeded.
Setting configuration - complex_escaped_quotes
Found build log path setting "./complex_escaped_quotes_dryrun.log" defined for configuration "complex_escaped_quotes
Resolving build log path to "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/complex_escaped_quotes_dryrun.log"
Deduced command 'c:/some/other/fake/path ' for configuration complex_escaped_quotes
Saving opened files before build.
Preprocessing: "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/complex_escaped_quotes_dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
Updating the CppTools IntelliSense Configuration Provider.
Parsing dry-run output for CppTools Custom Configuration Provider.
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\"some.value\" -DBETWEEN_EMPTY=\"\" -DBETWEEN_SPACE=\"some value\" -DBETWEEN_INNER_QUOTE=\"some"value\" -DBETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN=\"some.value\";BETWEEN_EMPTY=\"\";BETWEEN_SPACE=\"some value\";BETWEEN_INNER_QUOTE=\"some"value\";BETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN=\"some.value\"' -D'"BETWEEN_EMPTY"=\"\"' myfile.cpp -D'BETWEEN_SPACE=\"some value\"' -D "BETWEEN_INNER_QUOTE=\"some value\"" -DBETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN=\"some.value\";"BETWEEN_EMPTY"=\"\";BETWEEN_SPACE=\"some value\";BETWEEN_INNER_QUOTE=\"some value\";BETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN="some.value" -DBETWEEN_EMPTY="" -DBETWEEN_SPACE="some value" -DBETWEEN_INNER_QUOTE="some\"value" -DBETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value" -DEND_WITH_BACKSLASH="value\"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN="some.value";BETWEEN_EMPTY="";BETWEEN_SPACE="some value";BETWEEN_INNER_QUOTE="some\"value";BETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value";END_WITH_BACKSLASH="value\"
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN="some.value"' -D'"BETWEEN_EMPTY"=""' myfile.cpp -D'BETWEEN_SPACE="some value"' -D 'BETWEEN_INNER_QUOTE="some value"' -DBETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN="some.value";"BETWEEN_EMPTY"="";BETWEEN_SPACE="some value";BETWEEN_INNER_QUOTE="some value";BETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder" -I "../../" -I "../folder with space/subfolder" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/" -I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/" "myfile.cpp"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/' '-I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder"' -I".." '-I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/"' '-I "../folder with space/"' "myfile.cpp" -I `{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"`
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\'some.value\' -DBETWEEN_EMPTY=\'\' -DBETWEEN_SPACE=\'some value\' -DBETWEEN_INNER_QUOTE=\'some'value\' -DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';BETWEEN_EMPTY=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some'value\';BETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D"'BETWEEN_EMPTY'=\'\'" myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D "BETWEEN_INNER_QUOTE=\'some value\'" -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';'BETWEEN_EMPTY'=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some value\';BETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/' -I"../folder with space/" myfile.cpp -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN='some.value' -DBETWEEN_EMPTY='' -DBETWEEN_SPACE='some value' -DBETWEEN_INNER_QUOTE='some\'value' -DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' -DEND_WITH_BACKSLASH='value\'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN='some.value';BETWEEN_EMPTY='';BETWEEN_SPACE='some value';BETWEEN_INNER_QUOTE='some\'value';BETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value';END_WITH_BACKSLASH='value\'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D 'BETWEEN_INNER_QUOTE=\'some value\'' -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';\'BETWEEN_EMPTY\'=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some value\';BETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder' -I '../../' -I '../folder with space/subfolder' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/' "myfile.cpp"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Found compiler command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/' -I '../folder with space/' "myfile.cpp" -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
---------------------------------------------------------------------------------------------------
Sending Workspace Browse Configuration: -----------------------------------
Browse Path: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/";{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/;{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/
Standard: c++17
Compiler Path: MyOwnFakeCompiler
Compiler Arguments:
----------------------------------------------------------------------------
Parsing for IntelliSense elapsed time: 0
Parsing for launch targets.
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\"some.value\" -DBETWEEN_EMPTY=\"\" -DBETWEEN_SPACE=\"some value\" -DBETWEEN_INNER_QUOTE=\"some"value\" -DBETWEEN_INNER_QUOTE_SLASH=\"some\' /"/ \` value\"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN=\"some.value\"' -D'"BETWEEN_EMPTY"=\"\"' myfile.cpp -D'BETWEEN_SPACE=\"some value\"' -D "BETWEEN_INNER_QUOTE=\"some value\"" -DBETWEEN_INNER_QUOTE_SLASH='\"some\' /"/ \` value\"'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN="some.value" -DBETWEEN_EMPTY="" -DBETWEEN_SPACE="some value" -DBETWEEN_INNER_QUOTE="some\"value" -DBETWEEN_INNER_QUOTE_SLASH="some\' /\"/ \` value" -DEND_WITH_BACKSLASH="value\"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN="some.value"' -D'"BETWEEN_EMPTY"=""' myfile.cpp -D'BETWEEN_SPACE="some value"' -D 'BETWEEN_INNER_QUOTE="some value"' -DBETWEEN_INNER_QUOTE_SLASH='"some\' /\"/ \` value"'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder" -I "../../" -I "../folder with space/subfolder" -I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder with space\"/subfolder/" -I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/" "myfile.cpp"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/"folder with space"/subfolder/' '-I"{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder"' -I".." '-I "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/"' '-I "../folder with space/"' "myfile.cpp" -I `{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder1 with space\'/\"folder2 with space\"/subfolder/"`
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN=\'some.value\' -DBETWEEN_EMPTY=\'\' -DBETWEEN_SPACE=\'some value\' -DBETWEEN_INNER_QUOTE=\'some'value\' -DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D"'BETWEEN_EMPTY'=\'\'" myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D "BETWEEN_INNER_QUOTE=\'some value\'" -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/' -I"../folder with space/" myfile.cpp -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/"folder2 with space"/subfolder/'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler "myfile.cpp" -DBETWEEN='some.value' -DBETWEEN_EMPTY='' -DBETWEEN_SPACE='some value' -DBETWEEN_INNER_QUOTE='some\'value' -DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' -DEND_WITH_BACKSLASH='value\'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler '-DBETWEEN=\'some.value\'' -D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp -D'BETWEEN_SPACE=\'some value\'' -D 'BETWEEN_INNER_QUOTE=\'some value\'' -DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder/' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder with space/subfolder' -I '../../' -I '../folder with space/subfolder' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder\ with\ escaped\ space/subfolder/' "myfile.cpp"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found linker command: MyOwnFakeCompiler -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\'folder with space\'/subfolder/' '-I{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder' -I'..' -I'{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/folder/' -I '../folder with space/' "myfile.cpp" -I '{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/repros/\"folder1 with space\"/\`folder2 with space\`/subfolder/'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Found the following 1 launch targets defined in the makefile: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Complete list of launch targets: {REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros>a.out()
Parsing for launch targets elapsed time: 0
Generating parse content for build targets.
Parsing for build targets from: "{REPO:VSCODE-MAKEFILE-TOOLS}/src/test/fakeSuite/Repros/complex_escaped_quotes_dryrun.log"
No build targets have been detected.
Complete list of build targets:
Parsing build targets elapsed time: 0
Configure finished. The status for all the subphases that ran:
loadFromCache: return code = -3, elapsed time = 0
generateParseContent: return code = 0, elapsed time = 0
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0
parseLaunch: return code = 0, elapsed time = 0
dryrunTargets: return code = 0, elapsed time = 0
parseTargets: return code = 0, elapsed time = 0
Configure succeeded.
Configure elapsed time: 0

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

@ -0,0 +1,170 @@
Pre-configuring...
Script: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\.vscode\preconfigure.bat"
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>call "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\.vscode\preconfigure.bat"
The pre-configure succeeded.
Setting configuration - complex_escaped_quotes_winOnly
Found build log path setting "./complex_escaped_quotes_winOnly_dryrun.log" defined for configuration "complex_escaped_quotes_winOnly
Resolving build log path to "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\complex_escaped_quotes_winOnly_dryrun.log"
Deduced command 'c:\some\other\fake\path.exe ' for configuration complex_escaped_quotes_winOnly
Saving opened files before build.
Loading configurations from cache is not necessary.
Preprocessing: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\complex_escaped_quotes_winOnly_dryrun.log"
Preprocess elapsed time: 0
Parsing for IntelliSense.
Updating the CppTools IntelliSense Configuration Provider.
Parsing dry-run output for CppTools Custom Configuration Provider.
Found compiler command: gcc "myfile.cpp" /DBETWEEN=\'some.value\' /DBETWEEN_EMPTY=\'\' /DBETWEEN_SPACE=\'some value\' /DBETWEEN_INNER_QUOTE=\'some'value\' /DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';BETWEEN_EMPTY=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some'value\';BETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc '/DBETWEEN=\'some.value\'' /D"'BETWEEN_EMPTY'=\'\'" myfile.cpp /D'BETWEEN_SPACE=\'some value\'' /D "BETWEEN_INNER_QUOTE=\'some value\'" /DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';'BETWEEN_EMPTY'=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some value\';BETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc "myfile.cpp" /DBETWEEN='some.value' /DBETWEEN_EMPTY='' /DBETWEEN_SPACE='some value' /DBETWEEN_INNER_QUOTE='some\'value' /DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' /DEND_WITH_BACKSLASH='value\'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN='some.value';BETWEEN_EMPTY='';BETWEEN_SPACE='some value';BETWEEN_INNER_QUOTE='some\'value';BETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value';END_WITH_BACKSLASH='value\'
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc '/DBETWEEN=\'some.value\'' /D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp /D'BETWEEN_SPACE=\'some value\'' /D 'BETWEEN_INNER_QUOTE=\'some value\'' /DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines: BETWEEN=\'some.value\';\'BETWEEN_EMPTY\'=\'\';BETWEEN_SPACE=\'some value\';BETWEEN_INNER_QUOTE=\'some value\';BETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
Includes:
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I "..\.." /I "..\folder with space\subfolder" /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder" "myfile.cpp"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder"' '/I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder"' /I'..' '/I "..\folder with space"' "myfile.cpp" ' /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder" '
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I `..` /I `..\folder with space\subfolder` /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder" "myfile.cpp"
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Found compiler command: gcc '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder"' '/I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder"' '/I`..`' '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder \"with\" space\subfolder" ' /I '..\"folder with space"\subfolder' "myfile.cpp" '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder"'
Sending configuration for file {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\myfile.cpp -----------------------------------
Defines:
Includes: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\"folder with space"\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder
Force Includes:
Standard: c++17
IntelliSense Mode: gcc-x64
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
---------------------------------------------------------------------------------------------------
Sending Workspace Browse Configuration: -----------------------------------
Browse Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\"folder with space"\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder;{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder
Standard: c++17
Compiler Path: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\bin\GitHub\compilers\gcc.exe
Compiler Arguments:
Windows SDK Version: 12.3.45678.9\
----------------------------------------------------------------------------
Parsing for IntelliSense elapsed time: 0
Parsing for launch targets.
Found linker command: gcc "myfile.cpp" /DBETWEEN=\'some.value\' /DBETWEEN_EMPTY=\'\' /DBETWEEN_SPACE=\'some value\' /DBETWEEN_INNER_QUOTE=\'some'value\' /DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc '/DBETWEEN=\'some.value\'' /D"'BETWEEN_EMPTY'=\'\'" myfile.cpp /D'BETWEEN_SPACE=\'some value\'' /D "BETWEEN_INNER_QUOTE=\'some value\'" /DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc "myfile.cpp" /DBETWEEN='some.value' /DBETWEEN_EMPTY='' /DBETWEEN_SPACE='some value' /DBETWEEN_INNER_QUOTE='some\'value' /DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' /DEND_WITH_BACKSLASH='value\'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc '/DBETWEEN=\'some.value\'' /D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp /D'BETWEEN_SPACE=\'some value\'' /D 'BETWEEN_INNER_QUOTE=\'some value\'' /DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I "..\.." /I "..\folder with space\subfolder" /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder" "myfile.cpp"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder"' '/I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder"' /I'..' '/I "..\folder with space"' "myfile.cpp" ' /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder" '
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I `..` /I `..\folder with space\subfolder` /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder" "myfile.cpp"
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found linker command: gcc '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder"' '/I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder"' '/I`..`' '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder \"with\" space\subfolder" ' /I '..\"folder with space"\subfolder' "myfile.cpp" '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder"'
The link command is not producing a target binary explicitly. Assuming a.out
Producing target binary: a.out
Adding launch configuration:
{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Found the following 1 launch targets defined in the makefile: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Complete list of launch targets: {REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros>a.out()
Parsing for launch targets elapsed time: 0
Generating parse content for build targets.
Parsing for build targets from: "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\Repros\complex_escaped_quotes_winOnly_dryrun.log"
No build targets have been detected.
Complete list of build targets:
Parsing build targets elapsed time: 0
Configure finished. The status for all the subphases that ran:
generateParseContent: return code = 0, elapsed time = 0
preprocessParseContent: return code = 0, elapsed time = 0
parseIntelliSense: return code = 0, elapsed time = 0
parseLaunch: return code = 0, elapsed time = 0
dryrunTargets: return code = 0, elapsed time = 0
parseTargets: return code = 0, elapsed time = 0
Configure succeeded.
Configure elapsed time: 0

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

@ -0,0 +1,11 @@
# Various compiler command line fragments with interesting quoting and escaping scenarios to verify the extension's parser.
# MSVC specific: / instead of - for switch prefix and backslash for paths instead of forward slash.
gcc "myfile.cpp" /DBETWEEN=\'some.value\' /DBETWEEN_EMPTY=\'\' /DBETWEEN_SPACE=\'some value\' /DBETWEEN_INNER_QUOTE=\'some'value\' /DBETWEEN_INNER_QUOTE_SLASH=\'some\" /'/ \` value\'
gcc '/DBETWEEN=\'some.value\'' /D"'BETWEEN_EMPTY'=\'\'" myfile.cpp /D'BETWEEN_SPACE=\'some value\'' /D "BETWEEN_INNER_QUOTE=\'some value\'" /DBETWEEN_INNER_QUOTE_SLASH='\'some\" /"/ \` value\''
gcc "myfile.cpp" /DBETWEEN='some.value' /DBETWEEN_EMPTY='' /DBETWEEN_SPACE='some value' /DBETWEEN_INNER_QUOTE='some\'value' /DBETWEEN_INNER_QUOTE_SLASH='some\' /\'/ \" value' /DEND_WITH_BACKSLASH='value\'
gcc '/DBETWEEN=\'some.value\'' /D'\'BETWEEN_EMPTY\'=\'\'' myfile.cpp /D'BETWEEN_SPACE=\'some value\'' /D 'BETWEEN_INNER_QUOTE=\'some value\'' /DBETWEEN_INNER_QUOTE_SLASH='\'some\" /\'/ \` value\''
gcc /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I "..\.." /I "..\folder with space\subfolder" /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder" "myfile.cpp"
gcc '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder"' '/I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder"' /I'..' '/I "..\folder with space"' "myfile.cpp" ' /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder" '
gcc /I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder" /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder" /I `..` /I `..\folder with space\subfolder` /I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder\ with\ escaped\ space\subfolder" "myfile.cpp"
gcc '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\"folder with space\"\subfolder"' '/I"{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder with space\subfolder"' '/I`..`' '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\folder \"with\" space\subfolder" ' /I '..\"folder with space"\subfolder' "myfile.cpp" '/I "{REPO:VSCODE-MAKEFILE-TOOLS}\src\test\fakeSuite\repros\\'folder1 with space\'\\`folder2 with space\`\subfolder"'

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

@ -27,9 +27,8 @@
// that are called with arguments in the makefile.
// See comment in parser.ts, parseLineAsTool and parseLaunchConfiguration.
import * as assert from 'assert';
import * as configuration from '../../configuration';
import {expect} from 'chai';
import { expect } from 'chai';
import * as launch from '../../launch';
import * as make from '../../make';
import * as util from '../../util';
@ -40,293 +39,393 @@ import { extension } from '../../extension';
// TODO: refactor initialization and cleanup of each test
suite('Fake dryrun parsing', /*async*/() => {
// Interesting scenarios with string paths, corner cases in defining includes/defines,
// complex configurations-targets-files associations.
// For now, this test needs to run in an environment with VS 2019.
// The output log varies depending on finding a particular VS toolset or not.
// We need to test the scenario of providing in the makefile a full path to the compiler,
// so there is no way around this. Using only compiler name and relying on path is not sufficient.
// Also, for the cases when a path (relative or full) is given to the compiler in the makefile
// and the compiler is not found there, the parser will skip over the compiler command
// (see comment in parser.ts - parseLineAsTool), so again, we need to find the toolset that is referenced in the makefile.
// TODO: mock various scenarios of VS environments without depending on what is installed.
// TODO: adapt the makefile on mac/linux/mingw and add new tests in this suite
// to parse the dry-run logs obtained on those platforms.
let systemPlatform: string;
if (process.platform === "win32") {
systemPlatform = (process.env.MSYSTEM === undefined) ? "win32" : process.env.MSYSTEM;
} else {
systemPlatform = process.platform;
}
// Interesting scenarios with string paths, corner cases in defining includes/defines,
// complex configurations-targets-files associations.
// For now, this test needs to run in an environment with VS 2019.
// The output log varies depending on finding a particular VS toolset or not.
// We need to test the scenario of providing in the makefile a full path to the compiler,
// so there is no way around this. Using only compiler name and relying on path is not sufficient.
// Also, for the cases when a path (relative or full) is given to the compiler in the makefile
// and the compiler is not found there, the parser will skip over the compiler command
// (see comment in parser.ts - parseLineAsTool), so again, we need to find the toolset that is referenced in the makefile.
// TODO: mock various scenarios of VS environments without depending on what is installed.
// TODO: adapt the makefile on mac/linux/mingw and add new tests in this suite
// to parse the dry-run logs obtained on those platforms.
let systemPlatform: string;
if (process.platform === "win32") {
systemPlatform = (process.env.MSYSTEM === undefined) ? "win32" : process.env.MSYSTEM;
} else {
systemPlatform = process.platform;
}
if (systemPlatform === "win32") {
test('Interesting small makefile - windows', async() => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
test(`Complex scenarios with quotes and escaped quotes - ${systemPlatform}`, async () => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// Run a preconfigure script to include our tests "Program Files" path so that we always find a cl.exe
// from this extension repository instead of a real VS installation that happens to be in the path.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure.bat"));
await make.preConfigure(make.TriggeredBy.tests);
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", systemPlatform === "win32" ? ".vscode/preconfigure.bat" : ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName("InterestingSmallMakefile_windows_configDebug");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName("complex_escaped_quotes");
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["bin\\InterestingSmallMakefile\\ARC H3\\Debug\\main.exe(str3a,str3b,str3c)",
"bin\\InterestingSmallMakefile\\arch1\\Debug\\main.exe(str3a,str3b,str3c)",
"bin\\InterestingSmallMakefile\\arch2\\Debug\\main.exe()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
// No need to setting and building a target, running a launch target, ...etc... like the other tests
// Compare log output only from a configure to see how we parse the quotes and escape characters in compiler command lines.
let retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, systemPlatform === "win32" ? "../complex_escaped_quotes_baseline.out" : "../complex_escaped_quotes_nonWin_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
extensionLogContent = extensionLogContent.replace(/\r\n/mg, "\n");
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
baselineLogContent = baselineLogContent.replace(/\r\n/mg, "\n");
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
if (systemPlatform === "win32") {
test(`Complex scenarios with quotes and escaped quotes - winOnly`, async () => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure.bat"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName("complex_escaped_quotes_winOnly");
// No need to setting and building a target, running a launch target, ...etc... like the other tests
// Compare log output only from a configure to see how we parse the quotes and escape characters in compiler command lines.
let retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, "../complex_escaped_quotes_winOnly_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
extensionLogContent = extensionLogContent.replace(/\r\n/mg, "\n");
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
baselineLogContent = baselineLogContent.replace(/\r\n/mg, "\n");
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
if (systemPlatform === "win32") {
test('Interesting small makefile - windows', async () => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// Run a preconfigure script to include our tests "Program Files" path so that we always find a cl.exe
// from this extension repository instead of a real VS installation that happens to be in the path.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure.bat"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName("InterestingSmallMakefile_windows_configDebug");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["bin\\InterestingSmallMakefile\\ARC H3\\Debug\\main.exe(str3a,str3b,str3c)",
"bin\\InterestingSmallMakefile\\arch1\\Debug\\main.exe(str3a,str3b,str3c)",
"bin\\InterestingSmallMakefile\\arch2\\Debug\\main.exe()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
// A bit more coverage, "RelSize" and "RelSpeed" are set up
// to exercise different combinations of pre-created build log and/or make tools.
// No configure is necessary to be run here, it is enough to look at what happens
// when changing a configuration.
configuration.setConfigurationByName("InterestingSmallMakefile_windows_configRelSize");
configuration.setConfigurationByName("InterestingSmallMakefile_windows_configRelSpeed");
// InterestingSmallMakefile_windows_configRelSpeed constructs a more interesting build command.
configuration.setTargetByName("Execute_Arch3");
make.prepareBuildTarget("Execute_Arch3");
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, "../InterestingSmallMakefile_windows_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
extensionLogContent = extensionLogContent.replace(/\r\n/mg, "\n");
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
baselineLogContent = baselineLogContent.replace(/\r\n/mg, "\n");
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
// dry-run logs for https://github.com/rui314/8cc.git
if (systemPlatform === "linux" || systemPlatform === "mingw") {
test(`8cc - ${systemPlatform}`, async() => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
configuration.setExtensionLog(extensionLogPath);
}
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
// A bit more coverage, "RelSize" and "RelSpeed" are set up
// to exercise different combinations of pre-created build log and/or make tools.
// No configure is necessary to be run here, it is enough to look at what happens
// when changing a configuration.
configuration.setConfigurationByName("InterestingSmallMakefile_windows_configRelSize");
configuration.setConfigurationByName("InterestingSmallMakefile_windows_configRelSpeed");
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName(process.platform === "linux" ? "8cc_linux" : "8cc_mingw");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
// InterestingSmallMakefile_windows_configRelSpeed constructs a more interesting build command.
configuration.setTargetByName("Execute_Arch3");
make.prepareBuildTarget("Execute_Arch3");
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["8cc()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, "../InterestingSmallMakefile_windows_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
extensionLogContent = extensionLogContent.replace(/\r\n/mg, "\n");
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
baselineLogContent = baselineLogContent.replace(/\r\n/mg, "\n");
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
// dry-run logs for https://github.com/rui314/8cc.git
if (systemPlatform === "linux" || systemPlatform === "mingw") {
test(`8cc - ${systemPlatform}`, async () => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName(process.platform === "linux" ? "8cc_linux" : "8cc_mingw");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["8cc()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
configuration.setTargetByName("all");
make.prepareBuildTarget("all");
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, process.platform === "linux" ? "../8cc_linux_baseline.out" : "../8cc_mingw_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
// dry-run logs for https://github.com/FidoProject/Fido.git
if (systemPlatform === "linux" || systemPlatform === "mingw") {
test(`Fido - ${systemPlatform}`, async() => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
configuration.setExtensionLog(extensionLogPath);
}
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.setTargetByName("all");
make.prepareBuildTarget("all");
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName(process.platform === "linux" ? "Fido_linux" : "Fido_mingw");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, process.platform === "linux" ? "../8cc_linux_baseline.out" : "../8cc_mingw_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["bin/foo.o()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
// dry-run logs for https://github.com/FidoProject/Fido.git
if (systemPlatform === "linux" || systemPlatform === "mingw") {
test(`Fido - ${systemPlatform}`, async () => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName(process.platform === "linux" ? "Fido_linux" : "Fido_mingw");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["bin/foo.o()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
configuration.setTargetByName("bin/foo.o");
make.prepareBuildTarget("bin/foo.o");
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, process.platform === "linux" ? "../Fido_linux_baseline.out" : "../Fido_mingw_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
// dry-run logs for https://github.com/jakogut/tinyvm.git
if (systemPlatform === "linux" || systemPlatform === "mingw") {
test(`tinyvm - ${systemPlatform}`, async() => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
configuration.setExtensionLog(extensionLogPath);
}
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.setTargetByName("bin/foo.o");
make.prepareBuildTarget("bin/foo.o");
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName(process.platform === "linux" ? "tinyvm_linux_pedantic" : "tinyvm_mingw_pedantic");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, process.platform === "linux" ? "../Fido_linux_baseline.out" : "../Fido_mingw_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["bin/tvmi()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
// dry-run logs for https://github.com/jakogut/tinyvm.git
if (systemPlatform === "linux" || systemPlatform === "mingw") {
test(`tinyvm - ${systemPlatform}`, async () => {
// Settings reset from the previous test run.
extension.getState().reset(false);
await configuration.initFromStateAndSettings();
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
// We define extension log here as opposed to in the fake repro .vscode/settings.json
// because the logging produced at the first project load has too few important data to verify and much variations
// that are not worth to be processed when comparing with a baseline.
// Example: when running a test after incomplete debugging or after loading the fake repro project independently of the testing framework,
// which leaves the workspace state not clean, resulting in a different extension output log
// than without debugging/loading the project before.
// If we define extension log here instead of .vscode/settings.json, we also have to clean it up
// because at project load time, there is no makefile log identified and no file is deleted on activation.
let extensionLogPath: string = path.join(vscode.workspace.rootPath || "./", ".vscode/Makefile.out");
if (util.checkFileExistsSync(extensionLogPath)) {
util.deleteFileSync(extensionLogPath);
}
configuration.setExtensionLog(extensionLogPath);
// Run a preconfigure script to include our tests fake compilers path so that we always find gcc/gpp/clang/...etc...
// from this extension repository instead of a real installation which may vary from system to system.
configuration.setPreConfigureScript(path.join(vscode.workspace.rootPath || "./", ".vscode/preconfigure_nonwin.sh"));
await make.preConfigure(make.TriggeredBy.tests);
configuration.prepareConfigurationsQuickPick();
configuration.setConfigurationByName(process.platform === "linux" ? "tinyvm_linux_pedantic" : "tinyvm_mingw_pedantic");
const retc: number = await make.cleanConfigure(make.TriggeredBy.tests, true);
configuration.setBuildBeforeLaunch(false);
const launchConfigurations: string[] = ["bin/tvmi()"];
for (const config of launchConfigurations) {
await configuration.setLaunchConfigurationByName(vscode.workspace.rootPath + ">" + config);
let status: string = await launch.getLauncher().validateLaunchConfiguration(make.Operations.debug);
let launchConfiguration: configuration.LaunchConfiguration | undefined;
if (status === launch.LaunchStatuses.success) {
launchConfiguration = configuration.getCurrentLaunchConfiguration();
}
configuration.setTargetByName("tvmi");
make.prepareBuildTarget("tvmi");
if (launchConfiguration) {
launch.getLauncher().prepareDebugCurrentTarget(launchConfiguration);
launch.getLauncher().prepareRunCurrentTarget();
}
}
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, process.platform === "linux" ? "../tinyvm_linux_baseline.out" : "../tinyvm_mingw_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
configuration.setTargetByName("tvmi");
make.prepareBuildTarget("tvmi");
// Compare the output log with the baseline
// TODO: incorporate relevant diff snippets into the test log.
// Until then, print into base and diff files for easier viewing
// when the test fails.
let parsedPath: path.ParsedPath = path.parse(extensionLogPath);
let baselineLogPath: string = path.join(parsedPath.dir, process.platform === "linux" ? "../tinyvm_linux_baseline.out" : "../tinyvm_mingw_baseline.out");
let extensionLogContent: string = util.readFile(extensionLogPath) || "";
let baselineLogContent: string = util.readFile(baselineLogPath) || "";
let extensionRootPath: string = path.resolve(__dirname, "../../../../");
baselineLogContent = baselineLogContent.replace(/{REPO:VSCODE-MAKEFILE-TOOLS}/mg, extensionRootPath);
// fs.writeFileSync(path.join(parsedPath.dir, "base.out"), baselineLogContent);
// fs.writeFileSync(path.join(parsedPath.dir, "diff.out"), extensionLogContent);
expect(extensionLogContent).to.be.equal(baselineLogContent);
});
}
});

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

@ -10,7 +10,7 @@ export function run(): Promise<void> {
// Create the mocha test
const mocha : Mocha = new Mocha({
ui: 'tdd',
timeout: 1000000
timeout: 100000000
});
mocha.useColors(true);