From 9a3109518126a4a5427d18ead621d8d0d70deff2 Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Fri, 25 Apr 2025 08:46:28 -0700 Subject: [PATCH] [build] Introduce 'arch' parameter for stress test script. Fixes https://ci.chromium.org/ui/p/dart/builders/try/iso-stress-linux-arm64-try/4 Change-Id: Iba64548fb3396a3536e3669992d6c778ae9c90cb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/424700 Reviewed-by: Siva Annamalai Commit-Queue: Alexander Aprelev --- .../concurrency/run_stress_test_shards.dart | 69 ++++++++++--------- tools/bots/test_matrix.json | 41 ++++++++++- 2 files changed, 75 insertions(+), 35 deletions(-) diff --git a/runtime/tests/concurrency/run_stress_test_shards.dart b/runtime/tests/concurrency/run_stress_test_shards.dart index 232945b0ec9..6eea5da4b57 100644 --- a/runtime/tests/concurrency/run_stress_test_shards.dart +++ b/runtime/tests/concurrency/run_stress_test_shards.dart @@ -135,37 +135,7 @@ void writeUnexpectedCrashesFile(List crashes) { const int tsanShards = 200; -final configurations = [ - JitTestRunner('out/DebugX64', [ - '--disable-dart-dev', - 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill', - ]), - JitTestRunner('out/ReleaseX64', [ - '--disable-dart-dev', - '--no-inline-alloc', - '--use-slow-path', - '--deoptimize-on-runtime-call-every=3', - 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill', - ]), - for (int i = 0; i < tsanShards; ++i) - JitTestRunner('out/ReleaseTSANX64', [ - '--disable-dart-dev', - '-Drepeat=4', - '-Dshard=$i', - '-Dshards=$tsanShards', - 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill', - ]), - AotTestRunner( - 'out/ReleaseX64', - ['runtime/tests/concurrency/generated_stress_test.dart.aot.dill'], - [], - ), - AotTestRunner( - 'out/DebugX64', - ['runtime/tests/concurrency/generated_stress_test.dart.aot.dill'], - [], - ), -]; +late final List configurations; main(List arguments) async { final parser = ArgParser() @@ -175,13 +145,46 @@ main(List arguments) async { help: 'unused parameter to make sharding infra work', defaultsTo: '') ..addFlag('copy-coredumps', help: 'whether to copy binaries for coredumps', defaultsTo: false) - ..addOption("previous-results", - help: "An earlier results.json for balancing tests across shards."); + ..addOption('previous-results', + help: 'An earlier results.json for balancing tests across shards.') + ..addOption('arch', help:'architecture to be tested', defaultsTo: 'X64'); final options = parser.parse(arguments); final shards = int.parse(options['shards']); final shard = int.parse(options['shard']) - 1; final copyCoredumps = options['copy-coredumps'] as bool; + final arch = options['arch'].toUpperCase(); + configurations = [ + JitTestRunner('out/Debug$arch', [ + '--disable-dart-dev', + 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill', + ]), + JitTestRunner('out/Release$arch', [ + '--disable-dart-dev', + '--no-inline-alloc', + '--use-slow-path', + '--deoptimize-on-runtime-call-every=3', + 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill', + ]), + for (int i = 0; i < tsanShards; ++i) + JitTestRunner('out/ReleaseTSAN$arch', [ + '--disable-dart-dev', + '-Drepeat=4', + '-Dshard=$i', + '-Dshards=$tsanShards', + 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill', + ]), + AotTestRunner( + 'out/Release$arch', + ['runtime/tests/concurrency/generated_stress_test.dart.aot.dill'], + [], + ), + AotTestRunner( + 'out/Debug$arch', + ['runtime/tests/concurrency/generated_stress_test.dart.aot.dill'], + [], + )]; + // Tasks will eventually be killed if they do not have any output for some // time. So we'll explicitly print something every 4 minutes. diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json index 7f89438dedf..58927d29fc4 100644 --- a/tools/bots/test_matrix.json +++ b/tools/bots/test_matrix.json @@ -3584,7 +3584,24 @@ }, "steps": [ { - "name": "Build Dart VM - JIT and AOT", + "name": "Build Dart VM - JIT and AOT - gen_snapshot", + "script": "tools/build.py", + "arguments": [ + "--mode=debug,release", + "gen_snapshot" + ] + }, + { + "name": "Build Dart VM - JIT and AOT - runtime/bin:dart, run_vm_tests", + "script": "tools/build.py", + "arguments": [ + "--mode=debug,release", + "runtime/bin:dart", + "runtime/bin:run_vm_tests" + ] + }, + { + "name": "Build Dart VM - JIT and AOT - runtime, dartaotruntime", "script": "tools/build.py", "arguments": [ "--mode=debug,release", @@ -3593,7 +3610,26 @@ ] }, { - "name": "Build Dart VM - JIT and AOT (Release TSAN)", + "name": "Build Dart VM - JIT and AOT (Release TSAN) - gen_snapshot", + "script": "tools/build.py", + "arguments": [ + "--mode=release", + "--sanitizer=tsan", + "gen_snapshot" + ] + }, + { + "name": "Build Dart VM - JIT and AOT (Release TSAN)- runtime/bin:dart, run_vm_tests", + "script": "tools/build.py", + "arguments": [ + "--mode=release", + "--sanitizer=tsan", + "runtime/bin:dart", + "runtime/bin:run_vm_tests" + ] + }, + { + "name": "Build Dart VM - JIT and AOT (Release TSAN) - runtime, dartaotruntime", "script": "tools/build.py", "arguments": [ "--mode=release", @@ -3641,6 +3677,7 @@ "arguments": [ "${build_root}/dart", "runtime/tests/concurrency/run_stress_test_shards.dart", + "--arch=${arch}", "--copy-coredumps" ], "shards": 10,