Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-07-03 22:01:33 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2020-07-03 22:01:33 +0300
commit07068de54ae723c8e4e3d9c91fde97ee378ccad2 (patch)
treebcff368469c1a05a9b87bef84f0ce30a860eeb33 /test
parentcfe08ab0630f277b0c7d8f749c1cbca3172bb808 (diff)
Yet more travis and appveyor bashing
Diffstat (limited to 'test')
-rw-r--r--test/tests/path_view.cpp5
-rw-r--r--test/tests/process_handle.cpp28
2 files changed, 23 insertions, 10 deletions
diff --git a/test/tests/path_view.cpp b/test/tests/path_view.cpp
index a0488b5e..51dd6bc9 100644
--- a/test/tests/path_view.cpp
+++ b/test/tests/path_view.cpp
@@ -188,6 +188,11 @@ static inline void TestPathView()
BOOST_CHECK(llfio::path_view(L"\\\\.\\niall").is_absolute());
// On Windows this is relative, on POSIX it is absolute
BOOST_CHECK(llfio::path_view("/niall").is_relative());
+
+ // This was segfaulting on Appveyor
+ llfio::
+ path_view_component longthing(LR"(Path=C:\Program Files\Docker\Docker\Resources\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\7-Zip;C:\Tools\GitVersion;C:\Tools\NuGet;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\PsTools;C:\Program Files\Git LFS;C:\Program Files\Mercurial\;C:\Program Files (x86)\Subversion\bin;C:\Tools\WebDriver;C:\Tools\Coverity\bin;C:\Tools\MSpec;C:\Tools\NUnit\bin;C:\Tools\NUnit3;C:\Tools\xUnit;C:\Program Files\nodejs;C:\Program Files (x86)\iojs;C:\Program Files\iojs;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Ruby193\bin;C:\go\bin;C:\Program Files\Java\jdk1.8.0\bin;C:\Program Files (x86)\Apache\Maven\bin;C:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\CMake\bin;C:\Tools\curl\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130;C:\Program Files\dotnet\;C:\Tools\vcpkg;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\TestPlatform;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files\erl9.2\bin;C:\Program Files (x86)\NSIS;C:\Tools\Octopus;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files\Docker\Docker\resources;C:\Program Files\LLVM\bin;C:\Users\appveyor\AppData\Roaming\npm;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\PowerShell\6\;C:\Program Files (x86)\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Git\usr\bin;C:\Program Files\Meson\;C:\ProgramData\chocolatey\bin;C:\Program Files\Amazon\AWSCLI\;C:\Program Files (x86)\Yarn\bin\;C:\Users\appveyor\AppData\Local\Microsoft\WindowsApps;C:\Users\appveyor\.dotnet\tools;C:\Users\appveyor\AppData\Roaming\npm;C:\Users\appveyor\AppData\Local\Yarn\bin;C:\Program Files\AppVeyor\BuildAgent\)");
+ std::cout << "A very long path component is " << longthing << std::endl;
#else
BOOST_CHECK(llfio::path_view("/niall").is_absolute());
#endif
diff --git a/test/tests/process_handle.cpp b/test/tests/process_handle.cpp
index 204d5822..1ddf26e5 100644
--- a/test/tests/process_handle.cpp
+++ b/test/tests/process_handle.cpp
@@ -28,37 +28,43 @@ Distributed under the Boost Software License, Version 1.0.
#include "../test_kernel_decl.hpp"
-static inline void TestProcessHandle(bool with_redirection) {
+static inline void TestProcessHandle(bool with_redirection)
+{
namespace llfio = LLFIO_V2_NAMESPACE;
std::vector<llfio::process_handle> children;
auto &self = llfio::process_handle::current();
auto myexepath = self.current_path().value();
std::cout << "My process executable's path is " << myexepath << std::endl;
auto myenv = self.environment();
- fprintf(stderr, "appveyor debug environment(): just after environment, it returned %p\n", myenv.get());
std::cout << "My process environment contains:";
if(myenv)
{
for(auto &i : *myenv)
{
- visit(i, [](auto sv) { fwprintf(stderr, L"appveyor debug environment(): about to cout '%s'\n", (wchar_t *) sv.data()); });
- std::cout << "\n " << i;
+ if(visit(i, [](auto sv) -> bool {
+ if(sv.size() >= 512)
+ return false;
+ using _string_view = std::decay_t<decltype(sv)>;
+ _string_view a((const _string_view::value_type *) "JENKINS_NEDPROD_PASSWORD");
+ _string_view b((const _string_view::value_type *) L"JENKINS_NEDPROD_PASSWORD");
+ return (sv.npos == sv.find(a)) && (sv.npos == sv.find(b));
+ }))
+ {
+ std::cout << "\n " << i;
+ }
}
}
- fprintf(stderr, "appveyor debug environment(): just after iteration\n");
std::cout << "\n" << std::endl;
- fprintf(stderr, "appveyor debug environment(): just before launch process setup\n");
llfio::process_handle::flag flags = llfio::process_handle::flag::wait_on_close;
if(!with_redirection)
{
flags |= llfio::process_handle::flag::no_redirect;
}
- for(size_t n=0; n<4; n++)
+ for(size_t n = 0; n < 4; n++)
{
char buffer[64];
sprintf(buffer, "--testchild,%u", (unsigned) n);
llfio::path_view_component arg(buffer);
- fprintf(stderr, "appveyor debug environment(): just before launch process %u\n", (unsigned) n);
children.push_back(llfio::process_handle::launch_process(myexepath, {&arg, 1}, flags).value());
}
if(with_redirection)
@@ -80,8 +86,10 @@ static inline void TestProcessHandle(bool with_redirection) {
}
}
-KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, no_redirect, "Tests that llfio::process_handle without redirection works as expected", TestProcessHandle(false))
-KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, redirect, "Tests that llfio::process_handle with redirection works as expected", TestProcessHandle(true))
+KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, no_redirect, "Tests that llfio::process_handle without redirection works as expected",
+ TestProcessHandle(false))
+KERNELTEST_TEST_KERNEL(integration, llfio, process_handle, redirect, "Tests that llfio::process_handle with redirection works as expected",
+ TestProcessHandle(true))
int main(int argc, char *argv[])
{