aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/cpp/util
Commit message (Collapse)AuthorAge
...
* Fix test flakiness.Gravatar Laszlo Csomor2016-12-19
| | | | | | | | | | | | | | | | | | | | | | | In the Bazel client's file_test, when testing multi-threaded pipe access, wait for all data to be written into the pipe. Pipes are not synchonization primitives in that read(2) returns immediately, reading as much data as it can, and won't block if it cannot read as much as requested. (This is even tested by the last ASSERT_EQ, trying to read 40 bytes.) This is however also true for the second ASSERT_EQ that attempts to read 5 bytes. The Send on the writer_thread is racing with the Receive on the main thread (as it should), and sometimes the main thread wins, resulting in fewer bytes received than previously expected. -- PiperOrigin-RevId: 142429243 MOS_MIGRATED_REVID=142429243
* Bazel client, Windows: implement pipe handlingGravatar Laszlo Csomor2016-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create WindowsPipe which implements IPipe, and is a Windows-native implementation of pipe handling. It wraps the ::CreatePipe, ::WriteFile, and ::ReadFile API functions. Start using WindowsPipe on MSYS. Also move everything from file_test.cc into file_posix_test.cc, because these test methods heavily depend on POSIX and they test file_posix's functionality anyway. Also add tests for pipes: this will use the platform-specific implementation of IPipe. file_test.cc is now platform-independent, and we can test it with --cpu=x64_windows_msvc (and it passes!). See https://github.com/bazelbuild/bazel/issues/2107 Might also fix: https://github.com/bazelbuild/bazel/issues/2182 https://github.com/bazelbuild/bazel/issues/2248 -- PiperOrigin-RevId: 142240377 MOS_MIGRATED_REVID=142240377
* Bazel client: implement Cstring-Wstring conversionGravatar Laszlo Csomor2016-12-14
| | | | | | | | | | | | Implement conversion methods between char strings and wchar_t strings. This is necessary to use widechar Windows functions. See https://github.com/bazelbuild/bazel/issues/2181 -- PiperOrigin-RevId: 142009930 MOS_MIGRATED_REVID=142009930
* move MakeDirectories() into file_platform.hGravatar Thiago Farina2016-12-07
| | | | | | | | | | | | | | This way we can remove the dependency on blaze_util (which is Bazel's client specific) from singlejar. This work was made possible by commit 49970e0136d0: ("Bazel client: platform-specific {Read,Write}File"). -- Change-Id: I6e95fb9119a271e4d48cbe2eefc1d5354ee188aa Reviewed-on: https://cr.bazel.build/7650 PiperOrigin-RevId: 141294165 MOS_MIGRATED_REVID=141294165
* Adds logging functionality to the bazel client, which will be activated in a ↵Gravatar Chloe Calvarin2016-11-23
| | | | | | | later change. -- MOS_MIGRATED_REVID=139951184
* Bazel client: implement directory tree walkingGravatar Laszlo Csomor2016-11-16
| | | | | | | | | | | | | | | | | | | | | | This change: - merges the //src/{main,test}/cpp:file and //src/{main,test}/cpp:file_platform libraries because "file" and "file_platform" need each other and this makes logical sense anyway - implements a function in file_<platform> to run a custom function on every child of a directory - implements a function in file.cc to recursively traverse a directory tree, based on the previosly mentioned function - removes the corresponding logic from the Bazel client to make it more portable -- MOS_MIGRATED_REVID=139309562
* Really mark //src/main/cpp/util:file_platform_test as manualGravatar Klaus Aehlig2016-11-11
| | | | | | | | | | ...as opposed to //src/test/cpp:blaze_util_test which works fine. -- Change-Id: I1e629e6f8eda47cd7eac11511d54ee23f7122848 Reviewed-on: https://bazel-review.googlesource.com/#/c/7335 MOS_MIGRATED_REVID=138871238
* Bazel client: wrap some POSIX functionsGravatar Laszlo Csomor2016-11-10
| | | | | | | | | | | | | | This change: - starts using blaze_util::CanAccess and blaze_util::PathExists instead of access(2) - implements and starts using blaze_util::GetCwd instead of getcwd(2) - implements and starts using blaze_util::ChangeDirectory instead of chdir(2) - adds tests for the new wrapper methods -- MOS_MIGRATED_REVID=138750297
* cpp: header hygienizationGravatar Thiago Farina2016-10-18
| | | | | | | | | | | * remove "using std::" declarations from header files * add missing "std::" to some string declarations at some header files * add "using std::string;" to some source files where necessary -- Change-Id: Ib64f62b5add499d6171fa922227194ac992fa542 Reviewed-on: https://bazel-review.googlesource.com/#/c/6630/ MOS_MIGRATED_REVID=136355671
* Tests: //src/test/cpp/util:* now pass with MSVCGravatar Laszlo Csomor2016-10-05
| | | | | -- MOS_MIGRATED_REVID=135208653
* Add all the sources to //:srcs filegroup and add a check to detectGravatar Damien Martin-Guillerez2016-07-01
| | | | | | | | | | | missing file to it. We need to activate this check on presubmits -- Change-Id: Ia95e92d3816ce92bb69bc0e2cf56e9c60b68d970 Reviewed-on: https://bazel-review.googlesource.com/#/c/3949/ MOS_MIGRATED_REVID=126404792
* Make the integration tests pass with gRPC client/server comms.Gravatar Lukacs Berki2016-04-21
| | | | | | | | | | | In particular: - Make a SIGINT to the server interrupt every command - Parse negative numbers on the command line correctly (std::stoi throws an exception, and I'd rather not start using C++ exceptions) - Use "bytes" for command line arguments instead of "string" in the client/server proto . This is more principled, although we pretend all arguments are strings all over the place and it works for "blaze run" mostly by accident. -- MOS_MIGRATED_REVID=120434432
* Set sharding and tmpdir environment variables for googletestGravatar Brian Silverman2015-10-22
| | | | | | | | | | The patch for googletest to prefer GTEST_TMP_DIR is google/googletest#619 and should be merged soon. -- Change-Id: If48220e8e1e4e78a8768aeb14b5b58e4f246c8c3 Reviewed-on: https://bazel-review.googlesource.com/#/c/2170/ MOS_MIGRATED_REVID=106043714
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Some minor updates to the BUILD files.Gravatar Ulf Adams2015-09-15
| | | | | -- MOS_MIGRATED_REVID=103087492
* Fixed Bazel test target //src/test/cpp/util:strings_test by adding a missing ↵Gravatar Florian Weikert2015-08-10
| | | | | | | "using" statement. -- MOS_MIGRATED_REVID=100262453
* Externalize file_test and strings_test, and fix up the BUILD files.Gravatar Ulf Adams2015-08-10
-- MOS_MIGRATED_REVID=100109450