forked from OSchip/llvm-project
[flang][test] Remove RUN COMMANDS/EXPECTED OUTPUT/INPUT markers from test/Driver
Uses of these markers are contrary to all other llvm-project subprojects and carry no information for people who know the basics of a lit test. I understand that there is an argument "this makes beginners get started quickly" but I am unsure whether this is strong enough to deviate from all other projects. https://llvm.org/docs/TestingGuide.html covers the basics. Actually, some contributors were confused by the markers. Differential Revision: https://reviews.llvm.org/D128763
This commit is contained in:
parent
348ea34bcd
commit
9d4a2baaa2
|
@ -2,9 +2,6 @@
|
|||
|
||||
! REQUIRES: aarch64-registered-target, x86-registered-target
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: rm -f %t.o
|
||||
! RUN: %flang_fc1 -emit-obj -triple aarch64-unknown-linux-gnu %s -o %t.o
|
||||
! RUN: llvm-objdump --triple aarch64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=CORRECT_TRIPLE
|
||||
|
@ -15,9 +12,6 @@
|
|||
! RUN: %flang -c --target=aarch64-unknown-linux-gnu %s -o %t.o
|
||||
! RUN: llvm-objdump --triple x86_64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=INCORRECT_TRIPLE
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! CORRECT_TRIPLE-LABEL: <_QQmain>:
|
||||
! CORRECT_TRIPLE-NEXT: ret
|
||||
|
||||
|
@ -25,7 +19,4 @@
|
|||
! INCORRECT_TRIPLE-LABEL: <_QQmain>:
|
||||
! INCORRECT_TRIPLE-NOT: ret
|
||||
|
||||
!------
|
||||
! INPUT
|
||||
!------
|
||||
end program
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
! REQUIRES: x86-registered-target, aarch64-registered-target
|
||||
! UNSUPPORTED: darwin, macos
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: rm -f %t.o
|
||||
! RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -emit-obj %s -o %t.o
|
||||
! RUN: llvm-objdump --triple x86_64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=CORRECT_TRIPLE
|
||||
|
@ -16,9 +13,6 @@
|
|||
! RUN: %flang -c --target=x86_64-unknown-linux-gnu %s -o %t.o
|
||||
! RUN: llvm-objdump --triple aarch64-unknown-linux-gnu --disassemble-all %t.o | FileCheck %s --check-prefix=INCORRECT_TRIPLE
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! CORRECT_TRIPLE-LABEL: <_QQmain>:
|
||||
! CORRECT_TRIPLE-NEXT: retq
|
||||
|
||||
|
@ -26,7 +20,4 @@
|
|||
! INCORRECT_TRIPLE-LABEL: <_QQmain>:
|
||||
! INCORRECT_TRIPLE-NOT: ret
|
||||
|
||||
!------
|
||||
! INPUT
|
||||
!------
|
||||
end program
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: %flang_fc1 -fdebug-dump-parse-tree %s 2>&1 | FileCheck %s --check-prefix=PARSE_TREE
|
||||
! RUN: %flang_fc1 -fdebug-dump-pft %s 2>&1 | FileCheck %s --check-prefix=PFT
|
||||
! RUN: bbc -pft-test %s 2>&1 | FileCheck %s --check-prefix=PFT
|
||||
|
||||
!-----------------
|
||||
! EXPECTEED OUTPUT
|
||||
!-----------------
|
||||
! PFT: 1 Subroutine test_routine: subroutine test_routine(a, b, n)
|
||||
! PFT-NEXT: 1 EndSubroutineStmt: end subroutine
|
||||
! PRF-NEXT: End Subroutine test_routine
|
||||
|
@ -25,8 +19,5 @@
|
|||
! PARSE_TREE-NEXT: | EndSubroutineStmt ->
|
||||
! PARSE_TREE-NO: Subroutine test_routine: subroutine test_routine(a, b, n)
|
||||
|
||||
!-------
|
||||
! INPUT
|
||||
!-------
|
||||
subroutine test_routine(a, b, n)
|
||||
end subroutine
|
||||
|
|
|
@ -2,20 +2,11 @@
|
|||
|
||||
! REQUIRES: aarch64-registered-target
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: %flang_fc1 -S -triple aarch64-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
! RUN: %flang -S -target aarch64-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! CHECK-LABEL: _QQmain:
|
||||
! CHECK-NEXT: .Lfunc_begin0:
|
||||
! CHECK: ret
|
||||
|
||||
!------
|
||||
! INPUT
|
||||
!------
|
||||
end program
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
|
||||
; REQUIRES: aarch64-registered-target
|
||||
|
||||
;-------------
|
||||
; RUN COMMANDS
|
||||
;-------------
|
||||
; RUN: rm -f %t.bc
|
||||
; RUN: %flang_fc1 -triple aarch64-unknown-linux-gnu -emit-llvm-bc %s -o %t.bc
|
||||
; RUN: %flang_fc1 -S -triple aarch64-unknown-linux-gnu -o - %t.bc | FileCheck %s
|
||||
|
@ -15,15 +12,9 @@
|
|||
; RUN: %flang -S -target aarch64-unknown-linux-gnu -o - %t.bc | FileCheck %s
|
||||
; RUN: rm -f %t.bc
|
||||
|
||||
;----------------
|
||||
; EXPECTED OUTPUT
|
||||
;----------------
|
||||
; CHECK-LABEL: foo:
|
||||
; CHECK: ret
|
||||
|
||||
;------
|
||||
; INPUT
|
||||
;------
|
||||
define void @foo() {
|
||||
ret void
|
||||
}
|
||||
|
|
|
@ -2,21 +2,12 @@
|
|||
|
||||
; REQUIRES: aarch64-registered-target
|
||||
|
||||
;-------------
|
||||
; RUN COMMANDS
|
||||
;-------------
|
||||
; RUN: %flang_fc1 -S -triple aarch64-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
; RUN: %flang -S -target aarch64-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
|
||||
;----------------
|
||||
; EXPECTED OUTPUT
|
||||
;----------------
|
||||
; CHECK-LABEL: foo:
|
||||
; CHECK: ret
|
||||
|
||||
;------
|
||||
; INPUT
|
||||
;------
|
||||
define void @foo() {
|
||||
ret void
|
||||
}
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
; Verify that the driver can consume MLIR/FIR files.
|
||||
|
||||
;-------------
|
||||
; RUN COMMANDS
|
||||
;-------------
|
||||
; RUN: %flang_fc1 -S %s -o - | FileCheck %s
|
||||
|
||||
;----------------
|
||||
; EXPECTED OUTPUT
|
||||
;----------------
|
||||
; CHECK-LABEL: foo:
|
||||
; CHECK: ret
|
||||
|
||||
;------
|
||||
; INPUT
|
||||
;------
|
||||
func.func @foo() {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -2,20 +2,11 @@
|
|||
|
||||
! REQUIRES: x86-registered-target
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: %flang_fc1 -S -triple x86_64-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
! RUN: %flang -S -target x86_64-unknown-linux-gnu %s -o - | FileCheck %s
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! CHECK-LABEL: _QQmain:
|
||||
! CHECK-NEXT: .Lfunc_begin0:
|
||||
! CHECK: ret
|
||||
|
||||
!------
|
||||
! INPUT
|
||||
!------
|
||||
end program
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
! Test the options for generating LLVM byte-code `-emit-llvm-bc` option
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: %flang -emit-llvm -c %s -o - | llvm-dis -o - | FileCheck %s
|
||||
! RUN: %flang_fc1 -emit-llvm-bc %s -o - | llvm-dis -o - | FileCheck %s
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! CHECK: define void @_QQmain()
|
||||
! CHECK-NEXT: ret void
|
||||
! CHECK-NEXT: }
|
||||
|
||||
!------
|
||||
! INPUT
|
||||
!------
|
||||
end program
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
! Test the `-emit-mlir` option
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: %flang_fc1 -emit-mlir %s -o - | FileCheck %s
|
||||
! RUN: %flang_fc1 -emit-fir %s -o - | FileCheck %s
|
||||
|
||||
|
@ -12,16 +9,10 @@
|
|||
! RUN: cp %s .
|
||||
! RUN: %flang_fc1 -emit-mlir emit-mlir.f90 && ls emit-mlir.mlir
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! CHECK: module attributes {
|
||||
! CHECK-LABEL: func @_QQmain() {
|
||||
! CHECK-NEXT: return
|
||||
! CHECK-NEXT: }
|
||||
! CHECK-NEXT: }
|
||||
|
||||
!------
|
||||
! INPUT
|
||||
!------
|
||||
end program
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
! invocation. These libraries are added on top of other standard runtime
|
||||
! libraries that the Clang driver will include.
|
||||
|
||||
!-------------
|
||||
! RUN COMMANDS
|
||||
!-------------
|
||||
! RUN: %flang -### -flang-experimental-exec -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,GNU
|
||||
! RUN: %flang -### -flang-experimental-exec -target aarch64-apple-darwin %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,DARWIN
|
||||
! RUN: %flang -### -flang-experimental-exec -target x86_64-windows-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,MINGW
|
||||
|
@ -15,9 +12,6 @@
|
|||
! Make sure they're not added.
|
||||
! RUN: %flang -### -flang-experimental-exec -target aarch64-windows-msvc %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,MSVC --implicit-check-not libcmt --implicit-check-not oldnames
|
||||
|
||||
!----------------
|
||||
! EXPECTED OUTPUT
|
||||
!----------------
|
||||
! Compiler invocation to generate the object file
|
||||
! CHECK-LABEL: {{.*}} "-emit-obj"
|
||||
! CHECK-SAME: "-o" "[[object_file:.*\.o]]" {{.*}}Inputs/hello.f90
|
||||
|
|
|
@ -2,20 +2,11 @@
|
|||
; module triple is missing.
|
||||
; NOTE: At the time of writing, the tested behaviour was consistent with Clang
|
||||
|
||||
;-------------
|
||||
; RUN COMMANDS
|
||||
;-------------
|
||||
; RUN: %flang_fc1 -S %s -o - 2>&1 | FileCheck %s
|
||||
; RUN: %flang -S %s -o - 2>&1 | FileCheck %s
|
||||
|
||||
;----------------
|
||||
; EXPECTED OUTPUT
|
||||
;----------------
|
||||
; CHECK: warning: overriding the module target triple with {{.*}}
|
||||
|
||||
;------
|
||||
; INPUT
|
||||
;------
|
||||
define void @foo() {
|
||||
ret void
|
||||
}
|
||||
|
|
|
@ -2,20 +2,11 @@
|
|||
; of a module triple.
|
||||
; NOTE: At the time of writing, the tested behaviour was consistent with Clang
|
||||
|
||||
;-------------
|
||||
; RUN COMMANDS
|
||||
;-------------
|
||||
; RUN: %flang_fc1 -S %s -o - 2>&1 | FileCheck %s
|
||||
; RUN: %flang -S %s -o - 2>&1 | FileCheck %s
|
||||
|
||||
;----------------
|
||||
; EXPECTED OUTPUT
|
||||
;----------------
|
||||
; CHECK: warning: overriding the module target triple with {{.*}}
|
||||
|
||||
;------
|
||||
; INPUT
|
||||
;------
|
||||
; For the triple to be overridden by the driver, it needs to be different to the host triple.
|
||||
; Use a random string to guarantee that.
|
||||
target triple = "invalid-triple"
|
||||
|
|
Loading…
Reference in New Issue