Skip to content

Commit a1b945c

Browse files
committed
chore: skip slow tests for additional cross-compiled builds
1 parent 846300b commit a1b945c

5 files changed

Lines changed: 23 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,16 +292,19 @@ jobs:
292292
build_dist: alpine
293293
build_type: clang-relsize-lto-ninja-static
294294
cross_arch: riscv64
295+
skip_slow_tests: true
295296

296297
- build_arch: amd64
297298
build_dist: alpine
298299
build_type: clang-release-ninja-static
299300
cross_arch: riscv64
301+
skip_slow_tests: true
300302

301303
- build_arch: amd64
302304
build_dist: alpine
303305
build_type: gcc-release-ninja-static
304306
cross_arch: riscv64
307+
skip_slow_tests: true
305308

306309
- build_arch: amd64
307310
build_dist: alpine
@@ -312,16 +315,19 @@ jobs:
312315
build_dist: alpine
313316
build_type: clang-relsize-lto-ninja-static
314317
cross_arch: i386
318+
skip_slow_tests: true
315319

316320
- build_arch: amd64
317321
build_dist: alpine
318322
build_type: clang-release-ninja-static
319323
cross_arch: i386
324+
skip_slow_tests: true
320325

321326
- build_arch: amd64
322327
build_dist: alpine
323328
build_type: gcc-release-ninja-static
324329
cross_arch: i386
330+
skip_slow_tests: true
325331

326332
- build_arch: amd64
327333
build_dist: alpine
@@ -332,11 +338,13 @@ jobs:
332338
build_dist: alpine
333339
build_type: clang-relsize-lto-ninja-static
334340
cross_arch: arm
341+
skip_slow_tests: true
335342

336343
- build_arch: amd64
337344
build_dist: alpine
338345
build_type: clang-release-ninja-static
339346
cross_arch: arm
347+
skip_slow_tests: true
340348

341349
######### fails: static_assert(std::atomic<bool>::is_always_lock_free);
342350
# - build_arch: amd64
@@ -355,6 +363,7 @@ jobs:
355363
build_arch: ${{ matrix.build_arch }}
356364
build_dist: ${{ matrix.build_dist }}
357365
cross_arch: ${{ matrix.cross_arch }}
366+
skip_slow_tests: ${{ matrix.skip_slow_tests || false }}
358367
build_from_tarball: true
359368
upload_coverage: ${{ matrix.build_type == 'clang-debug-coverage-ninja' }}
360369
upload_artifacts: ${{ endsWith(matrix.build_type, '-static') }}

.github/workflows/docker-run-build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ on:
2929
required: false
3030
type: boolean
3131
default: false
32+
skip_slow_tests:
33+
required: false
34+
type: boolean
35+
default: false
3236

3337
permissions:
3438
contents: read
@@ -72,6 +76,7 @@ jobs:
7276
--mount type=bind,source=${HOME}/github-local,target=/local \
7377
--mount type=bind,source=/mnt/opensource/artifacts/dwarfs,target=/artifacts \
7478
${{ inputs.build_from_tarball && '--env BUILD_FROM_TARBALL=1' || '' }} \
79+
${{ inputs.skip_slow_tests && '--env DWARFS_SKIP_SLOW_TESTS=1' || '' }} \
7580
--env BUILD_TYPE=${{ inputs.build_type }} \
7681
--env BUILD_ARCH=${{ inputs.build_arch }} \
7782
--env CROSS_ARCH=${{ inputs.cross_arch }} \

.maintainer-scripts/workflow-tracing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def main():
136136
if args.ninja and step.get("name") == "Run Build":
137137
run_id = job.get("run_id", 0)
138138
# get arch, dist, config from "linux (arm64v8, alpine, clang-release-ninja-static) / docker-build"
139-
m = re.match(r"linux \(([^,]+), ([^,]+), ([^,]+)(, ([^,]+))?\)", name)
139+
m = re.match(r"linux \(([^,]+), ([^,]+), ([^,]+)(, ([^,]+))?(, true)?\)", name)
140140
if m:
141141
cross = m.group(5) if m.group(5) else ""
142142
build_log_path = f"{args.log_base}/{run_id}/build-{m.group(1)},{cross},{m.group(2)},{m.group(3)}.log"

test/block_merger_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ block_merger_test(size_t const max_runs) {
476476
} // namespace
477477

478478
TEST(block_merger, random) {
479+
DWARFS_SLOW_TEST();
480+
479481
using merger_type = internal::multi_queue_block_merger<size_t, block>;
480482

481483
auto max_runs = skip_slow_tests() ? max_runs_regular_quick : max_runs_regular;
@@ -487,6 +489,8 @@ TEST(block_merger, random) {
487489
}
488490

489491
TEST(block_merger, random_sized) {
492+
DWARFS_SLOW_TEST();
493+
490494
using merger_type =
491495
internal::multi_queue_block_merger<size_t, sized_block,
492496
sized_block_merger_policy>;
@@ -500,6 +504,8 @@ TEST(block_merger, random_sized) {
500504
}
501505

502506
TEST(block_merger, random_sized_partial) {
507+
DWARFS_SLOW_TEST();
508+
503509
using merger_type =
504510
internal::multi_queue_block_merger<size_t, sized_block,
505511
sized_block_merger_policy>;

test/tool_main_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2990,6 +2990,8 @@ TEST(mkdwarfs_test, map_file_error) {
29902990
class map_file_error_test : public testing::TestWithParam<char const*> {};
29912991

29922992
TEST_P(map_file_error_test, delayed) {
2993+
DWARFS_SLOW_TEST();
2994+
29932995
#if defined(__linux__) && defined(__i386__)
29942996
GTEST_SKIP() << "this test is flaky on i386 Linux (SIGPIPE)";
29952997
#endif

0 commit comments

Comments
 (0)