1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
samba-mirror/testprogs/win32/spoolss
2010-10-01 22:30:22 +02:00
..
error.c testprogs: rename spoolss.exe to testspoolss.exe. 2010-05-10 11:50:25 +02:00
error.h testprogs: add win32 spoolss testsuite. 2010-01-08 01:03:34 +01:00
GNUmakefile testprogs/win32: make it possible to specify MINGW_CC 2010-05-19 13:59:45 +02:00
NMakefile testprogs/win32: explain how to use nmake with NMakefile 2010-05-19 13:56:54 +02:00
printlib_proto.h testprogs: add print_printer_dataw and dump_data to printlib. 2010-03-04 10:10:02 +01:00
printlib.c testprogs: use dump_data in dump_printer_data. 2010-03-04 10:10:02 +01:00
README.win32 testprogs: update README to reflect the util rename. 2010-05-10 11:50:28 +02:00
string.h testprogs: add win32 spoolss testsuite. 2010-01-08 01:03:34 +01:00
testspoolss.c testprogs: print architecture used in win32 spoolss testsuite. 2010-10-01 22:30:22 +02:00
testspoolss.h testprogs: rename spoolss.exe to testspoolss.exe. 2010-05-10 11:50:25 +02:00
testspoolss.sln testprogs: add vcproj and sln files for testspoolss.exe. 2010-05-10 11:50:28 +02:00
testspoolss.vcproj testprogs: add vcproj and sln files for testspoolss.exe. 2010-05-10 11:50:28 +02:00
torture_proto.h testprogs: add win32 spoolss testsuite. 2010-01-08 01:03:34 +01:00
torture.c testprogs: rename spoolss.exe to testspoolss.exe. 2010-05-10 11:50:25 +02:00
torture.h testprogs: add rather simple device mode tests to spoolss test. 2010-02-16 17:28:02 +01:00

This directory holds sources for a Win32 test utility to test the "spoolss"
(print spool subsystem) functions of either a Windows or a Samba server. The
sources are known to build with (free as in beer) Microsoft Visual C++ 2008
Express Edition's "nmake.exe" on Windows XP Professional.


How to build
------------

Use the Microsoft "nmake" command to build the *.exe. This command is in your
%path% if you start the "Visual Studio 2008 Command Prompt" from your Start
menu.

Currently the real build target is named "testspoolss.exe". Run

    nmake /f Makefile

to build the testspoolss.exe. After a successfull build you may want to clean up
temporary files:

    nmake /f Makefile cleantmp


How to use
----------

Running testspoolss.exe with no additional params displays a short usage info.

..............................................................................
usage: testspoolss.exe <name> [print] [samba3] [architecture=ARCHITECTURE]

        <name>           can be a server or printer name URI
        [print]          will print all data that has been retrieved
                         from the printserver
        [samba3]         will skip some tests samba servers are known
                         not to have implemented
        [architecture=X] allows to define a specific
                         architecture to test with. choose between:
                         "Windows NT x86" or "Windows x64"
..............................................................................

The utility may be most useful if you use the "print" parameter to output all
data received from the print server. You may re-direct the data into log files
for later evaluation like this:

   testspoolss.exe \\smbserver print samba3 1>smbserver.log 2>smbserver.err
   testspoolss.exe \\smbserver print        1>smbserver.log 2>smbserver.err
   testspoolss.exe \\winserver print        1>winserver.log 2>winserver.err

One interesting source of learning could be to compare the output for (maybe
"the same") printers/drivers as installed on a Windows and on a Samba print
server:

   testspoolss.exe \\winserver\printername print 1>winprinter.log 2>winprinter.err
   testspoolss.exe \\smbserver\printername print 1>smbprinter.log 2>smbprinter.err

and then compare the respective log files with a diff utility of your choice.
To install "the same" printer/driver on a Samba server as on a Windows server,
you can use the Samba "net" utility, which has the following syntax:

   net rpc printer MIGRATE PRINTERS printername \
       --server=winserver \
       --destination=smbserver \
       -UAdministrator%secretpassword