Files
acceptance-tests
data
debian
docs
external
Newtonsoft.Json
api-doc-tools
api-snapshot
aspnetwebstack
bdwgc
binary-reference-assemblies
bockbuild
boringssl
cecil
cecil-legacy
corefx
corert
helix-binaries
ikdasm
ikvm
illinker-test-assets
linker
llvm-project
clang
clang-tools-extra
compiler-rt
eng
libcxx
libcxxabi
libunwind
lld
lldb
llvm
bindings
cmake
docs
examples
include
lib
projects
resources
runtimes
scripts
test
Analysis
Assembler
Bindings
Bitcode
BugPoint
CodeGen
DebugInfo
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
LTO
Linker
MC
Object
AArch64
AMDGPU
ARM
Inputs
Lanai
Mips
RISCV
X86
ar-create.test
ar-error.test
archive-GNU64-write.test
archive-delete.test
archive-error-tmp.txt
archive-extract-dir.test
archive-extract.test
archive-format.test
archive-long-index.test
archive-move.test
archive-pad.test
archive-replace-pos.test
archive-symtab.test
archive-thin-create.test
archive-thin-paths.test
archive-thin-read.test
archive-toc.test
archive-update.test
check_binary_output.ll
coff-archive-short.test
coff-archive.test
coff-empty-drectve.test
coff-invalid.test
coff-weak-externals.test
corrupt.test
directory.ll
dllimport-globalref.ll
dllimport.ll
dyn-rel-relocation.test
dynamic-reloc.test
elf-invalid-phdr.test
elf-reloc-no-sym.test
elf-unknown-type.test
invalid-alignment.test
invalid.test
kext.test
lit.local.cfg
macho-invalid.test
mangle-ir.ll
mri-addlib.test
mri-addmod.test
mri-crlf.test
mri1.test
mri2.test
mri3.test
mri4.test
mri5.test
multi-module.ll
nm-archive.test
nm-darwin-m.test
nm-error.test
nm-irix6.test
nm-pe-image.test
nm-shared-object.test
nm-trivial-object.test
nm-universal-binary.test
nm-weak-global-macho.test
no-section-header-string-table.test
no-section-table.test
obj2yaml-coff-long-file-symbol.test
obj2yaml-coff-long-section-name.test
obj2yaml-coff-section-aux-symbol.test
obj2yaml-coff-weak-external.test
obj2yaml-invalid-reloc.test
obj2yaml-sectiongroup.test
obj2yaml.test
objc-imageinfo-coff.ll
objc-imageinfo-elf.ll
objc-imageinfo-macho.ll
objdump-export-list.test
objdump-file-header.test
objdump-no-sectionheaders.test
objdump-private-headers.test
objdump-reloc-shared.test
objdump-relocations.test
objdump-section-content.test
objdump-sectionheaders.test
objdump-shndx.test
objdump-symbol-table.test
pr25877.test
readobj-absent.test
readobj-elf-versioning.test
readobj-shared-object.test
readobj.test
relocation-executable.test
simple-archive.test
size-trivial-macho.test
stackmap-dump.test
wasm-invalid-start.test
wasm-missing-version.test
yaml2obj-coff-invalid-alignment.test
yaml2obj-coff-multi-doc.test
yaml2obj-elf-alignment.yaml
yaml2obj-elf-bits-endian.test
yaml2obj-elf-file-headers-with-e_flags.yaml
yaml2obj-elf-file-headers.yaml
yaml2obj-elf-multi-doc.test
yaml2obj-elf-rel-noref.yaml
yaml2obj-elf-rel.yaml
yaml2obj-elf-section-basic.yaml
yaml2obj-elf-section-invalid-size.yaml
yaml2obj-elf-symbol-LocalGlobalWeak.yaml
yaml2obj-elf-symbol-basic.yaml
yaml2obj-elf-symbol-visibility.yaml
yaml2obj-invalid.yaml
yaml2obj-readobj.test
ObjectYAML
Other
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO
Transforms
Unit
Verifier
YAMLParser
tools
.clang-format
CMakeLists.txt
TestRunner.sh
lit.cfg.py
lit.site.cfg.py.in
tools
unittests
utils
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in
version.txt.in
nuget
openmp
polly
Directory.Build.props
Directory.Build.targets
NuGet.config
azure-pipelines.yml
build.cmd
build.sh
dir.common.props
global.json
llvm.proj
mxe-Win64.cmake.in
nuget-buildtasks
nunit-lite
roslyn-binaries
rx
xunit-binaries
how-to-bump-roslyn-binaries.md
ikvm-native
llvm
m4
man
mcs
mono
msvc
netcore
po
runtime
samples
scripts
support
tools
COPYING.LIB
LICENSE
Makefile.am
Makefile.in
NEWS
README.md
acinclude.m4
aclocal.m4
autogen.sh
code_of_conduct.md
compile
config.guess
config.h.in
config.rpath
config.sub
configure.REMOVED.git-id
configure.ac.REMOVED.git-id
depcomp
install-sh
ltmain.sh.REMOVED.git-id
missing
mkinstalldirs
mono-uninstalled.pc.in
test-driver
winconfig.h
linux-packaging-mono/external/llvm-project/llvm/test/Object/archive-update.test

52 lines
1.7 KiB
Plaintext
Raw Normal View History

Test the 'u' option of llvm-ar
RUN: rm -rf %t && mkdir -p %t && cd %t
RUN: rm -f %t/tmp.a
Create a file named evenlen that is newer than the evenlen on the source dir.
RUN: mkdir -p %t/tmp.older
RUN: echo older > %t/tmp.older/evenlen
RUN: mkdir -p %t/tmp.newer
Either the shell supports the 'touch' command with a flag to manually set the
mtime or we sleep for over two seconds so that the mtime is definitely
observable.
RUN: touch -m -t 200001010000 %t/tmp.older/evenlen || sleep 2.1
RUN: echo newer > %t/tmp.newer/evenlen
RUN: touch %t/tmp.newer/evenlen
Create an achive with the newest file
RUN: llvm-ar rU %t/tmp.a %t/tmp.newer/evenlen
RUN: llvm-ar p %t/tmp.a | FileCheck --check-prefix=NEWER %s
Check that without the 'u' option the member is replaced with an older file.
RUN: llvm-ar rU %t/tmp.a %t/tmp.older/evenlen
RUN: llvm-ar p %t/tmp.a | FileCheck --check-prefix=OLDER %s
Check that with the 'u' option the member is replaced with a newer file.
RUN: llvm-ar ruU %t/tmp.a %t/tmp.newer/evenlen
RUN: llvm-ar p %t/tmp.a | FileCheck --check-prefix=NEWER %s
Check that with the 'u' option the member is not replaced with an older file.
RUN: llvm-ar ruU %t/tmp.a %t/tmp.older/evenlen
RUN: llvm-ar p %t/tmp.a | FileCheck --check-prefix=NEWER %s
NEWER: newer
OLDER: older
RUN: rm -f %t/tmp.a
RUN: echo foo > foo
RUN: echo bar > bar
RUN: llvm-ar --format=gnu rcT %t/tmp.a foo
RUN: llvm-ar --format=gnu rcT %t/tmp.a bar
RUN: llvm-ar t %t/tmp.a | FileCheck --check-prefix=BOTH-FILES %s
BOTH-FILES: foo
BOTH-FILES: bar
RUN: rm -f %t/tmp.a
RUN: llvm-ar --format=gnu rc %t/tmp.a foo
RUN: not llvm-ar --format=gnu rcT %t/tmp.a bar 2>&1 | FileCheck --check-prefix=ERROR %s
ERROR: Cannot convert a regular archive to a thin one.