Commit Graph

64 Commits

Author SHA1 Message Date
Nuno Lopes
2bdc07b398 add support for running the test suite with valgrind. to run it just type 'make VG=1', as in clang
beware of the 42000 leaks reported by valgrind in the Constant.cpp + Type.cpp files. it needs fixing IMHO

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57245 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-07 14:48:14 +00:00
Duncan Sands
96f945267c Actually run Obj-C++ tests if llvm-gcc supports.
Before there were two problems: (1) configure
turned "obj-c++" into "obj" in the langs line;
(2) the dejagnu library called it objc++ not
obj-c++.
Now the problem is that some of these tests don't
pass!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-06 10:31:21 +00:00
Duncan Sands
c93346af8e Use correct compiler component names for objc
and objc++.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54474 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-07 17:59:54 +00:00
Duncan Sands
3921266559 Regression test for PR2443.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52826 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-27 14:22:20 +00:00
Duncan Sands
53ebe352ab Turn off llvm-gcc warnings when running "make check".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52595 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-21 20:22:58 +00:00
Matthijs Kooijman
c9e00434e3 Change llvm.exp so it no longer ignores some errors when executing dejagnu
tests. This breaks 80 tests in the tree.

The interesting part here is that this no longer ignores syntax errors
in RUN command lines. Some tests have not been working all the time because of
this.

The tricky part is that it now also views any stderr output as an error. This
can be suppressed in tcl 8.5, but let's not add this dependency. Instead, all
testcases should be changed to redirect stderr if they expect stderr output.
This holds in particular for lines like:
  ; RUN: not llvm-as < %s
where an error is expected (but I think I can solve this by modifying the not
script). Also, compilations resulting in warnings will now also fail (so
the warnings should be fixed, disabled or redirected...).

I'll continue with fixing the testcases that are broken now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52172 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-10 12:28:43 +00:00
Anton Korobeynikov
488fe315ea Fix tests due to llvm2cpp move to llc target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50191 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-23 22:41:53 +00:00
Tanya Lattner
6f729d601c Byebye llvm-upgrade!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48762 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-25 04:26:08 +00:00
Tanya Lattner
200d607b45 Fix error in testing for END. notation.
Patch by Julien Lerouge. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48342 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 22:02:51 +00:00
Chris Lattner
aadbda85a0 Fix PR2120 by changing the replacement order to change compile_cxx
before compile_c.  Patch by Joachim Durchholz!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48132 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10 06:45:35 +00:00
Gabor Greif
684ed3d987 While hunting for two hanging tests,
(on solaris10, which are:
  CodeGen/PowerPC/frounds.ll
  Transforms/InstCombine/2008-02-23-MulSub.ll)

I needed a tool to figure out which one is the guilty.

To this end I have added a verbosity
option to the test/Makefile.

It can be invoked thus:

gmake check TESTSUITE=CodeGen/PowerPC VERBOSE="-v -v"

(The number of "-v"s specifies the verbosity level.
 Instead of "-v" other aliases can be specified,
 please consult the dejagnu docs for info.)

At level >= 2 following line is logged for each
test, before running it:

ABOUT TO RUN: <test>.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47602 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 12:08:55 +00:00
Tanya Lattner
727842e9d7 Fix bug in regression tests that ignored stderr output in RUN lines. Updated tests and fixed broken run lines.
XFAILed 3 arm regressions (will file bugs)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44389 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28 04:57:00 +00:00
Tanya Lattner
a57506eea4 Implement the XTARGET feature for PR1778
This will mark a test as PASS for all targets specified. It will override whatever is in XFAIL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43788 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-06 22:32:17 +00:00
Gordon Henriksen
8ef426baa3 Adding ocaml language bindings for the vmcore and bitwriter libraries. These are
built atop the C language bindings, and user programs can link with them as 
such:

  # Bytecode
  ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
  # Native
  ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml

The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:

  $ cat example.ml
  (* example.ml *)
  
  open Llvm
  open Llvm_bitwriter
  
  let _ =
    let filename = Sys.argv.(1) in
    let m = create_module filename in
    
    let v = make_int_constant i32_type 42 false in
    let g = define_global "hello_world" v m in
    
    if not (write_bitcode_file m filename) then exit 1;
    
    dispose_module m;

  $ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
  File "example.ml", line 11, characters 6-7:
  Warning Y: unused variable g.
  $ ./example example.bc
  $ llvm-dis < example.bc
  ; ModuleID = '<stdin>'
  @hello_world = global i32 42            ; <i32*> [#uses=0]

The ocaml test cases provide effective tests for the C interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42093 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-18 12:49:39 +00:00
Duncan Sands
6c7ada4c58 The Ada f-e produces various auxiliary output files
that cannot be suppressed and cannot be redirected:
they are dumped in the current working directory.
When running the testsuite this means that these
files do not end up in the Output directory.  The
best solution I could find is to change directory
into Output before running tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40437 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-23 15:23:35 +00:00
Duncan Sands
7d841a4914 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37224 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-18 12:13:34 +00:00
Reid Spencer
4f6e9ab3d7 Dan is right, using "string first" would produce false positives. So,
devolve the check to a comparison against each component in the string.
Fortunately there isn't many of them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36376 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-23 21:21:53 +00:00
Reid Spencer
3dc662c5db Fix the comparison of language names to accept any characters by using
"string first" instead of "regexp match". This helps C++ tests get executed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36339 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-22 14:14:11 +00:00
Reid Spencer
12d81f3ff4 Replace llvm_gcc_supports_ada and llvm_gcc_supports_objc with just a single
llvm_gcc_supports function that takes the language as an argument. Base that
function on the new LLVMGCC_LANGS configured variable so that we don't have
to execute feature checks during the test run.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36322 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 21:45:51 +00:00
Reid Spencer
7022d1fb2d llvm-dg.exp is dead, remove it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36317 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 20:48:14 +00:00
Reid Spencer
40a4c61cb7 Add the llvm_supports_target function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 20:40:17 +00:00
Duncan Sands
4e9471d3d9 Test if the compiler supports Ada, and enable Ada tests if so. While I was
there, delete a temporary file the objc test forgot to delete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36312 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 20:20:47 +00:00
Reid Spencer
6cdf4a93a7 Always print the same "PR" information in the same location (just after
the test name) in all cases (PASS, XPASS, FAIL, XFAIL). This makes the
output consistent and more amenable to parsing by nightly test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 18:53:12 +00:00
Reid Spencer
1e55bf251c Put failure information on a separate line. Hopefully this unbreaks the
nightly tester which expects the FAIL: line to only have the test name on
it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-21 18:46:52 +00:00
Devang Patel
9fe9907ff9 Enable Objective-C tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36281 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-20 21:24:01 +00:00
Duncan Sands
3724df3132 Spelling fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 21:19:45 +00:00
Duncan Sands
25d50d6f6a Change ne into !=.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36135 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 15:37:00 +00:00
Reid Spencer
fb7653e3ee Two changes:
1. Don't bother truncating reading of the file. It doesn't save that much
   time and we should support putting RUN lines anywhere in the file. For
   example, someone might want to put the grep match before each function
   in the test file which would sprinkle the RUN: lines throughout the file.
2. Fix a bug with llvmgcc version match .. global var wasn't declared as such


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36085 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 20:43:36 +00:00
Reid Spencer
6b2e2be2e4 Some tests have really long RUN line sets. Read the first 4096 bytes instead
of 1024.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36083 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 20:31:42 +00:00
Reid Spencer
601e845d60 Allow lines that have \ and end in \ to be recognized as ending in \
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 18:38:42 +00:00
Reid Spencer
66959cecdb Two improvements:
1. Only read the first 1024 bytes of the file. The RUN: lines should all be
   within that amount of space.  This keeps I/O costs down when reading
   very large files.
2. Print PR numbers with a PR prefix so it is clear what they are.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36071 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 10:27:54 +00:00
Reid Spencer
b0feffae1d No, don't cancel all remaining tests, just the one that failed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36057 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 07:34:58 +00:00
Reid Spencer
0947df4606 Abandone the entire test case on the first error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36056 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 07:21:26 +00:00
Reid Spencer
12ca929ca0 Allow replacement of %% with %
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36044 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-15 04:57:03 +00:00
Reid Spencer
78fb2acea2 Changes to fix problems with "make check". Apparently you can redefine
functions and Tcl's just tickled with that. The fix is to give the "new"
test system a different interface function name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 22:51:29 +00:00
Reid Spencer
90016c7939 For PR1319:
More improvements:
1. Using ::errorInfo wasn't such a hot idea. Go back to just printing the
   offending line of code and the stderr output. This is sufficient and
   not entangled with Tcl goop.
2. Capture the problem report numbers and report them whether pass or fail.
   This helps quickly get some context when a test fails, if it has an
   associated PR number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 19:37:22 +00:00
Reid Spencer
9a03bdac51 1. Don't generate redundant copy of stderr
2. Only match \ at the *end* of a line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 18:51:19 +00:00
Reid Spencer
bcb8674f7e Print full errorInfo when a failure occurs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35999 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 17:36:20 +00:00
Reid Spencer
520b487984 Add the line number where the script failed to the error output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 16:41:39 +00:00
Reid Spencer
316abe4f22 Initial version of a re-write of llvm-runtest that doesn't write the
tests to a script file but executes each line individually and catches
errors on each line too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-14 09:39:28 +00:00
Reid Spencer
4e3e115e15 Make the shlibext and llvmlibsdir variables accessible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-12 02:49:30 +00:00
Reid Spencer
3d89bc5845 Make new variables available: compile_c, compile_cxx, link to handle tests
that want to use LLVM's notion of compiling and linking programs. This
includes all the -I -L and optimization switches that LLVM would using to
compile or link any of this files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 20:57:39 +00:00
Reid Spencer
0f5aed5648 Make the llvm-runtest function much more amenable by eliminating all the
global variables that needed to be passed in. This makes it possible to
add new global variables with only a couple changes (Makefile and llvm-dg.exp)
instead of touching every single dg.exp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 19:56:59 +00:00
Reid Spencer
0aac889d71 Update the way llvm2cpp tests are done:
1. Make sure bytecode/assembly inputs are always redirected stdin so that
   the module name is <stdin>. This helps not get false negatives when the
   diff is done.
2. Scan the test file to determine if llvm-upgrade needs to be run.
3. Avoid running testings that are XFAIL'd because they'll cause a failure
   when run for llvm2cpp.
4. Get some better error message output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35914 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 17:56:23 +00:00
Reid Spencer
ea60e204ab No, libLLVMbzip2 does not have a .a suffix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:23:32 +00:00
Reid Spencer
42505f5567 Fix gcc command line options after LLVMCore and LLVMbzip2 became archive
libraries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:19:28 +00:00
Reid Spencer
226368ff4e 1. No need to thwart this test with an environment variable. Turning it off
is the default and handled by the makefile system and runtest
2. Redirect stderr of llvm-as and llvm2cpp so that warning messages about
   instrinsics don't cause Tcl to report the run as failed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28576 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 23:07:17 +00:00
Reid Spencer
0490c0f124 Fix a bug with diffing the wrong files. Make output more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:09:38 +00:00
Reid Spencer
492196c89f Fix a problem where dejagnu won't accept the value of global tcl variable
"libdir" for some reason. Changing to llvmlibsdir instead fixes it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28526 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-28 07:22:42 +00:00
Reid Spencer
15d4059430 Provide an infrastructure for testing the llvm2cpp program (yet to be
committed). This infrastructure is only activated when RUNLLVM2CPP=1 is
specified on the make command line. Currently it is only supported in the
Feature test suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28525 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-28 04:21:40 +00:00