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
99 lines
5.2 KiB
Plaintext
99 lines
5.2 KiB
Plaintext
Test the --embed-resource option.
|
|
|
|
REQUIRES: x86-registered-target
|
|
|
|
Create a temp resource file and embed it into the dSYM bundle.
|
|
|
|
RUN: rm -rf %t.dir && mkdir -p %t.dir
|
|
RUN: echo "# test resource" > %t.dir/test.py
|
|
RUN: dsymutil --linker classic -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/test.py=Python/test.py \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: diff %t.dir/test.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/test.py
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: dsymutil --linker parallel -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/test.py=Python/test.py \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: diff %t.dir/test.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/test.py
|
|
|
|
Verify multiple --embed-resource options.
|
|
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: echo "second" > %t.dir/second.txt
|
|
RUN: dsymutil --linker classic -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/test.py=Python/test.py \
|
|
RUN: --embed-resource %t.dir/second.txt=Scripts/second.txt \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: diff %t.dir/test.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/test.py
|
|
RUN: diff %t.dir/second.txt %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Scripts/second.txt
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: dsymutil --linker parallel -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/test.py=Python/test.py \
|
|
RUN: --embed-resource %t.dir/second.txt=Scripts/second.txt \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: diff %t.dir/test.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/test.py
|
|
RUN: diff %t.dir/second.txt %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Scripts/second.txt
|
|
|
|
Verify verbose output.
|
|
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: dsymutil --linker classic -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/test.py=Python/test.py \
|
|
RUN: --verbose -o %t.dir/basic.macho.x86_64.dSYM 2>&1 \
|
|
RUN: | FileCheck --check-prefix=VERBOSE %s
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: dsymutil --linker parallel -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/test.py=Python/test.py \
|
|
RUN: --verbose -o %t.dir/basic.macho.x86_64.dSYM 2>&1 \
|
|
RUN: | FileCheck --check-prefix=VERBOSE %s
|
|
|
|
VERBOSE: embed resource {{.*}}test.py -> {{.*}}Resources{{.}}Python{{.}}test.py
|
|
|
|
Verify error on missing source file.
|
|
|
|
RUN: not dsymutil --linker classic -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/nonexistent.py=Python/foo.py \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM 2>&1 \
|
|
RUN: | FileCheck --check-prefix=MISSING %s
|
|
RUN: not dsymutil --linker parallel -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/nonexistent.py=Python/foo.py \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM 2>&1 \
|
|
RUN: | FileCheck --check-prefix=MISSING %s
|
|
|
|
MISSING: error: cannot embed resource {{.*}}nonexistent.py
|
|
|
|
Verify directory embedding copies all files recursively.
|
|
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: mkdir -p %t.dir/pydir/sub
|
|
RUN: echo "file_a" > %t.dir/pydir/a.py
|
|
RUN: echo "file_b" > %t.dir/pydir/b.py
|
|
RUN: echo "file_sub" > %t.dir/pydir/sub/c.py
|
|
RUN: dsymutil --linker classic -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/pydir=Python \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: diff %t.dir/pydir/a.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/a.py
|
|
RUN: diff %t.dir/pydir/b.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/b.py
|
|
RUN: diff %t.dir/pydir/sub/c.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/sub/c.py
|
|
RUN: rm -rf %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: dsymutil --linker parallel -oso-prepend-path=%p %p/Inputs/basic.macho.x86_64 \
|
|
RUN: --embed-resource %t.dir/pydir=Python \
|
|
RUN: -o %t.dir/basic.macho.x86_64.dSYM
|
|
RUN: diff %t.dir/pydir/a.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/a.py
|
|
RUN: diff %t.dir/pydir/b.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/b.py
|
|
RUN: diff %t.dir/pydir/sub/c.py %t.dir/basic.macho.x86_64.dSYM/Contents/Resources/Python/sub/c.py
|
|
|
|
Verify error cases.
|
|
|
|
RUN: not dsymutil --linker classic --embed-resource noequals file1 2>&1 | FileCheck --check-prefix=BADEMBED %s
|
|
RUN: not dsymutil --linker parallel --embed-resource noequals file1 2>&1 | FileCheck --check-prefix=BADEMBED %s
|
|
BADEMBED: error: invalid --embed-resource argument 'noequals': expected <src-path>=<dst-path>
|
|
|
|
RUN: not dsymutil --linker classic --embed-resource /tmp/a.py=../../etc/passwd file1 2>&1 | FileCheck --check-prefix=ESCAPE %s
|
|
RUN: not dsymutil --linker parallel --embed-resource /tmp/a.py=../../etc/passwd file1 2>&1 | FileCheck --check-prefix=ESCAPE %s
|
|
ESCAPE: error: invalid --embed-resource destination '../../etc/passwd': must be a relative path within the bundle
|
|
|
|
RUN: not dsymutil --linker classic --embed-resource /tmp/a.py=%/t/absolute file1 2>&1 | FileCheck --check-prefix=ABSOLUTE %s
|
|
RUN: not dsymutil --linker parallel --embed-resource /tmp/a.py=%/t/absolute file1 2>&1 | FileCheck --check-prefix=ABSOLUTE %s
|
|
ABSOLUTE: error: invalid --embed-resource destination '{{.*}}absolute': must be a relative path within the bundle
|