summaryrefslogtreecommitdiff
path: root/lib/common/Test.h
Commit message (Collapse)AuthorAge
* Fix Unix compilation using CMake.Chris Wilson2016-09-09
| | | | | | | | | | Add platform detection that's compatible with the old buildsystem and its m4 autoconfigury. Make Travis build and test using CMake as a separate target. Remove unused function BoxGetTemporaryDirectoryName() to fixes compile using CMake on Unix.
* Define TEST_EXECUTABLE to allow it to have different names on MSVC/CMake.Chris Wilson2015-12-12
|
* Add S3Store account creation.Chris Wilson2015-07-31
|
* Move load_config_file to Test.cpp to allow reuse.Chris Wilson2015-07-25
|
* Major test refactor to support test suites.Chris Wilson2015-07-01
| | | | | | | Refactor all common code from testbbackupd and testbackupstore to allow other test suites to contain multiple tests and execute selected tests more easily. Report all test results within a suite in a standard, easy to read summary.
* Add ability to run commands in context with TEST_CHECK_THROWS_AND_OR.Chris Wilson2015-04-15
| | | | | Allows the exception message to be captured before it goes out of scope.
* Add a TEST_LINE_OR macro to compare strings and execute a command if no equal.Chris Wilson2014-12-21
|
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Add some test helper _OR macros to execute commands when conditions fail.Chris Wilson2014-04-09
| | | | | | | | This is useful to return from a test if an assertion/check fails, instead of throwing an exception. Also add logging of the actual error code received (with name) to TEST_COMMAND_RETURNS_ERROR(_OR).
* Add a TEST_THAT_THROWONFAIL macro that throws an AssertFailed exception.Chris Wilson2014-02-11
| | | | Allows aborting tests from any depth of function calls.
* Give tests access to the list of tests requested by the user.Chris Wilson2014-02-11
|
* Log disabling of exception logging to help understand test output.Chris Wilson2012-01-22
| | | | | Allow std::ostringstream formatting in expected/actual output comparison.
* Allow stream formatting in "line" parameter of TEST_LINE macro.Chris Wilson2011-04-23
|
* Reformat TEST_CHECK_THROWS macro for readability.Chris Wilson2010-08-27
|
* Make TestGetFileSize take a std::string instead of a char * for C++ Chris Wilson2010-03-18
| | | | | style.
* Suppress exception warnings when they are expected during a test.Chris Wilson2009-07-05
|
* Allow std::ostringstream formatting on the "line" part of Chris Wilson2009-06-28
| | | | | | TEST_EQUAL_LINE, so that it can be used to report object IDs for example.
* Fix test failure due to operator precedence problem with recentlyChris Wilson2009-04-27
| | | | | checked in system exit code comparison.
* Show expected and actual return codes from shell commands in tests.Chris Wilson2009-04-26
|
* Fixes for gcc 4.4.Martin Ebourne2009-04-23
|
* Log unexpected test results using logging framework rather than printf.Chris Wilson2009-04-13
|
* Show reasons for waiting during bbackupd and backupstorepatch tests,Chris Wilson2009-04-09
| | | | | | | | | | | to help with interpreting test output. When running at Trace level, where extra output from bbackupd etc. is common, log a single line at the start of waiting, instead of progress dots, to help with interpreting output. Show number of seconds waited for on Windows as well as Unixes.
* gcc 4.3 and 4.4 compile fixes, thanks to Reinhard Tartler and the DebianChris Wilson2009-04-03
| | | | | | | | project. See also: http://patch-tracking.debian.net/package/boxbackup/0.11~rc2+r2072-1 http://lists.warhead.org.uk/pipermail/boxbackup/2009-April/005159.html
* Move TEST_EQUAL macro into lib/common/Test.h, rename to TEST_EQUAL_LINE, Chris Wilson2009-01-03
| | | | | provide TEST_EQUAL that only takes two arguments for simplicity.
* Make test failures more obvious, and log them through logging framework.Chris Wilson2008-08-11
|
* Separate LaunchServer and WaitForServerStartup.Chris Wilson2008-08-07
|
* Allow passing C strings into TEST_FAIL_WITH_MESSAGE, not just string constants.Chris Wilson2008-08-06
|
* Move test helper functions out-of-line to aid debugging by allowingChris Wilson2008-04-09
| | | | | breakpoints to be set on them.
* Pass test options to test daemons.Chris Wilson2007-12-16
|
* Log sleep time and resleeps in safe_sleep (only used in tests).Chris Wilson2007-12-15
|
* Slightly improve output from waiting methods.Chris Wilson2007-12-02
|
* Make sync_and_wait() do what it's supposed to, not just force a sync.Chris Wilson2007-11-04
|
* Move sync helper functions from test/bbackupd to Test.h to share withChris Wilson2007-11-04
| | | | | other tests, particularly test/backupstorefix.
* Compile fix, thanks to Matt Brown (refs #3)Chris Wilson2007-05-02
|
* Merge [1566] from chris/general:Chris Wilson2007-04-22
| | | | | | | | | Use Sleep() instead of nanosleep again on win32 (lost in merge [1562]). Fix reference to pCommandLine which no longer exists after [1562]. Fix signed/unsigned comparison warning. (refs #3)
* Display file and line where memory leak test failed. (refs #3)Chris Wilson2007-04-22
|
* Declare global std::string variables that hold extra arguments forChris Wilson2007-04-22
| | | | | | | | | | | | | executables run in tests, to be implemented in a follow-up patch. ConvertPaths, LaunchServer and RunCommand all take std::string references instead of char*. Move safe_sleep from test/common to lib/server/Test.h so that all tests can use it. (refs #3)
* Fix unix path to bbstored (refs #3)Chris Wilson2007-03-25
|
* Trivial code simplification. (refs #3, merges [1444])Chris Wilson2007-03-24
|
* Flush stdout when writing to it (refs #3)Chris Wilson2007-03-22
|
* Report file and line of memory leak test failures (refs #3, merges [714])Chris Wilson2007-03-10
|
* Moved SendCommands(), HUPServer(), KillServer() to lib/server/ServerCommands.h.Chris Wilson2007-03-10
| | | | | | | | | | | | | | | | | All of these use lib/server/WinNamedPipeStream on Win32, so they don't belong in lib/common. Made LaunchServer() work on Win32. Added constants for paths to executables, for use in tests, removing the need for #ifdefs and clumsy DIRECTORY_SEPARATORs in paths. Added terminate_bbackupd() and wait_for_operation() functions. Update unit tests to #include "ServerControl.h" if they need it. (refs #3)
* Record the file and line of first test failure (refs #3, merges [593])Chris Wilson2007-03-08
|
* Improve error message when server fails to start (refs #3)Chris Wilson2007-01-21
|
* Add missing include of <string> header (refs #3)Chris Wilson2006-12-29
|
* Separate ReadPidFile() out from LaunchServer() in test code (refs #9)Chris Wilson2006-11-26
|
* Fixed control reaching end of non-void functions (refs #3)Chris Wilson2006-11-13
|
* Wait longer for server to die in KillServer (takes about 5 seconds on Chris Wilson2006-10-18
| | | | | my box). (refs #3)
* Compile fix. (refs #3)Chris Wilson2006-10-15
|
* (refs #3)Chris Wilson2006-09-02
| | | | | | Added a RunCommand() function which converts UNIX paths to native before calling ::system() on Win32.