CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
109 lines
3.8 KiB
Plaintext
109 lines
3.8 KiB
Plaintext
# Note: many of these tests depend on relative paths, so we have to cd to a
|
|
# test directory first.
|
|
RUN: mkdir -p %t && cd %t
|
|
RUN: rm -rf a b && mkdir a b
|
|
RUN: echo hello-a > a/foo.txt
|
|
RUN: echo hello-b > b/foo.txt
|
|
RUN: echo hello-parent > foo.txt
|
|
|
|
# Verify that P is accepted.
|
|
RUN: rm -f noop.a && llvm-ar rcP noop.a foo.txt
|
|
RUN: llvm-ar p noop.a | FileCheck %s --check-prefix=ACCEPT
|
|
|
|
ACCEPT: hello-parent
|
|
|
|
# Regular (non-thin) archives cannot be created with full path names as
|
|
# members, but P can still affect how lookup works (assuming we're reading an
|
|
# archive not created by GNU ar or llvm-ar).
|
|
# Looking up a/foo.txt in a regular archive will fail with P because it is
|
|
# added to the archive as foo.txt.
|
|
RUN: rm -f display.a
|
|
RUN: llvm-ar rcS display.a a/foo.txt foo.txt b/foo.txt
|
|
RUN: llvm-ar t display.a a/foo.txt | FileCheck %s --check-prefix=DISPLAY-FOUND --match-full-lines
|
|
RUN: not llvm-ar tP display.a a/foo.txt 2>&1 | FileCheck %s --check-prefix=DISPLAY-NOT-FOUND
|
|
|
|
DISPLAY-FOUND: foo.txt
|
|
DISPLAY-NOT-FOUND: 'a/foo.txt' was not found
|
|
|
|
# Deleting will fail with P because the members exist as foo.txt, not a/foo.txt.
|
|
RUN: rm -f del1.a
|
|
RUN: llvm-ar rcS del1.a foo.txt
|
|
RUN: llvm-ar dP del1.a a/foo.txt
|
|
RUN: llvm-ar t del1.a a/foo.txt | FileCheck %s --check-prefix=DISPLAY-FOUND --match-full-lines
|
|
RUN: llvm-ar d del1.a a/foo.txt
|
|
RUN: not llvm-ar t del1.a a/foo.txt 2>&1 | FileCheck %s --check-prefix=DISPLAY-NOT-FOUND
|
|
|
|
# Run several checks that P is implied when using thin archives. None of these
|
|
# checks explicitly use P.
|
|
|
|
# Creating an archive in one step.
|
|
RUN: rm -f add.a
|
|
RUN: llvm-ar rcST add.a a/foo.txt foo.txt b/foo.txt
|
|
RUN: llvm-ar t add.a | FileCheck %s --check-prefix=ADD --match-full-lines
|
|
|
|
ADD: a/foo.txt
|
|
ADD-NEXT: foo.txt
|
|
ADD-NEXT: b/foo.txt
|
|
|
|
# Create an archive incrementally.
|
|
RUN: rm -f add-inc.a
|
|
RUN: llvm-ar rcST add-inc.a a/foo.txt
|
|
RUN: llvm-ar rcST add-inc.a foo.txt
|
|
RUN: llvm-ar rcST add-inc.a b/foo.txt
|
|
RUN: llvm-ar t add-inc.a | FileCheck %s --check-prefix=ADD-INC --match-full-lines
|
|
|
|
ADD-INC: a/foo.txt
|
|
ADD-INC-NEXT: foo.txt
|
|
ADD-INC-NEXT: b/foo.txt
|
|
|
|
# Nesting a thin archive with a name conflict.
|
|
RUN: rm -f a/nested.a b/nested.a nested.a
|
|
RUN: llvm-ar rcST a/nested.a a/foo.txt
|
|
RUN: llvm-ar rcST b/nested.a b/foo.txt
|
|
RUN: llvm-ar rcST nested.a a/nested.a foo.txt b/nested.a
|
|
RUN: llvm-ar t nested.a | FileCheck %s --check-prefix=NESTED --match-full-lines
|
|
|
|
NESTED: a/foo.txt
|
|
NESTED-NEXT: foo.txt
|
|
NESTED-NEXT: b/foo.txt
|
|
|
|
# Printing members.
|
|
RUN: rm -f add.a
|
|
RUN: llvm-ar rcST add.a a/foo.txt foo.txt b/foo.txt
|
|
RUN: llvm-ar p add.a foo.txt | FileCheck %s --check-prefix=PRINT-PARENT --match-full-lines
|
|
RUN: llvm-ar p add.a a/foo.txt | FileCheck %s --check-prefix=PRINT-A --match-full-lines
|
|
RUN: llvm-ar p add.a b/foo.txt | FileCheck %s --check-prefix=PRINT-B --match-full-lines
|
|
PRINT-PARENT: hello-parent
|
|
PRINT-A: hello-a
|
|
PRINT-B: hello-b
|
|
|
|
# Listing members.
|
|
RUN: rm -f add.a
|
|
RUN: llvm-ar rcST add.a a/foo.txt foo.txt b/foo.txt
|
|
RUN: llvm-ar t add.a foo.txt | FileCheck %s --check-prefix=LIST-PARENT --match-full-lines
|
|
RUN: llvm-ar t add.a a/foo.txt | FileCheck %s --check-prefix=LIST-A --match-full-lines
|
|
RUN: llvm-ar t add.a b/foo.txt | FileCheck %s --check-prefix=LIST-B --match-full-lines
|
|
LIST-PARENT: foo.txt
|
|
LIST-PARENT-NOT: a/foo.txt
|
|
LIST-PARENT-NOT: b/foo.txt
|
|
LIST-A: a/foo.txt
|
|
LIST-B: b/foo.txt
|
|
|
|
# Deleting members.
|
|
RUN: rm -f del1.a
|
|
RUN: llvm-ar rcST del1.a a/foo.txt foo.txt b/foo.txt
|
|
RUN: llvm-ar d del1.a foo.txt
|
|
RUN: llvm-ar t del1.a | FileCheck %s --check-prefix=DEL-1 --match-full-lines
|
|
|
|
DEL-1-NOT: foo.txt
|
|
DEL-1: a/foo.txt
|
|
DEL-1-NEXT: b/foo.txt
|
|
|
|
RUN: rm -f del2.a
|
|
RUN: llvm-ar rcST del2.a a/foo.txt foo.txt b/foo.txt
|
|
RUN: llvm-ar d del2.a a/foo.txt
|
|
RUN: llvm-ar t del2.a | FileCheck %s --check-prefix=DEL-2 --match-full-lines
|
|
DEL-2-NOT: a/foo.txt
|
|
DEL-2: foo.txt
|
|
DEL-2-NEXT: b/foo.txt
|