URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [README.QMTEST] - Rev 826
Compare with Previous | Blame | View Log
Testing with QMTest===================You can use QMTest to test G++. (In the future, it may be possible totest other parts of GCC with QMTest as well, but it is not possibleyet.)The use of QMTest to run the G++ tests has not been approved as anofficially supported testing procedure. Therefore, you must run thetests using DejaGNU (with "make check-g++") before committing changesthat affect G++.QMTest emulates DejaGNU behavior very closely when running the tests.QMTest has two output modes: a DejaGNU emulation mode and a nativeQMTest mode.In the DejaGNU mode, you should receive output that is almost exactlythe same as the DejaGNU output; in particular, you should see the samenumber of passes, failures, etc. When using the DejaGNU-style output,QMTest uses the "xfail" indications in the test cases to determinewhich tests are expected to pass and which are expected to fail, andpresents that information in the same way as DejaGNU.In the QMTest mode, the number of passes and failures will bedifferent from that obtained when using DejaGNU. The reason is that asingle source file may contain multiple DejaGNU tests. In DejaGNU,each line where a diagnostic is expected is considered a separatetest. Testing for successful compilation and testing for successfulexecution of the generated program are considered separate tests. So,a single source file "test.C" could contain, say, seven tests; some ofwhich might pass and some of which might fail.In the QMTest mode, each source file is considered a single test. Ifany of the seven sub-tests fail, the entire test is considered tofail. However, QMTest does present information about *why* the testfailed, so the same information is effectively available.In the QMTest mode, whether or not a test is expected to fail isdetermined not by an indication in the test, but rather by comparingthe new results to the results of a previous run. Testing for whethera change caused a regression is very simple: run the tests beforemaking the change, run them again after making the change, and letQMTest compare the results.The mode chosen only affects the output from QMTest, not how it runsthe tests or how it stores the data. Therefore, if you choose to runin the QMTest mode and later want to get the DejaGNU style output, orvice versa, you can do that as described below.Setting Up==========You must download and install the following software:- Python 2.2 (or greater)See http://www.python.org.You may already have Python on your system; in particular, manyGNU/Linux systems ship with Python installed.Installation instructions are available on the web-site.- A current version of QMTest. No released version provides all ofthe functionality required, so you must obtain QMTest from CVS.To do that, follow the instructions at:http://www.codesourcery.com/qmtestInstallation instructions are available in the file called READMEafter you check out QMTest.- The "qmtc" and "qmtest_gcc" QMTest support packages. These areavailable from the same CVS repository as QMTest. For example, tocheck out "qmtc", do:cvs -d :pserver:anoncvs@cvs.codesourcery.com:/home/qm/Repository \co qmtcYou do not have to install these packages; you need only check themout.Running the Tests=================First, you must set QMTEST_CLASS_PATH so that it can find the qmtc andqmtest_gcc support packages:export QMTEST_CLASS_PATH=/path/to/qmtc:/path/to/qmtest_gccThe, run "make qmtest-g++" in the gcc directory of your build tree.Here are some more advanced usage instructions:1. To run a particular set of tests (rather than all of the tests),use the make variable "QMTEST_GPP_TESTS". For example,make QMTEST_GPP_TESTS="g++.dg" qmtest-g++will run only the tests in the g++.dg subdirectory, and:make QMTEST_GPP_TESTS="g++.dg/special/conpr-1.C \g++.old-deja/g++.other/access2.C"qmtest-g++will run only the two tests indicated.2. To run qmtest with particular flags, use the make variables"QMTESTFLAGS" and "QMTESTRUNFLAGS". For example:make QMTESTFLAGS="-v" QMTESTRUNFLAGS="-f full" qmtest-g++will run qmtest like this:qmtest -v run -f full ...(The "-f full" mode will provide detailed information about eachtest as it runs.)3. To run the compiler with particular flags, use QMTESTRUNFLAGS toset the QMTest context variable "CompilerTable.cplusplus_options",like this:make \QMTESTRUNFLAGS='-c CompilerTable.cplusplus_options="-funroll-loops"' \qmtest-g++The compiler will then use the "-funroll-loops" switch whencompiling.4. If qmtest is not in your path, you can indicate the full path toQMTest by using the make variable "QMTEST_PATH", like this:make QMTEST_PATH=/path/to/qmtest qmtest-g++5. To start the QMTest GUI, use:make qmtest-gui(Note that this will run the program called "mozilla" in your path.If you want to use another browser, you must configure qmtest asdescribed in its manual.)Bear in mind that the QMTest GUI is insecure; malicious users withaccess to your machine may be able to run commands as if they wereyou. The QMTest GUI only binds to the loopback IP addresss, whichprovides a measure of security, but not enough for use in untrustedenvironments.6. If you have a multiprocessor, you can run the tests in parallel bypassing the "-j" option to qmtest:make QMTESTRUNFLAGS="-j 4" qmtest-g++will run tests in four threads. (It is also possible to run testsacross multiple machines; for more information see the QMTestmanual.)7. If a test (say "g++.dg/abi/bitfield1.C") fails, and you want to getmore detailed information, you can do:cd qmtestsuiteqmtest summarize g++.qmr g++.dg/abi/bitfield1.Cto get more information about the commands that were run and theoutput produced.Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.Copying and distribution of this file, with or without modification,are permitted in any medium without royalty provided the copyrightnotice and this notice are preserved.
