summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2010-11-15more void cast removalPeter Hutterer120-767/+767
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-15tcm: move envmsg up into TET_LITE ifndefPeter Hutterer1-1/+4
fixes ../../../../src/tet3/tcm/tcmfuncs.c: In function ‘tet_tcminit’: ../../../../src/tet3/tcm/tcmfuncs.c:137: warning: unused variable ‘envmsg’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-15tet3: if TET_RESFILE is not in the env, guess it from the program name.Peter Hutterer1-1/+10
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-09-16[dist] Distribute files missing from the tarballAaron Plattner5-4/+18
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2010-06-30Fix out-of-tree builds.Peter Hutterer8-8/+8
Prefix relative paths in makefiles with $(srcdir). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-28Merge remote branch 'whot/master'Dan Nicholson1-1/+1
Conflicts: xts5/Makefile.am Moved the DISPLAY check to the top-level Makefile.am where check-local is now defined.
2010-06-25tcm: if TET_ROOT isn't set, assume "."Peter Hutterer1-1/+1
Optimistic, I know. Life's too short to be pessimistic. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-06-21tcc: Fix number of failed tests in summaryDan Nicholson1-1/+1
The numbers were swapped in the failed/total tests message. Not sure this is actually useful now that the report is generated, so it might get removed entirely. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-21Partial revert "tet: Print status of tests"Dan Nicholson2-34/+0
This partially reverts commit 830f253234c94636c197617466c4b2910a39e574. We want to keep the part where each individual test prints its status to stdout, but the part where the test case prints the composite status and the code to support it is unnecessary. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-06-21Revert "tcc: Check for scenarios with and without current directory prefix"Dan Nicholson1-7/+1
This reverts commit 9ae6abd455e9b52bbdf88bb5a03874dc1ad7e26a. The rationale for this commit was that automake would call the scenario with a "./" prefix. Since we're no longer using the automake test framework, we can drop this hack. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-05-27tet: Build TET API library as private shared moduleDan Nicholson4-10/+29
Making libapi shared saves quite a bit of space since it's linked into every test program. However, parts of the API are intended to be linked statically into the program, so libapi and libtcm have been split into static and shared (_s) portions. In order to satisy undefined extern variables with shared libraries, tet_pname and tet_thistest have been added to tcc and exported. Hopefully, more code can be moved into the shared _s portion with just small stubs linked statically into the tests. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2010-04-20tet: Add change notifications to comply with the annoying terms of the ↵Aaron Plattner298-104/+948
'Artistic' license. From the license: 3. You may otherwise modify your copy of this Package in any way, provided that you **insert a prominent notice in each changed file stating how and when you changed that file**, and provided that you do at least ONE of the following: [...] (emphasis mine) Most, but not all, of the files in src/tet3 do not have the X11 license at the top and so are covered by this clause. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-19tet: Fix the remaining warnings.Aaron Plattner20-43/+46
Add a TET_NORETURN attribute and tag various fatal functions with it. That fixes a few "int x; switch(...) { case C: x = blah; break; default: fatal() }" cases that result in uninitialized variable warnings. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-18tet: Fix "ambiguous else" warnings.Aaron Plattner9-18/+28
Example: maperr.c: In function ‘tet_maperrno’: /home/aaron/src/x/xtest/src/tet3/dtet2lib/maperr.c|61| warning: suggest explicit braces to avoid ambiguous ‘else’ Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-18tet: Fix "srcFile defined but not used" warnings.Aaron Plattner225-1043/+85
These global arrays are used by the error-reporting macros to define the source file. I guess it's because using __FILE__ everywhere generated tons of copies of the file path in .data on ancient compilers. Nowadays, they end up with only one copy in .rodata. To facilitate that, make the arguments to the error reporting functions const. Propagate constness to eliminate additional warnings. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-04-18tet: Fix "sccsid defined but not used" warnings.Aaron Plattner294-1204/+4
For example: addarg.c:18: error: ‘sccsid’ defined but not used These strings are seriously outdated, unused, and cause warnings. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-10tcc: Print bad errors to stderr, tooDan Nicholson1-1/+2
Having critical errors in the journal is nice, but it's also nice if we can show the to the user at the terminal so they don't wonder what the heck happened.
2009-10-10tet: Allow for executables outside of TET_ROOT by defaultDan Nicholson5-6/+36
tet is really built around the notion that all the source, programs, data and output will all live in a single tree. However, often times the test programs are built and/or installed in a separate location. This can be worked around with various environment variables or command line options, but it would be better to build this behavior in by default. This introduces TET_EXEC_ROOT, which specifies the base directory for tet test programs. The tests will be found in the test suite subdirectory of TET_EXEC_ROOT. E.g., $TET_EXEC_ROOT/xts. The default here is to have TET_ROOT=$datadir and TET_EXEC_ROOT=$libexecdir.
2009-10-10Use a default TET_ROOT when not in the environmentDan Nicholson2-3/+8
Requiring an environment variable to be set in order to get any behavior is an obnoxious trait. Instead, a sane default TET_ROOT is built into the programs that use it. Users such as "make check" that need more control can continue using the environment variable. The scripts are now substituted from make so that we get full variable resolution.
2009-10-07tcc: Print test suite and test case names in reportsDan Nicholson7-30/+62
tcc provides the test suite name (xts5) and test case name (e.g. /Xproto/pAllocColor) to the test program via the environment. The test program uses this information when outputting the results to stdout. TET_TSNAME is a new global variable containing the test suite name provided by tcc. This required a change to the config initialization to only check if the value was an absolute path when necessary. TET_TCNAME is a per-test-exec variable providing the test case name as listed in the scenario file.
2009-09-25tcc: Output results files in test case subdirectoriesDan Nicholson1-3/+6
When a lot of test cases are run, the results directory can become very cluttered. Instead, they'll be created in subdirectories matching the directory structure of the tests themselves.
2009-09-24tcc: Print a summary of the test resultsDan Nicholson3-1/+57
Make tcc track the number and status of tests run in the scenario and print a summary of results after processing all tests. The output mimics automake's test driver. The summary code makes use of snprintf. Anyone can feel free to make it more portable, but it seemed like a PITA to me.
2009-09-24tet: Pass the results file name through the environmentDan Nicholson2-68/+19
Instead of having the test program calculate the the results file and potentially getting out of sync with tcc, grab the name of the file from the TET_RESFILE environment variable.
2009-09-24tet: Fix tcc's notion of the results fileDan Nicholson1-2/+7
While the test program was fixed to output results in the results directory with the $test.log name, tcc still was trying to use the file tet_xres in the test directory. This fixes xresfilename to set the correct name.
2009-09-24tet: Print status of testsDan Nicholson2-0/+37
Report the status of the test cases and the composite exit code of the test programs to stdout. The tet_getstatusname function is added to convert exit codes to a string.
2009-09-16Nuke RCS IDsDan Nicholson1-2/+0
2009-09-16Merge commit 'whot/master' into masterDan Nicholson1-1/+1
I decided to keep the Xproto renaming I had, which restored the original names with the p prefix. Conflicts: xts5/scenarios/Xproto_scen xts5/tet_scen xts5/tset/Xproto/.gitignore xts5/tset/Xproto/AllocColorCells/AllocColorCells.m ...
2009-09-16tet: Actually generate the results files in the results directoryDan Nicholson2-8/+39
The results files (test logs) were being created in the build tree at the location of the test program. That's wrong. Now, tcc sets the environment variable TET_RESDIR, which the test program will use for initializing it's log.
2009-09-16tcc: Don't create locks unless told toDan Nicholson2-0/+5
In the typical situation, there is no reason to create the tet_lock files. Especially since tcc wants to put them in the source directory, which might not be writable.
2009-09-16tcc: Always create results directoryDan Nicholson1-2/+3
The results directory was only being created by tcc if it was not being supplied by -i.
2009-09-16tcc: Open journal file in append modeDan Nicholson1-2/+2
Running the testsuite from make results in multiple executions of tcc, so we need to append to it if we want one big log.
2009-09-11install tccTinderbox user1-1/+1
2009-09-10Renaming sync/ to XSyncPeter Hutterer4-11/+11
2009-07-23tcc: s/getline/getline_tcc/g in scen1.cPeter Hutterer1-20/+20
getline conflicts with stdio.h's getline on Fedora. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-24Define common macros in config.h instead of on command lineDan Nicholson6-6/+6
Now that we have all the sources pulling in config.h, we can setup the common macros during configure instead of passing them on the command line.
2009-06-24Avoid redefined VERSION macro when including config.hDan Nicholson1-3/+3
2009-06-24Add config.h headers to all C files and mc stubsDan Nicholson271-0/+1084
This should allow the autoconf defines to be used consistently.
2009-06-13tet: Create results file from test program nameDan Nicholson3-7/+35
When the results file is always named "tet_xres", we can't have multiple results files in the same directory. Instead, derive the results file from the test program name. It would be best if the scenario name was used, but I don't think that's available at the time the file is created.
2009-06-13tcc: Check for scenarios with and without current directory prefixDan Nicholson1-1/+7
When asked to use a scenario relative to the current directory (probably because automake prefixed the test name with "./"), check for the name as supplied and with the ./ prefix stripped.
2009-05-16tcc: Convert test results to exit codesDan Nicholson5-8/+81
In order to play nice with automake's concept of test exit codes, convert the scenario results to exit codes and let them accumulate appropriately.
2009-05-10Turn the main loop code into a library, libtcmmainDan Nicholson2-5/+6
Rather than compiling tcm.c and dtcm.c for every test program, just build libtcmmain.a once and link it in. The same goes for tcmchild.c and libtcmchild.a. This also allows for an automake time saver since we can move tcm into the LIBS definition and then the program is a single source file of the same name. Automake defaults to using this source file without needing to define _SOURCES.
2009-05-09tcc: Exit with a failure code if any of the tests failedDan Nicholson6-23/+40
tcc was always exiting successfully so long as all the processes it was governing were completing. However, we want it to fail if any of the processes (tests) fail. Changes have been made throughout the code to pass up results of tests to tcc. The tet_addresult function allows multiple integer return codes to be handled by prefering failing codes.
2009-05-09tcc: Don't require a journal or a results directoryDan Nicholson4-2/+30
When the user passes an empty string for the journal argument (-j) or the results directory argument (-i), don't create them. This allows tcc to be run in more of a single shot mode since the logging is still done in the tet_xres file. The fullpath() code has been modified to use the current directory when the argument is NULL since it is sometimes called with the results directory name.
2009-05-02tet: Build dcancel.cDan Nicholson1-3/+1
The xts5 programs use the functions in dcancel.
2009-05-02tet: Use libtool to combine the libraries where necessaryDan Nicholson6-14/+16
It turns out that what the original build was doing was building a bunch of little libapi.a archives and then adding all the members to a big libapi.a. Libtool handles this for us, so now the big master library is apilib/libapi.la.
2009-04-28Kill implicit declaration warnings for standard C APIDan Nicholson1-0/+1
2009-04-27Don't install tccDan Nicholson1-1/+1
At least for now, it will only be used within the xtest repo.
2009-04-26No need to declare installation directories for noinst_LIBRARIESDan Nicholson2-2/+0
2009-04-26Remove per-target CFLAGS where unnecessaryDan Nicholson8-14/+8
2009-03-21replace includes for config.h with tet3_config.hPeter Hutterer15-15/+16