X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FTestingGuide.html;h=1f9c9157306c9a31b8be762d588eda69d2163743;hb=032dbee2a9d401ee05beb648465f21168e279bda;hp=fe5d836fe56143b76eaa37aecc91a94f2c633bd2;hpb=90d9e022850240e3b5a8f943ea8e7b85987673b3;p=oota-llvm.git diff --git a/docs/TestingGuide.html b/docs/TestingGuide.html index fe5d836fe56..1f9c9157306 100644 --- a/docs/TestingGuide.html +++ b/docs/TestingGuide.html @@ -4,7 +4,7 @@ LLVM Testing Infrastructure Guide - + @@ -299,15 +299,15 @@ clang/test directory.

you.

In order for the regression tests to work, each directory of tests must - have a dg.exp file. Lit looks for this file to determine how to - run the tests. This file is just a Tcl script and it can do anything you want, + have a lit.local.cfg file. Lit looks for this file to determine how + to run the tests. This file is just Python code and thus is very flexible, but we've standardized it for the LLVM regression tests. If you're adding a - directory of tests, just copy dg.exp from another directory to get - running. The standard dg.exp simply loads a Tcl library - (test/lib/llvm.exp) and calls the llvm_runtests function - defined in that library with a list of file names to run. The names are - obtained by using Tcl's glob command. Any directory that contains only - directories does not need the dg.exp file.

+ directory of tests, just copy lit.local.cfg from another directory to + get running. The standard lit.local.cfg simply specifies which files + to look in for tests. Any directory that contains only directories does not + need the lit.local.cfg file. Read the + Lit documentation for more + information.

The llvm-runtests function looks at each file that is passed to it and gathers any lines together that match "RUN:". These are the "RUN" lines @@ -473,7 +473,7 @@ negatives).

llc, then pipe the output of llc into FileCheck. This means that FileCheck will be verifying its standard input (the llc output) against the filename argument specified (the original .ll file specified by "%s"). To see how this works, -lets look at the rest of the .ll file (after the RUN line):

+let's look at the rest of the .ll file (after the RUN line):

@@ -626,6 +626,8 @@ define i8 @coerce_offset0(i32 %V, i32* %P) {
 
 
+ +

The CHECK: and CHECK-NOT: directives both take a pattern to match. For most uses of FileCheck, fixed string matching is perfectly sufficient. For some things, a more flexible form of matching is desired. To support this, FileCheck @@ -650,6 +652,8 @@ braces like you would in C. In the rare case that you want to match double braces explicitly from the input, you can use something ugly like {{[{][{]}} as your pattern.

+ +
@@ -659,6 +663,9 @@ braces explicitly from the input, you can use something ugly like
+ + +

It is often useful to match a pattern and then verify that it occurs again later in the file. For codegen tests, this can be useful to allow any register, but verify that that register is used consistently later. To do this, FileCheck @@ -690,6 +697,8 @@ that FileCheck is not actually line-oriented when it matches, this allows you to define two separate CHECK lines that match on the same line.

+ +
@@ -889,8 +898,6 @@ understand the Makefile based setup.

the Test Suite Makefile Guide.

- -