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

39 Commits

Author SHA1 Message Date
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
Douglas Gregor
1dc69ca319 Teach lit's SyntaxCheckTest two new tricks:
- skip .svn directories
  - add a set of excluded filenames so we can easily skip tests

llvm-svn: 86185
2009-11-05 22:58:04 +00:00
Daniel Dunbar
47718a1f47 lit: Add --param NAME=VALUE option, for test suite specific use (to communicate
arbitrary command line arguments to the test suite).

llvm-svn: 86137
2009-11-05 16:27:33 +00:00
Daniel Dunbar
3d3f9b9c83 lit: Update Clang's test style to use XFAIL: and XTARGET: lines that match
LLVM's tests.

llvm-svn: 85882
2009-11-03 07:26:38 +00:00
Daniel Dunbar
499815e9f9 lit: Add --config-prefix option, to override default config file names.
llvm-svn: 85035
2009-10-25 03:30:55 +00:00
Daniel Dunbar
69b298e1c2 lit: Allow use of /dev/null in redirects on Windows (replace by a temporary
file).

llvm-svn: 85028
2009-10-25 01:37:26 +00:00
Dan Gohman
3c62b33053 Delete a spurious semicolon.
llvm-svn: 85018
2009-10-24 23:24:45 +00:00
Daniel Dunbar
e66bb298d4 lit: Support '>>' redirections when executing scripts internally.
llvm-svn: 85014
2009-10-24 20:32:49 +00:00
Daniel Dunbar
bb58da6d55 lit: When running Tcl scripts via shell, try harder to find 'bash', but fall
back to running them internally if that fails. PR5240.

llvm-svn: 84462
2009-10-19 03:54:21 +00:00
Jeffrey Yasskin
160f3b9191 Support GoogleTest's "typed tests"
(http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Typed_Tests)
in lit.py.  These tests have names like "ValueMapTest/0.Iteration", which broke
when lit.py os.path.join()ed them onto the path and then assumed it could
os.path.split() them back off.  This patch shifts path components from the
testPath to the testName until the testPath exists.

llvm-svn: 84387
2009-10-18 02:05:42 +00:00
Daniel Dunbar
92fcc49c24 Don't traverse into .svn directories.
llvm-svn: 82978
2009-09-28 07:32:45 +00:00
Daniel Dunbar
b8a623820a lit: When executing shell scripts internally, don't allow piped stderr on any
commands except the last one, instead redirect the stderr to a temporary
file. This sidesteps a potential deadlocking issue.

llvm-svn: 82538
2009-09-22 09:50:38 +00:00
Daniel Dunbar
06695b3ea1 Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing.
Also, tweak the 'lit' test runner to set this variable unconditionally.

llvm-svn: 82537
2009-09-22 09:50:28 +00:00
Daniel Dunbar
3ea67f7fdc Actually use the arguments with the resolved executable path.
llvm-svn: 82527
2009-09-22 06:09:13 +00:00
Daniel Dunbar
797bf7ca92 lit: Don't use close_fds=True on Windows.
llvm-svn: 82521
2009-09-22 04:44:37 +00:00
Daniel Dunbar
79874e8a8e lit: When executing commands internally, perform PATH resolution ourselves.
llvm-svn: 82520
2009-09-22 04:44:26 +00:00
Daniel Dunbar
dadd71259e lit: Add a custom test format for use in clang.
llvm-svn: 81987
2009-09-16 01:34:52 +00:00
Daniel Dunbar
3d79f78d69 lit: When finding nested test suites, check first in the execpath in case there
is a site configuration.

llvm-svn: 81902
2009-09-15 20:09:17 +00:00
Daniel Dunbar
2808cdfdbe lit: Give test formats control over test discovery.
llvm-svn: 81751
2009-09-14 02:38:46 +00:00
Daniel Dunbar
e19b42b927 tests: Add a %abs_tmp substitution which is guaranteed to be a full path.
llvm-svn: 81662
2009-09-13 01:39:50 +00:00
Daniel Dunbar
a2c2d27cb7 Count test correctly with -q.
llvm-svn: 81313
2009-09-09 02:41:42 +00:00
Daniel Dunbar
338ea74b7e Fix another refactoro.
llvm-svn: 81312
2009-09-09 02:41:32 +00:00
Daniel Dunbar
ca1a6d222f lit needs bash for tcl-as-sh execution, we use set -o pipefail.
llvm-svn: 81197
2009-09-08 06:08:07 +00:00
Daniel Dunbar
57ad7988fd Fix typo that worked on python 2.6.
Also, fix unit tests.

llvm-svn: 81194
2009-09-08 05:46:28 +00:00
Daniel Dunbar
e82e000211 Fix a refactoro.
llvm-svn: 81192
2009-09-08 05:37:51 +00:00
Daniel Dunbar
640436d7af Add 'lit' testing tool.
- make install && man $(llvm-config --prefix)/share/man/man1/lit.1 for more
   information.

llvm-svn: 81190
2009-09-08 05:31:18 +00:00