Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
|
|
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>
|
|
Conflicts:
xts5/Makefile.am
Moved the DISPLAY check to the top-level Makefile.am where check-local
is now defined.
|
|
Optimistic, I know. Life's too short to be pessimistic.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
'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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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
...
|
|
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.
|
|
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.
|
|
The results directory was only being created by tcc if it was not being
supplied by -i.
|
|
Running the testsuite from make results in multiple executions of tcc, so
we need to append to it if we want one big log.
|
|
|
|
|
|
getline conflicts with stdio.h's getline on Fedora.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
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.
|
|
|
|
This should allow the autoconf defines to be used consistently.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
The xts5 programs use the functions in dcancel.
|
|
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.
|
|
|
|
At least for now, it will only be used within the xtest repo.
|
|
|
|
|
|
|