[compiler-rt] r282264 - Fix the following tests when running under cross-compilation:

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 10:40:40 PDT 2016


Author: mcrosier
Date: Fri Sep 23 12:40:40 2016
New Revision: 282264

URL: http://llvm.org/viewvc/llvm-project?rev=282264&view=rev
Log:
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.

Modified:
    compiler-rt/trunk/test/profile/Linux/comdat_rename.test
    compiler-rt/trunk/test/profile/Linux/extern_template.test
    compiler-rt/trunk/test/profile/Linux/instrprof-comdat.test
    compiler-rt/trunk/test/profile/Linux/instrprof-cs.c

Modified: compiler-rt/trunk/test/profile/Linux/comdat_rename.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/comdat_rename.test?rev=282264&r1=282263&r2=282264&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/comdat_rename.test (original)
+++ compiler-rt/trunk/test/profile/Linux/comdat_rename.test Fri Sep 23 12:40:40 2016
@@ -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

Modified: compiler-rt/trunk/test/profile/Linux/extern_template.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/extern_template.test?rev=282264&r1=282263&r2=282264&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/extern_template.test (original)
+++ compiler-rt/trunk/test/profile/Linux/extern_template.test Fri Sep 23 12:40:40 2016
@@ -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

Modified: compiler-rt/trunk/test/profile/Linux/instrprof-comdat.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/instrprof-comdat.test?rev=282264&r1=282263&r2=282264&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/instrprof-comdat.test (original)
+++ compiler-rt/trunk/test/profile/Linux/instrprof-comdat.test Fri Sep 23 12:40:40 2016
@@ -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
 

Modified: compiler-rt/trunk/test/profile/Linux/instrprof-cs.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/instrprof-cs.c?rev=282264&r1=282263&r2=282264&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/instrprof-cs.c (original)
+++ compiler-rt/trunk/test/profile/Linux/instrprof-cs.c Fri Sep 23 12:40:40 2016
@@ -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




More information about the llvm-commits mailing list