Skip to content

Commit dfeabb7

Browse files
committed
Add explicit target triple and enable the tests only on Linux on x86_64.
Add a comment to the tests explaining the reason for this restriction.
1 parent b5361ef commit dfeabb7

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

clang/test/Driver/time.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@
55
// could be something different, just check that whatever is printed to stderr
66
// looks like timing information.
77

8-
// RUN: %clang -time -c -o /dev/null %s 2>&1 \
8+
// Ideally, this should be tested on various platforms, but that requires the
9+
// the full toolchain, including a linker to be present. The initial author of
10+
// the test only had access to Linux on x86 which is why this is only enabled
11+
// there. More platforms ought to be added if possible.
12+
13+
// REQUIRES: x86-registered-target
14+
// REQUIRES: x86_64-linux
15+
16+
// RUN: %clang --target=x86_64-pc-linux -time -c -o /dev/null %s 2>&1 \
917
// RUN: | FileCheck %s --check-prefix=COMPILE-ONLY
10-
// RUN: %clang -time -S -emit-llvm -o /dev/null %s 2>&1 \
18+
// RUN: %clang --target=x86_64-pc-linux -time -S -emit-llvm -o /dev/null %s 2>&1 \
1119
// RUN: | FileCheck %s --check-prefix=COMPILE-ONLY
12-
// RUN: %clang -time -S -o /dev/null %s 2>&1 \
20+
// RUN: %clang --target=x86_64-pc-linux -time -S -o /dev/null %s 2>&1 \
1321
// RUN: | FileCheck %s --check-prefix=COMPILE-ONLY
14-
// RUN: %clang -time -o /dev/null %s 2>&1 \
22+
// RUN: %clang --target=x86_64-pc-linux -time -o /dev/null %s 2>&1 \
1523
// RUN: | FileCheck %s --check-prefix=COMPILE-AND-LINK
1624

1725
// COMPILE-ONLY: # {{.+}} {{[0-9]+(.[0-9]+)?}} {{[0-9]+(.[0-9]+)?}}

flang/test/Driver/time.f90

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@
1111
! potentially be something different, just check that whatever is printed to
1212
! stderr looks like timing information.
1313

14-
! RUN: %flang -time -c -o /dev/null %s 2>&1 \
14+
! Ideally, this should be tested on various platforms, but that requires the
15+
! the full toolchain, including a linker to be present. The initial author of
16+
! the test only had access to Linux on x86 which is why this is only enabled
17+
! there. More platforms ought to be added if possible.
18+
19+
! REQUIRES: x86_64-linux
20+
21+
! RUN: %flang --target=x86_64-linux -time -c -o /dev/null %s 2>&1 \
1522
! RUN: | FileCheck %s --check-prefix=COMPILE-ONLY
16-
! RUN: %flang -time -S -emit-llvm -O3 -o /dev/null %s 2>&1 \
23+
! RUN: %flang --target=x86_64-linux -time -S -emit-llvm -O3 -o /dev/null %s 2>&1 \
1724
! RUN: | FileCheck %s --check-prefix=COMPILE-ONLY
18-
! RUN: %flang -time -S -o /dev/null %s 2>&1 \
25+
! RUN: %flang --target=x86_64-linux -time -S -o /dev/null %s 2>&1 \
1926
! RUN: | FileCheck %s --check-prefix=COMPILE-ONLY
20-
! RUN: %flang -time -o /dev/null %s 2>&1 \
27+
! RUN: %flang --target=x86_64-linux -time -o /dev/null %s 2>&1 \
2128
! RUN: | FileCheck %s --check-prefix=COMPILE-AND-LINK
2229

2330
! COMPILE-ONLY: # {{.+}} {{[0-9]+(.[0-9]+)?}} {{[0-9]+(.[0-9]+)?}}

0 commit comments

Comments
 (0)