mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
1. Document how to run it on Windows from a Cygwin shell. 2. Ignore trailing spaces when analyzing test output. 3. Use the directory separator "/" since we're running under Cygwin. 4. No need for cat.exe, strings.exe, or tee.exe (these are supplied by Cygwin). 5. Microsoft Visual C/C++ needs /D_CRT_SECURE_NO_WARNINGS to avoid a warning about scanf. 6. The Microsoft Visual C/C++ linker no longer takes the options /debugtype:both or /debug:full. Replace with /debug. 7. Remove /pdb:none option (we want the PDB so that we can debug the result). 8. windows.h defines an UNALIGNED macro, so need to #undef it. 9. The long int type is 32 bits on 64-bit Windows, so we need size_t instead. 10. The values in the LPEXCEPTION_RECORD structure have type ULONG_PTR. 11. Test cases are expecting access violations to report abort=true, but on Windows they are caught by the exception handler, so report abort=true in this case. 12. mpsw3.h has gone, but we do need mpswin.h. Fix some of the test cases: 1. Avoid compiler warning about overflowed multiplication in argerr/153.c. 2. In conerr/2.c, conerr/8.c and conerr/13.c, malloc enough space so that the signature check doesn't cause an access violation. 3. In conerr/25.c, allocate an object whose size is aligned to the platform alignment, which is 16 bytes on w3i6mv. 4. In connerr/18.c, conerr/53.c and conerr/54.c, update the location and text of the expected assertions. Copied from Perforce Change: 191564 ServerID: perforce.ravenbrook.com
83 lines
2.5 KiB
Text
83 lines
2.5 KiB
Text
$Id$
|
|
|
|
This is the Memory Management QA test harness. To use it you need
|
|
perl 5 (or higher). Go "perl qa help" for help, "perl qa options"
|
|
to see what version of the harness you have (or look at the
|
|
file "test/version").
|
|
|
|
|
|
Testing on Unix
|
|
---------------
|
|
|
|
From the test directory::
|
|
|
|
PLATFORM=lii6ll # substitute your platform
|
|
VARIETY=cool # or hot
|
|
CODE=../code # code directory of the branch you are testing
|
|
make -B -C $CODE -f $PLATFORM.gmk VARIETY=$VARIETY $PLATFORM/$VARIETY/mps.o
|
|
alias qa="perl test/qa -i $CODE -l $CODE/$PLATFORM/$VARIETY/mps.o"
|
|
qa clib
|
|
qa run function/5.c
|
|
qa runset testsets/passing
|
|
|
|
Each test case is compiled in its turn to the file
|
|
``test/obj/$(uname -s)_$(uname -r)_$(uname -p)__unix/tmp_test``
|
|
so you can debug it with::
|
|
|
|
lldb test/obj/$(uname -s)_$(uname -r)_$(uname -p)__unix/tmp_test
|
|
|
|
Or ``gdb`` instead of ``lldb``. MMQA sets its own assertion handler,
|
|
so you'll probably want to set a breakpoint on mmqa_assert_handler.
|
|
|
|
|
|
Testing on OS X
|
|
---------------
|
|
|
|
From the test directory, build mpslib.a using the Xcode project::
|
|
|
|
xcodebuild -project ../code/mps.xcodeproj -target mps
|
|
|
|
(You can also use "make" from the project root.) Then::
|
|
|
|
perl test/qa -i ../code -l ../code/xc/Debug/libmps.a clib
|
|
perl test/qa -i ../code -l ../code/xc/Debug/libmps.a run function/232.c
|
|
|
|
etc. See "Testing on Unix" above.
|
|
|
|
|
|
Testing on Windows
|
|
------------------
|
|
|
|
In a Cygwin shell, from the test directory::
|
|
|
|
PLATFORM=w3i6mv # substitute your platform
|
|
VARIETY=cool # or hot
|
|
CODE=../code # code directory of the branch you are testing
|
|
pushd $CODE
|
|
nmake /f $PLATFORM.nmk VARIETY=$VARIETY $PLATFORM/$VARIETY/mps.obj
|
|
popd
|
|
export LANG=C # avoid locale warnings from Perl.
|
|
alias qa="perl test/qa -i $CODE -l $CODE/$PLATFORM/$VARIETY/mps.obj"
|
|
qa clib
|
|
qa run function/5.c
|
|
qa runset testsets/passing
|
|
|
|
The runset command can result in this error::
|
|
|
|
LINK : fatal error LNK1168: cannot open test/obj/nt_AMD64__pc/tmp_test.exe for writing
|
|
|
|
You may be able to avoid this by running "View Local Services" from
|
|
the Windows Control Panel, double-clicking the "Application
|
|
Experience" service, and switching "Startup type" to "Automatic". See
|
|
the documentation for LNK1168_.
|
|
|
|
.. _LNK1168: https://msdn.microsoft.com/en-us/library/hhbdtt6d.aspx
|
|
|
|
At present, the easiest way to debug a test case is to edit
|
|
test/test/script/platform and set::
|
|
|
|
$comwrap = "vsjitdebugger \"";
|
|
|
|
But see job004020_.
|
|
|
|
.. _job004020: https://www.ravenbrook.com/project/mps/issue/job004020/
|