summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)AuthorFilesLines
2020-11-27Fix zero as null pointer constant warningsPovilas Kanapickas1-1/+1
2013-02-01fix 'make check' failure in a headless environmentStephen M. Webb2-1/+7
The example tests suite failed to build in a headless environment because that test suite relied on a default x.org installation. This patch does not assume the build system has such a server and uses the dummy driver explicitly. Signed-off-by: Stephen M. Webb <stephen.webb@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-14examples: Document two variables to silence doxygenPeter Hutterer2-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-12-05Fix CFLAGS to find correct header filesKeith Packard1-5/+5
Need to actually use X11_CFLAGS and EVEMU_CFLAGS in CPPFLAGS, CXXFLAGS (and presumably CFLAGS if that were relevant). Also must search local directories before system directories for our header files, otherwise installed versions will override local versions which would be bad. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-07examples: add test examples for manual XServer controlPeter Hutterer2-1/+111
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-07examples: rename xorg-gtest-example to indicate it's an Environment examplePeter Hutterer2-10/+92
This example relies on the Environment class, make that more obvious. And add more comments and test cases to show the usage. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-07xserver: make second arg to SetOption() default to ""Peter Hutterer1-0/+0
Allows calls like server.SetOption("-noreset"); Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-07examples: use abs_top_srcdir to link to the config filePeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-10-17examples: fix compiler warningPeter Hutterer1-1/+1
../gtest/include/gtest/gtest.h:18470:136: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit ef25a6b6f3f387a119ab9261f37479fe415702d4)
2012-10-10Fix up build system to use the googletest import buildPeter Hutterer1-1/+3
Drop the CHECK_GTEST macro, we can assume it's there now. We still build the gtest bits as convenience libraries, leave the various flags in there. Add $includedir/xorg to pgkconfig CPPFLAGS, as we install gtest.h in includedir/xorg/gtest/gtest.h to avoid overwriting or conflicts with a system-installed gtest.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
2012-07-03Rename XSERVER_LIBS to X11_LIBSPeter Hutterer1-2/+2
XSERVER implies this has to do with the server, but these are the client libs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-07-03Add some comments to the whacky library buildingPeter Hutterer1-0/+3
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-07-03Fix up a couple of doxygen linksPeter Hutterer1-1/+1
Introduced in e1c010f23272e61c28c73aa603b477ba6fbae875 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-24Update source files to use new headersPeter Hutterer1-1/+1
introduced in e1c010f23272e61c28c73aa603b477ba6fbae875 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-05-18examples: built tests as noinst_PROGRAMSPeter Hutterer1-2/+2
check_PROGRAMS is only built on make check, so it's a good way of introducing build errors until later (as we discovered in the server). Always built the tests, running them is optional. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2012-03-16Build gtest as part of the projectChase Douglas1-5/+37
Google Test does not recommend using precompiled gtest libraries. See: http://code.google.com/p/googletest/wiki/FAQ#Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog This change modifies the build system so the examples build the gtest and xorg-gtest libraries and link against the locally built libraries instead of any other precompiled libraries on the system. It uses the same compiler flags to compile everything so the C++ One-Definition Rule is not broken. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-By: Christopher Halse Rogers <christopher.halse.rogers@canonical.com>
2012-03-16Move xorg-gtest.cpp to xorg-gtest-example.cppChase Douglas2-1/+1
This makes the source file match the built executable. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-By: Christopher Halse Rogers <christopher.halse.rogers@canonical.com>
2012-03-06Use BASE_CXXFLAGS from xorg macrosChase Douglas1-1/+1
The X.org macros package version 1.16.2 is the first to define BASE_CXXFLAGS; however, we don't need to require version 1.16.2. If it's available, then great. If not, $(BASE_CXXFLAGS) will be empty and nothing terrible will happen. Included in this commit is a fix for an error, now that we are using BASE_CXXFLAGS, for shadowing variables from parent contexts. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-03-01Relicense under the X.org preferred licenseChase Douglas1-11/+17
Copied from http://www.x.org/releases/X11R7.6/doc/xorg-docs/License.html Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
2012-02-26examples/test.cpp: fatal error: X11/Xlib.h: No such file or directoryGaetan Nadon1-4/+2
Need XSERVER_CFLAGS to locate Xlib.h Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2012-02-02Fix build system.Jussi Pakkanen1-2/+4
The project could not be built from scratch due to erroneous Autofoo setup. This commit makes it work. Signed-off-by: Jussi Pakkanen <jussi.pakkanen@canonical.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
2011-12-21Rename xorg_gtest_example to xorg-gtest-exampleChase Douglas1-1/+1
2011-12-16Merged in lp:~chasedouglas/xorg-gtest/fixes.Thomas Voß1-1/+5
2011-12-14Fix gtest cpp flagsChase Douglas1-1/+5
2011-12-14Remove license header from exampleChase Douglas1-21/+0
It clutters up the example and is unnecessary for such a small file.
2011-12-14Introduced examples. Added virtual d'tors to xorg::testing::Environment and ↵Thomas Voß2-0/+64
xorg::testing::Test.