[PATCH] D62930: [llvm-ar][test] Relax lit directory assumptions in thin-archive.test

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 13:17:41 PDT 2019


rupprecht created this revision.
rupprecht added a reviewer: gbreynoo.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62930

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


Index: llvm/test/tools/llvm-ar/thin-archive.test
===================================================================
--- llvm/test/tools/llvm-ar/thin-archive.test
+++ llvm/test/tools/llvm-ar/thin-archive.test
@@ -12,15 +12,15 @@
 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
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62930.203238.patch
Type: text/x-patch
Size: 1537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190605/e85abb88/attachment.bin>


More information about the llvm-commits mailing list