From c58c8bb0d0ce75aaf69ffcd2ca297a16cea1c11f Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Fri, 23 Sep 2016 17:40:40 +0000 Subject: Fix the following tests when running under cross-compilation: Profile-aarch64 :: Linux/comdat_rename.test Profile-aarch64 :: Linux/extern_template.test Profile-aarch64 :: Linux/instrprof-comdat.test Profile-aarch64 :: Linux/instrprof-cs.c The issue is that the created (aarch64) binaries were attempting to run natively instead of running through %run, which guarantees running in the proper environment if the compilation was configured correctly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282264 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/profile/Linux/comdat_rename.test | 2 +- test/profile/Linux/extern_template.test | 4 ++-- test/profile/Linux/instrprof-comdat.test | 2 +- test/profile/Linux/instrprof-cs.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test/profile') diff --git a/test/profile/Linux/comdat_rename.test b/test/profile/Linux/comdat_rename.test index 116b5dc65..cd5c672de 100644 --- a/test/profile/Linux/comdat_rename.test +++ b/test/profile/Linux/comdat_rename.test @@ -1,6 +1,6 @@ // RUN: rm -fr %t.prof // RUN: %clangxx_pgogen=%t.prof/ -o %t.gen -O2 %S/../Inputs/comdat_rename_1.cc %S/../Inputs/comdat_rename_2.cc -// RUN: %t.gen +// RUN: %run %t.gen // RUN: llvm-profdata merge -o %t.profdata %t.prof/ // RUN: %clangxx_profuse=%t.profdata -O2 -emit-llvm -S %S/../Inputs/comdat_rename_1.cc -o - | FileCheck %S/../Inputs/comdat_rename_1.cc // RUN: %clangxx_profuse=%t.profdata -O2 -emit-llvm -S %S/../Inputs/comdat_rename_2.cc -o - | FileCheck %S/../Inputs/comdat_rename_2.cc diff --git a/test/profile/Linux/extern_template.test b/test/profile/Linux/extern_template.test index ada4d230e..3ce362783 100644 --- a/test/profile/Linux/extern_template.test +++ b/test/profile/Linux/extern_template.test @@ -1,12 +1,12 @@ // RUN: %clang -O2 -c -o %t.0.o %S/../Inputs/extern_template.cpp // RUN: %clang_profgen -O2 -c -o %t.o %S/../Inputs/extern_template.cpp // RUN: %clang_profgen -O2 -fcoverage-mapping %S/../Inputs/extern_template1.cpp %S/../Inputs/extern_template2.cpp %t.o -o %t -// RUN: env LLVM_PROFILE_FILE=%t.profraw %t +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t // RUN: llvm-profdata show --all-functions %t.profraw | FileCheck %s // RUN: llvm-profdata merge -o %t.profdata %t.profraw // RUN: llvm-cov show -instr-profile=%t.profdata %t | FileCheck %S/../Inputs/extern_template.h // RUN: %clang_profgen -O2 -fcoverage-mapping %S/../Inputs/extern_template1.cpp %S/../Inputs/extern_template2.cpp %t.0.o -o %t.0 -// RUN: env LLVM_PROFILE_FILE=%t.0.profraw %t.0 +// RUN: env LLVM_PROFILE_FILE=%t.0.profraw %run %t.0 // RUN: llvm-profdata show --all-functions %t.0.profraw | FileCheck %s // RUN: llvm-profdata merge -o %t.0.profdata %t.0.profraw // RUN: llvm-cov show -instr-profile=%t.0.profdata %t.0 | FileCheck %S/../Inputs/extern_template.h diff --git a/test/profile/Linux/instrprof-comdat.test b/test/profile/Linux/instrprof-comdat.test index b933e96b4..5a11a241a 100644 --- a/test/profile/Linux/instrprof-comdat.test +++ b/test/profile/Linux/instrprof-comdat.test @@ -1,6 +1,6 @@ RUN: mkdir -p %t.d RUN: %clangxx_profgen -o %t.d/comdat -fcoverage-mapping -fuse-ld=gold %S/../Inputs/instrprof-comdat-1.cpp %S/../Inputs/instrprof-comdat-2.cpp -RUN: LLVM_PROFILE_FILE=%t-comdat.profraw %t.d/comdat +RUN: LLVM_PROFILE_FILE=%t-comdat.profraw %run %t.d/comdat RUN: llvm-profdata merge -o %t.d/comdat.prof %t-comdat.profraw RUN: llvm-cov show --filename-equivalence --instr-profile=%t.d/comdat.prof %t.d/comdat | FileCheck --check-prefix=HEADER %S/../Inputs/instrprof-comdat.h diff --git a/test/profile/Linux/instrprof-cs.c b/test/profile/Linux/instrprof-cs.c index fdf29cb35..d825525a5 100644 --- a/test/profile/Linux/instrprof-cs.c +++ b/test/profile/Linux/instrprof-cs.c @@ -1,12 +1,12 @@ // RUN: rm -fr %t.prof // RUN: %clang_pgogen=%t.prof/ -o %t.gen.cs -O2 %s -// RUN: %t.gen.cs +// RUN: %run %t.gen.cs // RUN: llvm-profdata merge -o %t.cs.profdata %t.prof/ // Check context sensitive profile // RUN: %clang_profuse=%t.cs.profdata -O2 -emit-llvm -S %s -o - | FileCheck %s --check-prefix=CS // // RUN: %clang_profgen=%t.profraw -o %t.gen.cis -O2 %s -// RUN: %t.gen.cis +// RUN: %run %t.gen.cis // RUN: llvm-profdata merge -o %t.cis.profdata %t.profraw // Check context insenstive profile // RUN: %clang_profuse=%t.cis.profdata -O2 -emit-llvm -S %s -o - | FileCheck %s --check-prefix=CIS -- cgit v1.2.3