Documentation for p4convert-svn system test framework
Authored by Norman Morse, updated on 01/08/14
In this directory are a couple of ant files.
These provide a system test framework for the converter.
To use this system test, first create a subdirectory of this directory called "dumps"
and within it place all the subversion dump files which will be converted as part of a regression test.
It is important to choose good dump files, the ones which caused problems previously, so we have a good
regression. The best dump files come from customers, (and they are huge!)
so they are not checked into Perforce. This test should probably be run on warp where there are some good
customer dump files in /warp/conversion_tests/svn/
From "system_test/build.xml"
"ant prep_dumps" will create a testing subdirectory for each dump file in dumps
Each directory will contain a customized "build.xml" ant file which
was generated from the template "buildchild.xml" in this directory.
"ant test_dumps" Will check each subdirectory to see if it contains a "build.xml" and not
"status.properties" (a file generated by a completed test) and then run a conversion
and validation on the associated dump file.
The file: "system_test.log" is generated by ant
Within each generated child subdirectory. (Named after the dump file used)
"ant test_dump" Will run a conversion and validation in the child directory
"ant clean" Will clean all test artifacts and prepare the directory for another "ant test_dump"
When the test runs, the following files are generated:
audit.log, changeMap.txt, converter.log Are all generated by the conversion
test.log is a logfile which ant uses
validate is a directory generated by the validation phase.
validate/fail.log is a log file listing all the validation failures, the failure number is used to name the
files in the validate/perforce and validate/subversion directories.
validate/perforce/fileXXX and validate/subversion/fileXXX contain the two versions of a file which had a
validation failure. If you have a tool which recursively compares directories
(like Araxis merge "compare") you can view all the validation differences with the
command "compare validate/perforce validate/subversion"
status.properties is an Ant property file which sumarizes the results of the conversion and validation
phases into this "roll up" summary. These properties can be used to generate pretty output
from the system test (perhaps an html page? which I haven't implemented yet)
If you have any questions, bug reports, or enhancement requests, please let Norman know.