[llvm] r363189 - [llvm-ar][test] Relax lit directory assumptions in thin-archive.test

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 11:41:27 PDT 2019


Author: rupprecht
Date: Wed Jun 12 11:41:27 2019
New Revision: 363189

URL: http://llvm.org/viewvc/llvm-project?rev=363189&view=rev
Log:
[llvm-ar][test] Relax lit directory assumptions in thin-archive.test

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

Modified:
    llvm/trunk/test/tools/llvm-ar/thin-archive.test

Modified: llvm/trunk/test/tools/llvm-ar/thin-archive.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-ar/thin-archive.test?rev=363189&r1=363188&r2=363189&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-ar/thin-archive.test (original)
+++ llvm/trunk/test/tools/llvm-ar/thin-archive.test Wed Jun 12 11:41:27 2019
@@ -12,15 +12,15 @@ RUN: llvm-ar dT %t/absolute-1.ar delete.
 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
 




More information about the llvm-commits mailing list