Warning, /office/calligra/devtools/cstester/README.txt is written in an unsupported language. File is not indexed.

0001 cstester
0002 --------
0003 
0004 Example:
0005 
0006 Prepare a list of test files (Using calligratests working copy and
0007 inspecting changes on DOCX files):
0008 
0009 $ find ~/kde4/src/calligratests/interoperability/kword/MSWord2007/ -name "*.docx" > files.txt
0010 
0011 Prepare reference screen-shots:
0012 
0013 $ while read line ; do echo "$line" > /tmp/processing.txt ; cstester --create --verbose --outdir dir1 "$line" ; done < files.txt
0014 
0015 Prepare verification screen-shots (after changes to the source code
0016 have been applied) and compare them against reference screen-shots:
0017 
0018 $ while read line ; do echo "$line" > /tmp/processing.txt ; ((cstester --verify --verbose --indir dir1 --outdir dir2 "$line") || echo "$line" >> failed.txt) ; done < files.txt
0019 
0020 Note: While scree-shots are being prepared, you can type the following
0021 command in another terminal to see which file is processed (useful if
0022 you run into an infinite loop):
0023 
0024 $ tail -f /tmp/processing.txt 2>/dev/null
0025 
0026 Note: Once verification is finished, the failed.txt file stores a list
0027 of test files with different screen-shots.
0028 
0029 Prepare a list of test files with different screen-shots in a format
0030 accepted by visualimagecompare and visually inspect changes:
0031 
0032 $ find dir1 -type f -exec md5sum {} \; | sed "s/ [^\/]*\// /" > dir1.txt
0033 $ find dir2 -type f -exec md5sum {} \; | sed "s/ [^\/]*\// /" > dir2.txt
0034 $ diff -u dir1.txt dir2.txt | grep "^+[0-9a-f]" | sed -e "s/[^ ]* //" -e "s/.check\/thumb_/ /" -e "s/\.png$//" | awk '{if (a==$1) {printf(" %d", $2)} else {printf("\n%s", $0)}; a=$1} END{printf("\n")}' > dirdiff.txt
0035 
0036 $ visualimagecompare dir1 dir2 dirdiff.txt
0037 
0038 
0039 cstester scripts
0040 ----------------
0041 
0042 It is of advantage to create a directory structure as in the next
0043 example to follow the explanation:
0044 
0045 tester/
0046 |-- checkdocs.sh
0047 |-- verifydocs.sh
0048 |-- documents/
0049 |   |-- document1.odt
0050 |   |-- ...
0051 |   |-- document10000.xls
0052 |-- results/
0053     |-- sha-of-commit1
0054     |-- sha-of-commit2
0055 
0056 
0057 To create the basis for tests and to inspect regressions in
0058 painting/loading (crashes), type the following commands:
0059 
0060 $ cd tester/documents
0061 $ mkdir ../results/sha-of-commit1
0062 $ ../checkdocs.sh ../results/sha-of-commit1
0063 $ cat tester/error-sha-of-commit1.log
0064 
0065 The error-sha-of-commit1.log file contains a list of test files, that
0066 either crashed or got killed by the script as they used too much CPU
0067 or RAM while being processed.
0068 
0069 Use the following commandsTo check for changes between different runs:
0070 
0071 $ cd tester/documents
0072 $ mkdir ../results/sha-of-commit2
0073 $ ../verifydocs.sh ../results/sha-of-commit1 ../results/sha-of-commit2
0074 $ cat tester/verify-sha-of-commit1-sha-of-commit2.log
0075 
0076 The log file contains a list of test files and pages therein, which
0077 changed.  The information can be used with the visualimagecompare
0078 tool.  Use the following format:
0079 
0080 $ visualimagecompare file-name page_x page_y
0081 
0082 
0083 cstrunner
0084 ---------
0085 
0086 Tool to run cstester in multiple processes.  Creates a report of files
0087 terminated by a signal, which happens as a result of a bug or when the
0088 allowed amount of time or CPU usage has been exceeded.  A file storing
0089 MD5 sums of generated thumbnails is created in each output directory.
0090 
0091 cstwrapper.sh - Limits the resources cstester is allowed to use and
0092 makes sure the correct exit code is returned to cstrunner.
0093 
0094 cstmd5gen.sh - Generates MD5 sums for a given thumbnail directory and
0095 stores them into the md5.txt file.
0096 
0097 cstmd5diff.sh - Prepares an input file for visualimagecomapre.
0098 
0099 Note: The $PATH variable must contain the location of scripts in order
0100 to run cstester successfully.
0101 
0102 Synopsis:
0103 
0104 cstrunner <documents dir> <result dir> <concurrentProcesses>
0105 
0106 cstmd5diff.sh <documents dir> <reference dir> <verification dir>
0107 
0108 Example:
0109 
0110 To run over all documents in the current directory and store
0111 thumbnails into ../result/sha1 with 4 concurrent processes:
0112 
0113 $ cstrunner . ../result/sha1 4
0114 
0115 Apply changes to the source code and run it again:
0116 
0117 $ cstrunner . ../result/sha2 4
0118 
0119 Create an input file for visualimagecompare and inspect differences:
0120 
0121 $ cstmd5diff.sh . ../results/sha1 ../results/sha2 > md5-sha1-sha2.log
0122 $ visualimagecompare ../results/sha1 ../results/sha2 md5-sha1-sha2.log --pdf directory_of_pdfs
0123 
0124 
0125 visualimagecompare
0126 ------------------
0127 
0128 Tool to visually inspect differences between reference and
0129 verification screen-shots.
0130 
0131 Synopsis:
0132 
0133 visualimagecompare <reference dir> <verification dir> <diff file>
0134 
0135 Controls:
0136 
0137 PageUp, n       Move to the next page of the current document
0138 PageDown, b     Move to the previous page of the current document
0139 Up              Move to the previous document
0140 Down            Move to the next document
0141 Left            Switch to the left tab
0142 Right           Switch to the right tab
0143 Space           Switch between tabs
0144 p               Show pdf (only works when --pdf is given)