From c8610265811e382dc5573d5206c5b92e556c0b96 Mon Sep 17 00:00:00 2001 From: Jordan Rupprecht Date: Wed, 12 Jun 2019 18:41:27 +0000 Subject: [PATCH] [llvm-ar][test] Relax lit directory assumptions in thin-archive.test Summary: thin-archive.test assumes the Output/ 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/tools/llvm-ar/thin-archive.test b/test/tools/llvm-ar/thin-archive.test index 8d9543b6869..fca8e117623 100644 --- a/test/tools/llvm-ar/thin-archive.test +++ b/test/tools/llvm-ar/thin-archive.test @@ -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 -- 2.40.0