1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

75 Commits

Author SHA1 Message Date
Daniel Dunbar
e7c9b43aae lit: Allow clients to define predefined parameters.
llvm-svn: 109999
2010-08-02 00:39:38 +00:00
Daniel Dunbar
e9993379d7 lit: Add some example tests for previous commit.
llvm-svn: 109071
2010-07-22 00:40:19 +00:00
Daniel Dunbar
044ebec2b8 lit: Add support for 'REQUIRES: feature-one, feature-two, ...' in the
integrated-test formats (sh and tcl style). The particular features which get
recognized are up to the test suite itself to define.

llvm-svn: 109062
2010-07-21 23:39:57 +00:00
Daniel Dunbar
6a902f3029 lit: Replace /dev/null in scripts with temporary files on Windows.
llvm-svn: 105888
2010-06-12 16:00:10 +00:00
Daniel Dunbar
d9120853e1 lit: Add a forgotten default argument.
llvm-svn: 105858
2010-06-11 23:47:36 +00:00
Daniel Dunbar
d0e8649780 lit: When running Tcl style tests on Windows, substitute slashes to avoid Tcl
quoting problems. Not particularly ideal, but should work ok. Based on a patch by
Michael Spencer!

llvm-svn: 105855
2010-06-11 23:27:45 +00:00
Daniel Dunbar
1c27a3b79d lit: Add another place to look for bash.
llvm-svn: 104189
2010-05-19 23:56:09 +00:00
Daniel Dunbar
8578537b17 lit: Fix a sh lexing bug which caused annotate-token.m to fail when run with the
internal shell parser; we weren't lexing the quotes in a command like::

  clang -DFOO='hello'

correctly.

llvm-svn: 103652
2010-05-12 21:47:58 +00:00
Daniel Dunbar
8c1208781d lit: Fix OneCommandPerFileTest format when tests are specified directly.
llvm-svn: 103626
2010-05-12 17:56:44 +00:00
Daniel Dunbar
cab93afa90 lit: Add support for 'lit ... @foo', which reads a list of tests to run from
foo.

llvm-svn: 103625
2010-05-12 17:56:42 +00:00
Daniel Dunbar
772b9002e7 lit: Allow test_format to be None.
llvm-svn: 103091
2010-05-05 17:22:35 +00:00
Daniel Dunbar
4ddbf8ad2c lit: Add support to OneCommandPerFileTest format to take input directory from input path.
llvm-svn: 100846
2010-04-09 02:15:10 +00:00
Chris Lattner
a58082f349 add newlines at end of files.
llvm-svn: 100706
2010-04-07 22:54:55 +00:00
Daniel Dunbar
1a27d28404 Add a FIXME.
llvm-svn: 100034
2010-03-31 19:14:05 +00:00
Daniel Dunbar
9c71d03e49 lit: Make sure to close any files we open as part of redirection.
PR6753.

llvm-svn: 100032
2010-03-31 18:48:43 +00:00
Daniel Dunbar
6de90fba7e lit: Add LitTestCase and lit.load_test_suite, for adapting lit based suites for
use with Python's unittest.

llvm-svn: 99498
2010-03-25 07:10:01 +00:00
Jeffrey Yasskin
28c789b8a6 When we don't pass --vg-leak to lit, pass --leak-check=no to valgrind.
llvm-svn: 99112
2010-03-21 01:47:33 +00:00
Jeffrey Yasskin
4927fd0032 Add support for XFAILing valgrind runs with memory leak checking independently
of runs without leak checking.  We add -vg to the triple for non-checked runs,
or -vg_leak for checked runs.  Also use this to XFAIL the TableGen tests, since
tablegen leaks like a sieve.  This includes some valgrindArgs refactoring.

llvm-svn: 99103
2010-03-20 23:08:45 +00:00
Ben Holt
fa824e3279 Test commit (removed extra blank line)
llvm-svn: 98988
2010-03-19 21:12:29 +00:00
Torok Edwin
ec792738a5 Set numThreads to 1 by default when Python is older than 2.5.2.
Python 2.4 always hits this bug: http://bugs.python.org/issue1731717
when running check-lit on multi-core systems.
Setting numThreads to 1 makes it slower, but at least the results reported are
correct.

llvm-svn: 98969
2010-03-19 17:54:21 +00:00
Daniel Dunbar
d655f05fb9 lit: Tweak example tests config.
llvm-svn: 98859
2010-03-18 20:06:05 +00:00
Jeffrey Yasskin
6e1782932d Avoid a problem in libc_freeres() seen on a linux-i686 buildbot when running
under valgrind:

==19577== Invalid free() / delete / delete[]
==19577==    at 0x4C9C866: free (vg_replace_malloc.c:325)
==19577==    by 0x5121104: ??? (in /lib/libc-2.10.2.so)
==19577==    by 0x4C97412: _vgnU_freeres (vg_preloaded.c:62)
==19577==    by 0x5041486: __run_exit_handlers (exit.c:93)
==19577==    by 0x50414FE: exit (exit.c:100)
==19577==    by 0x5028B5C: (below main) (libc-start.c:254)
==19577==  Address 0xffffffff is not stack'd, malloc'd or (recently) free'd
==19577== 

Apparently this happens under certain versions of glibc, so valgrind provides
the --run-libc-freeres=no option to avoid calling freeres().  This may increase
the number of "still reachable" blocks valgrind reports, but we don't care
about those, while this error breaks the buildbots.

There are upstream bugs about this at
http://sourceware.org/bugzilla/show_bug.cgi?id=10610 and
http://bugs.kde.org/show_bug.cgi?id=167483, but they don't look likely to be
fixed.

llvm-svn: 98813
2010-03-18 07:00:12 +00:00
Jeffrey Yasskin
6973958dee Make lit pay attention to --vg for tcl tests too, which makes it work on LLVM's
non-unit tests.

llvm-svn: 98741
2010-03-17 17:04:56 +00:00
Jeffrey Yasskin
48cd56b96a Make lit pay attention to --vg for unittests too.
llvm-svn: 98449
2010-03-13 20:45:41 +00:00
John McCall
643489334d Revert r97726 and r97728 at ddunbar's request; we want to solve this
some other way when it comes to be necessary.

llvm-svn: 97972
2010-03-08 20:02:05 +00:00
Duncan Sands
d18aa07fde If LD_LIBRARY_PATH is set in the system environment, use it.
llvm-svn: 97796
2010-03-05 08:21:02 +00:00
John McCall
45e11bf9a8 Simplify the condition-checking logic and hopefully clear up a build failure
that somehow got through my testing.

llvm-svn: 97728
2010-03-04 11:48:42 +00:00
John McCall
f762d454a4 Teach lit to honor conditional directives. The syntax is:
IF(condition(value)):
If the value satisfies the condition, the line is processed by lit;  otherwise
it is skipped.  A test with no unignored directives is resolved as Unsupported.

The test suite is responsible for defining conditions;  conditions are unary
functions over strings.  I've defined two conditions in the LLVM test suite,
TARGET (with values like those in TARGETS_TO_BUILD) and BINDING (with values
like those in llvm_bindings).  So for example you can write:
  IF(BINDING(ocaml)): RUN: %blah %s -o -
and the RUN line will only execute if LLVM was configured with the ocaml
bindings.

llvm-svn: 97726
2010-03-04 09:36:50 +00:00
Daniel Dunbar
93911572ff Eliminate llvmgcc_version testing variable.
llvm-svn: 96908
2010-02-23 07:56:28 +00:00
Daniel Dunbar
cb977c7241 Kill unused llvmgccmajvers testing variable.
llvm-svn: 96906
2010-02-23 07:56:18 +00:00
Daniel Dunbar
0e4c6eb0d7 lit: Ignore dot files when scanning for tests (e.g., editor temprary files,
etc.)

llvm-svn: 95803
2010-02-10 21:00:55 +00:00
Daniel Dunbar
54d6a41882 Remove stray DOS newline.
llvm-svn: 95765
2010-02-10 04:10:10 +00:00
Jeffrey Yasskin
d0d363d1a9 Make lit's gtest support honor config.environment.
llvm-svn: 95398
2010-02-05 18:09:19 +00:00
Daniel Dunbar
ca283162fa lit: Separate test suite from test name with spaces, to make it easier to cut and paste.
llvm-svn: 94134
2010-01-22 02:04:28 +00:00
Daniel Dunbar
e7b673bbc4 lit: Add setuptools support.
llvm-svn: 92169
2009-12-26 22:58:39 +00:00
Daniel Dunbar
8dae6490fd lit: Sink code into a 'lit' package.
llvm-svn: 92168
2009-12-26 22:58:23 +00:00
Daniel Dunbar
8747fc993f lit: Improve error when gtest discovery fails.
llvm-svn: 91458
2009-12-15 22:00:37 +00:00
Daniel Dunbar
ea0c099b04 lit: Prevent crash-on-invalid (when run on directory which has no test suite).
llvm-svn: 90871
2009-12-08 19:49:30 +00:00
Daniel Dunbar
157d7f6596 lit: Fix exclude dirs functionality.
llvm-svn: 89210
2009-11-18 17:42:17 +00:00
Jeffrey Yasskin
0f846dbb3e Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

llvm-svn: 88984
2009-11-16 22:41:33 +00:00
Daniel Dunbar
20a9eda5a2 lit: Factor a new OneCommandPerFileTest out of SyntaxCheckTest.
- Used for running a single fixed command on a directory of files, with the
   option of deriving a temporary input file from the test source.

llvm-svn: 88844
2009-11-15 08:10:29 +00:00
Daniel Dunbar
b077010494 Remove duplicate implementation of excludes functionality, and support excluding
dirnames.

Also, add support for the 'unsupported' config property.

llvm-svn: 88838
2009-11-15 07:22:58 +00:00
Daniel Dunbar
a812eb66b3 lit: Add --repeat=N option, for running each test N times.
- Currently just useful for timing, although it could be extended as one (bad) way to deal with flaky tests.

llvm-svn: 88827
2009-11-15 01:02:09 +00:00
Daniel Dunbar
fbe1d52c6a lit: Add ExampleTests, for testing lit and demonstrating test suite features.
llvm-svn: 86654
2009-11-10 02:41:17 +00:00
Daniel Dunbar
da307a7868 lit: Fix bug in --show-suites which accidentally override the list of tests.
llvm-svn: 86653
2009-11-10 02:40:21 +00:00
Daniel Dunbar
d4dcd76f71 lit: Hardcode whence seek value, os.SEEK_END isn't always available.
llvm-svn: 86449
2009-11-08 09:07:33 +00:00
Daniel Dunbar
761032e17e lit: Warn when a test suite contains no tests.
llvm-svn: 86448
2009-11-08 09:07:26 +00:00
Daniel Dunbar
642e76ff50 lit: Drop require_and_and support.
llvm-svn: 86447
2009-11-08 09:07:13 +00:00
Daniel Dunbar
dedae84dd3 lit: Workaround a Win32/subprocess bug when appending.
llvm-svn: 86437
2009-11-08 03:43:06 +00:00
Daniel Dunbar
a8040023d7 lit: Preserve the PATHEXT variable when running subcommands, this is important on Win32
llvm-svn: 86436
2009-11-08 03:35:19 +00:00