]> granicus.if.org Git - llvm/commitdiff
[llvm-ar][test] Relax lit directory assumptions in thin-archive.test
authorJordan Rupprecht <rupprecht@google.com>
Wed, 12 Jun 2019 18:41:27 +0000 (18:41 +0000)
committerJordan Rupprecht <rupprecht@google.com>
Wed, 12 Jun 2019 18:41:27 +0000 (18:41 +0000)
Summary: thin-archive.test assumes the Output/<testname> structure that lit creates. Rewrite the test in a way that still tests the same thing (creating via relative path and adding via absolute path) but doesn't assume this specific lit structure, making it possible to run in a lit emulator.

Reviewers: gbreynoo

Reviewed By: gbreynoo

Subscribers: llvm-commits, bkramer

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62930

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363189 91177308-0d34-0410-b5e6-96231b3b80d8

test/tools/llvm-ar/thin-archive.test

index 8d9543b686968c1b964ea6883091656e38abeacf..fca8e1176234cdb1c72d671e8403481d6914b5b8 100644 (file)
@@ -12,15 +12,15 @@ RUN: llvm-ar dT %t/absolute-1.ar delete.o
 RUN: FileCheck -input-file=%t/absolute-1.ar --check-prefixes=THIN,CHECK %s -DPATH=%/t/
 RUN: llvm-ar t %t/absolute-1.ar | FileCheck %s -DPATH=%/t/
 
-Test that modules can be added with absolute paths when the archive is created using a relative path
+These tests must be run in %t/foo. cd %t is included on each line to make debugging this test case easier.
 
-RUN: llvm-ar rTc Output/%basename_t.tmp/absolute-2.ar %t/foo/elf.o %t/delete.o %t/foo/bar/elf.o
-RUN: llvm-ar dT Output/%basename_t.tmp/absolute-2.ar %t/delete.o
+Test that modules can be added with absolute paths when the archive is created using a relative path
 
-RUN: FileCheck -input-file=%t/absolute-2.ar --check-prefixes=THIN,CHECK %s -DPATH=%/t/
-RUN: llvm-ar t %t/absolute-2.ar | FileCheck %s -DPATH=%/t/
+RUN: cd %t/foo && llvm-ar rTc bar/absolute-2.ar %t/foo/elf.o %t/delete.o %t/foo/bar/elf.o
+RUN: cd %t/foo && llvm-ar dT bar/absolute-2.ar %t/delete.o
 
-These tests must be run in %t/foo. cd %t is included on each line to make debugging this test case easier.
+RUN: FileCheck -input-file=%t/foo/bar/absolute-2.ar --check-prefixes=THIN,CHECK %s -DPATH=%/t/
+RUN: llvm-ar t %t/foo/bar/absolute-2.ar | FileCheck %s -DPATH=%/t/
 
 Test that modules can be added with relative paths when the archive is created using a relative path