[LOCALSPL_APITEST]
authorColin Finck <colin@reactos.org>
Mon, 8 Jun 2015 17:15:44 +0000 (17:15 +0000)
committerColin Finck <colin@reactos.org>
Mon, 8 Jun 2015 17:15:44 +0000 (17:15 +0000)
commitf2a66788f8fae03f0c7cdec943081ee4a2745bb7
tree3f77282123551c35209cc027526722108e563c36
parent19839c646cdfa1e96f43ea338df6313eefe696fc
[LOCALSPL_APITEST]
Write an API-Test for localspl.dll. As the original localspl.dll from Windows Server 2003 relies on proper initialization inside spoolsv.exe, we cannot test it standalone as usual.
To make testing possible anyway, this program basically does four things:

  - Injecting our testing code into spoolsv.exe.
  - Registering and running us as a service in the SYSTEM security context like spoolsv.exe, so that injection is possible at all.
  - Sending the test name and receiving the console output over named pipes.
  - Redirecting the received console output to stdout again, so it looks and feels like a standard API-Test.

Nevertheless, the testing code in fpEnumPrinters.c is still written like a usual test. The known ok(), skip(), etc. macros can be used as usual, their output is just redirected through the named pipes.
Thanks to Thomas for giving me the tip about injecting code into spoolsv! :)

svn path=/branches/colins-printing-for-freedom/; revision=68080
rostests/apitests/CMakeLists.txt
rostests/apitests/localspl/CMakeLists.txt [new file with mode: 0644]
rostests/apitests/localspl/dll/CMakeLists.txt [new file with mode: 0644]
rostests/apitests/localspl/dll/fpEnumPrinters.c [new file with mode: 0644]
rostests/apitests/localspl/dll/main.c [new file with mode: 0644]
rostests/apitests/localspl/localspl_apitest.h [new file with mode: 0644]
rostests/apitests/localspl/service.c [new file with mode: 0644]
rostests/apitests/localspl/testlist.c [new file with mode: 0644]
rostests/apitests/localspl/tests.c [new file with mode: 0644]