1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-22 19:23:31 +00:00

Added WebLogging Support #define to release

Added Delay start support to unit tests
This commit is contained in:
Bryan Roe
2022-07-07 14:46:12 -07:00
parent 10cf922be7
commit a1679280ae
2 changed files with 27 additions and 6 deletions

View File

@@ -372,7 +372,7 @@ powershell -ExecutionPolicy Unrestricted $(ProjectDir)prebuild.ps1 $(ProjectDir)
<Optimization>Full</Optimization> <Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\openssl\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\openssl\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MESH_AGENTID=3;DUK_USE_DATE_NOW_WINDOWS;NOLMSCOMMANDER;MICROSTACK_PROXY;_LINKVM;WIN32;NDEBUG;_WINSERVICE;_CONSOLE;WINSOCK2;MICROSTACK_NO_STDAFX;MICROSTACK_TLS_DETECT;_MSC_PLATFORM_TOOLSET_$(PlatformToolset);ILibChain_WATCHDOG_TIMEOUT=600000;DUK_USE_DEBUGGER_SUPPORT;DUK_USE_INTERRUPT_COUNTER;DUK_USE_DEBUGGER_INSPECT;DUK_USE_DEBUGGER_PAUSE_UNCAUGHT;DUK_USE_DEBUGGER_DUMPHEAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>MESH_AGENTID=3;DUK_USE_DATE_NOW_WINDOWS;NOLMSCOMMANDER;MICROSTACK_PROXY;_LINKVM;WIN32;NDEBUG;_WINSERVICE;_CONSOLE;WINSOCK2;MICROSTACK_NO_STDAFX;MICROSTACK_TLS_DETECT;_MSC_PLATFORM_TOOLSET_$(PlatformToolset);ILibChain_WATCHDOG_TIMEOUT=600000;DUK_USE_DEBUGGER_SUPPORT;DUK_USE_INTERRUPT_COUNTER;DUK_USE_DEBUGGER_INSPECT;DUK_USE_DEBUGGER_PAUSE_UNCAUGHT;DUK_USE_DEBUGGER_DUMPHEAP;_REMOTELOGGING;_REMOTELOGGINGSERVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>
@@ -461,7 +461,7 @@ powershell -ExecutionPolicy Unrestricted $(ProjectDir)prebuild.ps1 $(ProjectDir)
<Optimization>MinSpace</Optimization> <Optimization>MinSpace</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\openssl\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\openssl\include;..\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>MESH_AGENTID=4;DUK_USE_DATE_NOW_WINDOWS;NOLMSCOMMANDER;MICROSTACK_PROXY;WIN32;WIN64;_WINSERVICE;NDEBUG;_LINKVM;_CONSOLE;MICROSTACK_NO_STDAFX;MICROSTACK_PROXY;WINSOCK2;MICROSTACK_TLS_DETECT;_MSC_PLATFORM_TOOLSET_$(PlatformToolset);ILibChain_WATCHDOG_TIMEOUT=600000;DUK_USE_DEBUGGER_SUPPORT;DUK_USE_INTERRUPT_COUNTER;DUK_USE_DEBUGGER_INSPECT;DUK_USE_DEBUGGER_PAUSE_UNCAUGHT;DUK_USE_DEBUGGER_DUMPHEAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>MESH_AGENTID=4;DUK_USE_DATE_NOW_WINDOWS;NOLMSCOMMANDER;MICROSTACK_PROXY;WIN32;WIN64;_WINSERVICE;NDEBUG;_LINKVM;_CONSOLE;MICROSTACK_NO_STDAFX;WINSOCK2;MICROSTACK_TLS_DETECT;_MSC_PLATFORM_TOOLSET_$(PlatformToolset);ILibChain_WATCHDOG_TIMEOUT=600000;DUK_USE_DEBUGGER_SUPPORT;DUK_USE_INTERRUPT_COUNTER;DUK_USE_DEBUGGER_INSPECT;DUK_USE_DEBUGGER_PAUSE_UNCAUGHT;DUK_USE_DEBUGGER_DUMPHEAP;_REMOTELOGGING;_REMOTELOGGINGSERVER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader> <PrecompiledHeader>

View File

@@ -108,6 +108,7 @@ if (process.argv.getParameter('help') != null)
console.log('\n Available options:'); console.log('\n Available options:');
console.log(' --AgentsFolder= The path to the agents folder of the Server Repository'); console.log(' --AgentsFolder= The path to the agents folder of the Server Repository');
console.log(' --console If specified, enables console command mode'); console.log(' --console If specified, enables console command mode');
console.log(' --Delay If specified, will prompt the user to hit enter before starting unit tests');
console.log(' --FileTransfer If specified, individually runs the FileTransfer Unit Test'); console.log(' --FileTransfer If specified, individually runs the FileTransfer Unit Test');
console.log(' --LocalDebug Specifies a port number for the Local Web Debug Interface'); console.log(' --LocalDebug Specifies a port number for the Local Web Debug Interface');
console.log(' --PrivacyBar If specified, causes the agent to spawn a privacy bar'); console.log(' --PrivacyBar If specified, causes the agent to spawn a privacy bar');
@@ -157,6 +158,7 @@ if (process.argv.getParameter('RemoteDebug') != null)
var promises = var promises =
{ {
delay: null,
coreinfo: null, coreinfo: null,
CommitInfo: null, CommitInfo: null,
AgentInfo: null, AgentInfo: null,
@@ -657,6 +659,25 @@ server.on('upgrade', function (msg, sck, head)
}); });
return; return;
} }
if (process.argv.getParameter('Delay') != null)
{
process.stdout.write('\nPress any key to start running Mesh Core Unit Tests\n');
console.canonical = false; // This takes the console out of canonical mode, which means stdin will process each key press individually, instead of by line.
process.stdin.once('data', function ()
{
console.canonical = true;
promises.delay.resolve();
});
}
else
{
promises.delay.resolve();
}
};
promises.delay.then(function runCommands2()
{
if (process.argv.getParameter('WebRTC') != null) if (process.argv.getParameter('WebRTC') != null)
{ {
WebRTC_Test().finally(function () { endTest(); }); WebRTC_Test().finally(function () { endTest(); });
@@ -691,7 +712,7 @@ server.on('upgrade', function (msg, sck, head)
process.stdout.write('\r'); process.stdout.write('\r');
process.stdout.write(' Agent sent Network Info to server.......................[OK] \n'); process.stdout.write(' Agent sent Network Info to server.......................[OK] \n');
process.stdout.write(' Agent sent SMBIOS info to server........................[WAITING]'); process.stdout.write(' Agent sent SMBIOS info to server........................[WAITING]');
switch(process.platform) switch (process.platform)
{ {
case 'linux': case 'linux':
case 'win32': case 'win32':
@@ -759,7 +780,7 @@ server.on('upgrade', function (msg, sck, head)
{ {
p = JSON.parse(v.value); p = JSON.parse(v.value);
} }
catch(e) catch (e)
{ {
process.stdout.write('\r PS Test.................................................[FAILED] \n'); process.stdout.write('\r PS Test.................................................[FAILED] \n');
process.stdout.write(' => ' + e + '\n'); process.stdout.write(' => ' + e + '\n');
@@ -806,7 +827,7 @@ server.on('upgrade', function (msg, sck, head)
return (promises.getclip); return (promises.getclip);
}).then(function (v) }).then(function (v)
{ {
if(v.data == global._cliptest) if (v.data == global._cliptest)
{ {
process.stdout.write('\r Clipboard Test..........................................[OK] \n'); process.stdout.write('\r Clipboard Test..........................................[OK] \n');
} }
@@ -889,7 +910,7 @@ server.on('upgrade', function (msg, sck, head)
endTest(); endTest();
}); });
}; });
}); });
function FileTransfer_Test_Download() function FileTransfer_Test_Download()