The expected behavior is to have something similar than python:
https://docs.python.org/dev/library/argparse.html#dest:
"Any internal - characters will be converted to _ characters to make sure the string is a valid attribute name".
This allows to catch chromium arguments like 'isolated-script-test-output' that previously needed some preprocessing done for example in flags_compatibility.py.
This CL also fixes a fuchsia specific issue where the test runner needs a 'isolated-script-test-output' argument but then pass the argument to WebRTC that expects a 'isolated_script_test_output' argument. Thus calling flags_compatibility before the test_runner fails and there is not much room to change the argument in between the test runner and the test.
Change-Id: I48a591743fa50484a0ec584a3f9e97d9e0fd25ef
Bug: webrtc:14694
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284541
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38707}
Add a few tests to get started on debugging.
The goal of this CL is to get the Fuchsia bots running the tests without infra specific issues. After landing this, failures will be in test framework files (e.g. test/testsupport folder) and WebRTC code.
Bug: b/232740856
Change-Id: I332607fe875334769e7dadf6696d878a23a7e69f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280440
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@google.com>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#38596}
This is a reland of 46e9629dda.
Relanding this one since it looks unrelated from the death tests
failure, see https://bugs.chromium.org/p/webrtc/issues/detail?id=11577.
Original change's description:
> Re-enable absl FailureSignalHandler in tests.
>
> It was not the cause of the SIGSEGV on iossim, so it is fine to
> re-enable it.
>
> TBR: titovartem@webrtc.org
> Bug: None
> Change-Id: I593a010f83f1a0df6b3419dd4f925380210844c9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175105
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31277}
TBR: titovartem@webrtc.org
Bug: None
Change-Id: I8d57c102e175bf66819f58057dd961830c2ab094
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175345
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31288}
This reverts commit 46e9629dda.
Reason for revert: Speculative revert.
Original change's description:
> Re-enable absl FailureSignalHandler in tests.
>
> It was not the cause of the SIGSEGV on iossim, so it is fine to
> re-enable it.
>
> TBR: titovartem@webrtc.org
> Bug: None
> Change-Id: I593a010f83f1a0df6b3419dd4f925380210844c9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175105
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31277}
TBR=mbonadei@webrtc.org,titovartem@webrtc.org,handellm@webrtc.org
Change-Id: I5e8456ea2918f740428517ee7eb5c561cb016652
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175112
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31280}
It was not the cause of the SIGSEGV on iossim, so it is fine to
re-enable it.
TBR: titovartem@webrtc.org
Bug: None
Change-Id: I593a010f83f1a0df6b3419dd4f925380210844c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/175105
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31277}
Extract functionality of test_main into separate library to be able to
reuse it if another main will be required.
Bug: webrtc:5996
Change-Id: I2925b4240bd0e4fb884b43bb16667ca2d6216bbd
Reviewed-on: https://webrtc-review.googlesource.com/c/105921
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25172}
SetExecutablePath isn't used anymore.
Nobody was using the fancy select-per-platform functionality, and the
documentation was wrong anyway. In the cases somebody needed an
override per platform, they were using defines in their own test
instead. I think that is more verbose but more predictable and easy
to understand (see how it's done in audio_processing_unittest.cc
when loading output_data_mac, for instance).
Bug: webrtc:9792
Change-Id: I7289bf5883fe43852638922d7c7583eae0c08601
Reviewed-on: https://webrtc-review.googlesource.com/c/104482
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25062}
In the effort of enabling -Wglobal-constructors and
-Wexit-time-destructors, WebRTC has to remove the Winsock global
initializer.
This will also remove it from Chromium (since it was unused).
After this CL, applications will have to explicitly initialize Winsock
before using WebRTC, this can be done by using the class
rtc::WinsockInitializer provided in rtc_base/win32socketinit.h.
Bug: webrtc:9693, webrtc:9754
Change-Id: I4aae12ff43671ef2713a6fc4592e20759dc6b495
Reviewed-on: https://webrtc-review.googlesource.com/99660
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24903}
This CL removes some deprecated build targets (and their headers)
from system_wrappers:
- field_trial_api
- field_trial_default
- metrics_api
- metrics_default
It also refreshes all the dependencies on field_trial.h and metrics.h.
A nice side effect is that it is finally possible to remove 'nogncheck'
from the following files (when it was used with field_trial_default
and metrics_default):
- sdk/objc/api/peerconnection/RTCMetricsSampleInfo+Private.h
- sdk/android/src/jni/pc/peerconnectionfactory.cc
- sdk/objc/api/peerconnection/RTCFieldTrials.mm
Bug: webrtc:9631
Change-Id: Ib621f41ef8ad0aba4fe1c1d7e749c044afc956c3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/100524
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24878}
to satisfy a stricter check introduced in
503174a3e1
The file is supposed to contain actual gtest results, so having an
empty one is a workaround, but this just returns things to the way
they were.
TBR: phoglund@webrtc.org
No-Try: True
Bug: webrtc:9767, chromium:885194
Change-Id: I693cc2df9dfcafd7b728deb9efd445d8fe2c4edf
Reviewed-on: https://webrtc-review.googlesource.com/101301
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24783}
This is a reland of 711a31aead
Changes since original landing:
Rename methods only used by tests, mainly via FakeClock,
MessageQueueManager::ProcessAllMessageQueues
--> ProcessAllMessageQueuesForTesting
MessageQueue::IsProcessingMessages
--> IsProcessingMessagesForTesting
Fix the handling of null rtc::Thread::Current() in
ProcessAllMessageQueuesInternal().
Add override Thread::IsProcessingMessagesForTesting() to return false
for the wrapped main thread, unless it's also the current thread. In
tests, the main thread is typically not processing any messages,
but blocked in an Event::Wait().
Original change's description:
> Explicitly wrap main thread in test_main.cc.
>
> Bug: webrtc:9714
> Change-Id: I6ee234f9a0b88b3656a683f2455c3e4b2acf0d54
> Reviewed-on: https://webrtc-review.googlesource.com/97683
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24560}
Bug: webrtc:9714
Change-Id: I6f022d46aaf1e28f86f09f2d68c1803b69770126
Reviewed-on: https://webrtc-review.googlesource.com/98060
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24596}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
When we run webrtc_perf_tests with gtest-parallel, each test is run
individually, and this results in the file with the perf results being
overwritten each time.
To avoid this, we won't use gtest-parallel when running webrtc_perf_tests,
so we will simply run the binary directly.
TBR=phoglund@chromium.org
Bug: chromium:755660
Change-Id: I24db36e512fcf604a3de2adf4d0b4325b2c3d1ae
Reviewed-on: https://webrtc-review.googlesource.com/49340
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21982}
This is done to solve a problem where a string literal is implicitly cast
to a temporary std::string when calling webrtc::test::InitFieldTrialsFromString
which passes a pointer to the internal representation to
webrtc::field_trial::InitFieldTrialFromString(char*). This pointer is
stored for later use, but the temporary std::string is destroyed as soon
as the function returns.
Using webrtc::field_trial::InitFieldTrialFromString(char*) instead,
avoids the implicit casts (but the caller still needs to ensure that
the char* outlives the program). The validation previously done by
webrtc::test::InitFieldTrialsFromString can now be done by manually
calling webrtc::test::ValidateFieldTrialsStringOrDie(const std::string&).
Add system_wrappers:field_trial_default as a direct dependency to
various targets to allow including the field_trials_default.h header.
Bug: webrtc:8812
Change-Id: Ib5a641ea255b1c16a8f7f35e1fe67f6c38a61da6
Reviewed-on: https://webrtc-review.googlesource.com/46141
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21856}
This will require a manual roll to downstream projects, since
the //test:perf_test target was introduced.
This is a reland of 10a8e7a9b5
Original change's description:
> iOS: Save perf results under Documents/perf_result.json
>
> TBR=henrika@webrtc.org
>
> Bug: webrtc:7156
> Change-Id: Ib00992cce0007e0b5c9274340df1a892f810b0c5
> Reviewed-on: https://webrtc-review.googlesource.com/29202
> Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21244}
R=henrika@webrtc.org, phoglund@webrtc.org
Bug: webrtc:7156
Change-Id: I85fc7bc5fce0894af90017b71b9952b61b523424
Reviewed-on: https://webrtc-review.googlesource.com/37643
Reviewed-by: Patrik Höglund <phoglund@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21518}
This reverts commit f711428898.
Reason for revert: Breaks downstream projects.
Original change's description:
> Use std::fstream instead of rtc::File to write perf results + rename flag.
>
> Use std::fstream instead of rtc::File to write perf results.
> On Android, when I use rtc::File, the results are not written for some reason.
>
> Also rename the flag to '--chartjson_result_file'.
>
> Bug: webrtc:8566
> Change-Id: I32215e2233e18690c41050dfd35ac77e01d11f35
> Reviewed-on: https://webrtc-review.googlesource.com/32001
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21225}
TBR=phoglund@webrtc.org,ehmaldonado@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8566
Change-Id: I55611592c3171152cee97e64bff35a0d62cea510
Reviewed-on: https://webrtc-review.googlesource.com/33080
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21283}
This will require a manual roll to downstream projects, since
the //test:perf_test target was introduced.
This is a reland of 10a8e7a9b5
Original change's description:
> iOS: Save perf results under Documents/perf_result.json
>
> TBR=henrika@webrtc.org
>
> Bug: webrtc:7156
> Change-Id: Ib00992cce0007e0b5c9274340df1a892f810b0c5
> Reviewed-on: https://webrtc-review.googlesource.com/29202
> Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
> Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21244}
TBR=henrika@webrtc.org, phoglund@webrtc.org
No-Try: true
Bug: webrtc:7156
Change-Id: Iecdb108f605fd1c98acde4d50ab4f5a7b5f6bfaf
Reviewed-on: https://webrtc-review.googlesource.com/32761
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21252}
Use std::fstream instead of rtc::File to write perf results.
On Android, when I use rtc::File, the results are not written for some reason.
Also rename the flag to '--chartjson_result_file'.
Bug: webrtc:8566
Change-Id: I32215e2233e18690c41050dfd35ac77e01d11f35
Reviewed-on: https://webrtc-review.googlesource.com/32001
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21225}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}