-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to run a subset of tests #60
Comments
I think this is a good idea and I would also recommend a similar enhancement to ippeveselfcert's ipp-tests.test and document-tests.test |
The problem with breaking them all up is that many tests depend on the results of prior tests - not something we can easily deal with using includes... :/ |
A few weeks ago, for my private usage and experimentation, I've broken up the big ipp-1.1.test into small units already. They all already work by themselves, individually, without falling over syntax errors. I've just not yet put all the complete dependencies in place yet, which Mike mentioned. Maybe I get round to it at the weekend. The thing is I first have to grok them all myself first. Which is not so easy if you do not deal with IPP Everywhere every day, everywhere... :-) Here is a list of the names I chose for them with their respective file sizes: kp@stretch:~> ls -l *.test
-rw-r--r-- 1 kp kp 793 Nov 9 14:33 00-define-uri-regex.test
-rw-r--r-- 1 kp kp 418 Nov 9 15:03 01-rfc-2911-section-3.1.1-bad-request-id-value-0.test
-rw-r--r-- 1 kp kp 350 Nov 9 15:03 02-rfc-2911-section-3.1.4-no-operation-attributes.test
-rw-r--r-- 1 kp kp 252 Nov 9 15:04 03-rfc-2911-section-3.1.4-attributes-charset.test
-rw-r--r-- 1 kp kp 275 Nov 9 15:05 04-rfc-2911-section-3.1.4-attributes-natural-language.test
-rw-r--r-- 1 kp kp 335 Nov 9 15:05 05-rfc-2911-section-3.1.4-attributes-natural-language-+-attributes-charset.test
-rw-r--r-- 1 kp kp 404 Nov 9 16:08 06-rfc-2911-section-3.1.4-attributes-charset-+-attributes-natural-language.test
-rw-r--r-- 1 kp kp 454 Nov 9 15:06 07-rfc-2911-section-3.1.8-unsupported-ipp-version-0.0.test
-rw-r--r-- 1 kp kp 408 Nov 9 15:07 08-rfc-2911-section-3.2-no-printer-uri-operation-attribute.test
-rw-r--r-- 1 kp kp 1333 Nov 9 16:08 09-rfc-2911-section-3.2.1-print-job-operation.test
-rw-r--r-- 1 kp kp 552 Nov 9 15:08 10-rfc-2911-section-3.2.3-validate-job-operation.test
-rw-r--r-- 1 kp kp 10584 Nov 9 16:09 11-rfc-2911-section-3.2.5-get-printer-attributes-operation-default.test
-rw-r--r-- 1 kp kp 714 Nov 9 16:09 12-rfc-2911-section-3.2.5-get-printer-attributes-operation-requested-attributes.test
-rw-r--r-- 1 kp kp 1593 Nov 9 16:09 13-rfc-2911-section-3.2.6-get-jobs-operation-default.test
-rw-r--r-- 1 kp kp 4073 Nov 9 16:09 14-rfc-2911-section-3.2.6-get-jobs-operation-requested-attributes.test
-rw-r--r-- 1 kp kp 1658 Nov 9 16:09 15-rfc-2911-section-3.2.6-get-jobs-operation-my-jobs.test
-rw-r--r-- 1 kp kp 1668 Nov 9 15:16 16-rfc-2911-section-3.2.6-get-jobs-operation-my-jobs-different-user.test
-rw-r--r-- 1 kp kp 1687 Nov 9 16:09 17-rfc-2911-section-3.2.6-get-jobs-operation-which-jobs-not-completed.test
-rw-r--r-- 1 kp kp 522 Nov 9 15:17 18-get-job-attributes-until-job-complete.test
-rw-r--r-- 1 kp kp 1639 Nov 9 16:09 19-rfc-2911-section-3.2.6-get-jobs-operation-which-jobs-completed.test
-rw-r--r-- 1 kp kp 4109 Nov 9 16:09 20-rfc-2911-section-3.2.6-get-jobs-operation-which-jobs-requested-attributes.test
-rw-r--r-- 1 kp kp 418 Nov 9 15:19 21-rfc-2911-section-3.3.3-cancel-job-operation-completed-job.test
-rw-r--r-- 1 kp kp 1265 Nov 9 16:09 22-rfc-2911-section-3.2.1-print-job-operation.test
-rw-r--r-- 1 kp kp 449 Nov 9 15:20 23-rfc-2911-section-3.3.3-cancel-job-operation-pending-processing-job.test
-rw-r--r-- 1 kp kp 4021 Nov 9 16:09 24-rfc-2911-section-3.3.4-get-job-attributes-operation.test
-rw-r--r-- 1 kp kp 1263 Nov 9 16:09 25-rfc-2911-section-3.2.2-print-uri-operation.test
-rw-r--r-- 1 kp kp 763 Nov 9 15:24 26-print-uri-with-bad-uri-print-uri-operation.test
-rw-r--r-- 1 kp kp 1114 Nov 9 16:09 27-rfc-2911-section-3.2.4-create-job-operation.test
-rw-r--r-- 1 kp kp 685 Nov 9 15:25 28-rfc-2911-section-3.3.1-send-document-operation.test
-rw-r--r-- 1 kp kp 1146 Nov 9 16:10 29-send-document-missing-last-document-create-job-operation.test
-rw-r--r-- 1 kp kp 591 Nov 9 15:28 30-send-document-missing-last-document-send-document-operation.test
-rw-r--r-- 1 kp kp 467 Nov 9 16:43 31-rfc-2911-section-3.3.3-cancel-job-operation.test
-rw-r--r-- 1 kp kp 1104 Nov 9 16:44 32-rfc-2911-section-3.2.4-create-job-operation.test
-rw-r--r-- 1 kp kp 628 Nov 9 16:45 33-rfc-2911-section-3.3.2-send-uri-operation.test
-rw-r--r-- 1 kp kp 1079 Nov 9 16:45 34-send-uri-with-bad-uri-create-job-operation.test
-rw-r--r-- 1 kp kp 675 Nov 9 15:44 35-send-uri-with-bad-uri-send-uri-operation-bad-uri.test
-rw-r--r-- 1 kp kp 461 Nov 9 15:44 36-send-uri-with-bad-uri-cancel-job-operation.test
-rw-r--r-- 1 kp kp 1291 Nov 9 16:10 37-print-job-with-copies.test
-rw-r--r-- 1 kp kp 1334 Nov 9 16:10 38-print-job-with-a4-pdf.test
-rw-r--r-- 1 kp kp 1375 Nov 9 16:10 39-print-job-with-a4-pdf-duplex.test
-rw-r--r-- 1 kp kp 1346 Nov 9 16:10 40-print-job-with-us-letter-pdf.test
-rw-r--r-- 1 kp kp 1439 Nov 9 16:10 41-print-job-with-us-letter-pdf-duplex.test
-rw-r--r-- 1 kp kp 1372 Nov 9 16:10 42-print-job-with-a4-postscript.test
-rw-r--r-- 1 kp kp 1427 Nov 9 16:10 43-print-job-with-a4-postscript-duplex.test
-rw-r--r-- 1 kp kp 1373 Nov 9 16:10 44-print-job-with-us-letter-postscript.test
-rw-r--r-- 1 kp kp 1443 Nov 9 16:10 45-print-job-with-us-letter-postscript-duplex.test
-rw-r--r-- 1 kp kp 1329 Nov 9 16:10 46-print-job-with-color-jpeg-on-a4.test
-rw-r--r-- 1 kp kp 1332 Nov 9 16:11 47-print-job-with-color-jpeg-on-us-letter.test
-rw-r--r-- 1 kp kp 1314 Nov 9 16:11 48-print-job-with-color-jpeg-on-4x6.test
-rw-r--r-- 1 kp kp 1316 Nov 9 16:11 49-print-job-with-grayscale-jpeg-on-a4.test
-rw-r--r-- 1 kp kp 1338 Nov 9 16:11 50-print-job-with-grayscale-jpeg-on-us-letter.test
-rw-r--r-- 1 kp kp 1320 Nov 9 16:11 51-print-job-with-grayscale-jpeg-on-4x6.test
-rw-r--r-- 1 kp kp 1459 Nov 9 16:11 52-print-job-with-a4-pdf-and-standard-sheet.test
-rw-r--r-- 1 kp kp 1453 Nov 9 16:11 53-print-job-with-us-letter-pdf-and-standard-sheet.test
-rw-r--r-- 1 kp kp 1443 Nov 9 16:11 54-print-job-with-a4-pdf-and-standard-sheet.test
-rw-r--r-- 1 kp kp 1465 Nov 9 16:11 55-print-job-with-us-letter-pdf-and-standard-sheet.test
-rw-r--r-- 1 kp kp 1412 Nov 9 16:11 56-print-job-with-a4-pdf-2-up.test
-rw-r--r-- 1 kp kp 1418 Nov 9 16:11 57-print-job-with-us-letter-pdf-2-up.test
-rw-r--r-- 1 kp kp 1400 Nov 9 16:11 58-print-job-with-a4-pdf-2-up.test
-rw-r--r-- 1 kp kp 1430 Nov 9 16:11 59-print-job-with-us-letter-pdf-2-up.test
-rw-r--r-- 1 kp kp 1442 Nov 9 16:11 60-print-job-with-jpeg-on-4x6-draft-quality.test
-rw-r--r-- 1 kp kp 1409 Nov 9 16:11 61-print-job-with-jpeg-on-4x6-normal-quality.test
-rw-r--r-- 1 kp kp 1403 Nov 9 16:11 62-print-job-with-jpeg-on-4x6-high-quality.test
-rw-r--r-- 1 kp kp 1408 Nov 9 16:11 63-print-job-with-a4-pdf-draft-quality.test
-rw-r--r-- 1 kp kp 1438 Nov 9 16:11 64-print-job-with-us-letter-pdf-draft-quality.test
-rw-r--r-- 1 kp kp 1288 Nov 9 16:11 65-print-job-with-job-hold-until.test
-rw-r--r-- 1 kp kp 364 Nov 9 15:30 66-release-job.test
-rw-r--r-- 1 kp kp 4356 Nov 9 16:12 get-jobs-operation-requested-attr.test
-rw-r--r-- 1 kp kp 7720 Nov 8 22:50 ipp-2.0.test
-rw-r--r-- 1 kp kp 4792 Nov 7 12:30 ipp-2.1.test
-rw-r--r-- 1 kp kp 4111 Nov 7 12:30 ipp-2.2.test
-rw-r--r-- 1 kp kp 17972 Nov 7 16:35 ipp-3d.test
-rw-r--r-- 1 kp kp 318194 Nov 7 16:35 ipp-everywhere.test
-rw-r--r-- 1 kp kp 4052 Nov 9 16:53 new-ipp-1.1.test And this is the content of my kp@stretch:> cat new-ipp-1.1.test
INCLUDE 00-define-uri-regex.test
INCLUDE 01-rfc-2911-section-3.1.1-bad-request-id-value-0.test
INCLUDE 02-rfc-2911-section-3.1.4-no-operation-attributes.test
INCLUDE 03-rfc-2911-section-3.1.4-attributes-charset.test
INCLUDE 04-rfc-2911-section-3.1.4-attributes-natural-language.test
INCLUDE 05-rfc-2911-section-3.1.4-attributes-natural-language-+-attributes-charset.test
INCLUDE 06-rfc-2911-section-3.1.4-attributes-charset-+-attributes-natural-language.test
INCLUDE 07-rfc-2911-section-3.1.8-unsupported-ipp-version-0.0.test
INCLUDE 08-rfc-2911-section-3.2-no-printer-uri-operation-attribute.test
INCLUDE 09-rfc-2911-section-3.2.1-print-job-operation.test
INCLUDE 10-rfc-2911-section-3.2.3-validate-job-operation.test
INCLUDE 11-rfc-2911-section-3.2.5-get-printer-attributes-operation-default.test
INCLUDE 12-rfc-2911-section-3.2.5-get-printer-attributes-operation-requested-attributes.test
INCLUDE 13-rfc-2911-section-3.2.6-get-jobs-operation-default.test
INCLUDE 14-rfc-2911-section-3.2.6-get-jobs-operation-requested-attributes.test
INCLUDE 15-rfc-2911-section-3.2.6-get-jobs-operation-my-jobs.test
INCLUDE 16-rfc-2911-section-3.2.6-get-jobs-operation-my-jobs-different-user.test
INCLUDE 17-rfc-2911-section-3.2.6-get-jobs-operation-which-jobs-not-completed.test
INCLUDE 18-get-job-attributes-until-job-complete.test
INCLUDE 19-rfc-2911-section-3.2.6-get-jobs-operation-which-jobs-completed.test
INCLUDE 20-rfc-2911-section-3.2.6-get-jobs-operation-which-jobs-requested-attributes.test
INCLUDE 21-rfc-2911-section-3.3.3-cancel-job-operation-completed-job.test
INCLUDE 22-rfc-2911-section-3.2.1-print-job-operation.test
INCLUDE 23-rfc-2911-section-3.3.3-cancel-job-operation-pending-processing-job.test
INCLUDE 24-rfc-2911-section-3.3.4-get-job-attributes-operation.test
INCLUDE 25-rfc-2911-section-3.2.2-print-uri-operation.test
INCLUDE 26-print-uri-with-bad-uri-print-uri-operation.test
INCLUDE 27-rfc-2911-section-3.2.4-create-job-operation.test
INCLUDE 28-rfc-2911-section-3.3.1-send-document-operation.test
INCLUDE 29-send-document-missing-last-document-create-job-operation.test
INCLUDE 30-send-document-missing-last-document-send-document-operation.test
INCLUDE 31-rfc-2911-section-3.3.3-cancel-job-operation.test
INCLUDE 32-rfc-2911-section-3.2.4-create-job-operation.test
INCLUDE 33-rfc-2911-section-3.3.2-send-uri-operation.test
INCLUDE 34-send-uri-with-bad-uri-create-job-operation.test
INCLUDE 35-send-uri-with-bad-uri-send-uri-operation-bad-uri.test
INCLUDE 36-send-uri-with-bad-uri-cancel-job-operation.test
INCLUDE 37-print-job-with-copies.test
INCLUDE 38-print-job-with-a4-pdf.test
INCLUDE 39-print-job-with-a4-pdf-duplex.test
INCLUDE 40-print-job-with-us-letter-pdf.test
INCLUDE 41-print-job-with-us-letter-pdf-duplex.test
INCLUDE 42-print-job-with-a4-postscript.test
INCLUDE 43-print-job-with-a4-postscript-duplex.test
INCLUDE 44-print-job-with-us-letter-postscript.test
INCLUDE 45-print-job-with-us-letter-postscript-duplex.test
INCLUDE 46-print-job-with-color-jpeg-on-a4.test
INCLUDE 47-print-job-with-color-jpeg-on-us-letter.test
INCLUDE 48-print-job-with-color-jpeg-on-4x6.test
INCLUDE 49-print-job-with-grayscale-jpeg-on-a4.test
INCLUDE 50-print-job-with-grayscale-jpeg-on-us-letter.test
INCLUDE 51-print-job-with-grayscale-jpeg-on-4x6.test
INCLUDE 52-print-job-with-a4-pdf-and-standard-sheet.test
INCLUDE 53-print-job-with-us-letter-pdf-and-standard-sheet.test
INCLUDE 54-print-job-with-a4-pdf-and-standard-sheet.test
INCLUDE 55-print-job-with-us-letter-pdf-and-standard-sheet.test
INCLUDE 56-print-job-with-a4-pdf-2-up.test
INCLUDE 57-print-job-with-us-letter-pdf-2-up.test
INCLUDE 58-print-job-with-a4-pdf-2-up.test
INCLUDE 59-print-job-with-us-letter-pdf-2-up.test
INCLUDE 60-print-job-with-jpeg-on-4x6-draft-quality.test
INCLUDE 61-print-job-with-jpeg-on-4x6-normal-quality.test
INCLUDE 62-print-job-with-jpeg-on-4x6-high-quality.test
INCLUDE 63-print-job-with-a4-pdf-draft-quality.test
INCLUDE 64-print-job-with-us-letter-pdf-draft-quality.test
INCLUDE 65-print-job-with-job-hold-until.test
INCLUDE 66-release-job.test As far as I remember currently (that was 5 weeks ago -- I have to confirm again), using this test file yielded the same results for me as did using the original Provided I can confirm that my What is left then? AFAIU, it is to get as many of the simple |
To better be able to show what I did, I forked your repo. This commit created a new 'examples2' directory with my new 'atomic' |
Ugh, that's a maintenance nightmare. The purpose of these files was to have a simple way to sanity-check an implementation, not to provide packaged, isolated testing scripts. And given the dependencies, it is not always feasible to use the separate tests. The examples directory already contains a number of isolated/example tests for a single functionality - I would rather expand/enhance those tests than split up all of the individual simple test suites. If there is a particular set of tests that might need to be repeated during development of a product, then IMHO that should be the focus of any work and not on a wholesale separation of every possible test that makes it impossible to maintain. |
My own interest in this derives from a desire to run one or more of the tests in isolation without running all the tests in the .test file. One way I thought of doing this, without having to modify the ipptool code, was to put the separate tests into discrete .test files, as @KurtPfeifle had proposed here. It seems another way to do this might be to use a bunch of DEFINE statements at the top, such as: DEFINE TEST-1 true and then turn them off by passing -d arguments to ipptool. (Just a hypothesis - I haven't tried this out yet to see how awkward that might be.) |
That also seems pretty cumbersome - maybe an option to specify a range of tests to run? |
If ipptool were extended to allow one or more tests to be specified by name as an option, and ipptool would "do the dependency math" to ensure that the dependencies were handled, that would be the best of both worlds. But tracking and resolving the dependencies smells like "work". But if you are interested in authoring that I'm 100% supportive! As an extension of that, if it could list the names of the tests before running them that would also be cool! |
You can play with my 'atomic' .test files when you use a newly created .AppImage made with the @AppImage toolbox created by @probonopd & friends. Everything needed is embedded in one single file, and can be put to use easily. Get it from here:
Tutorial as an ASCIIcastAlso, I've created a little tutorial about the IPP Sample Software using this AppImage and recorded an ASCIIcast with it, using @sickill's @asciinema: (Click image above to watch it.) List all embedded '.test' filesRun the AppImage to enumerate all embedded .test files:
You should see the following:
Run a combo of embedded 'atomic' .test filesThose .test files named with leading numbers are my 'atomic' ones. To test a combination of them, you could run:
Extract embedded .test files and hack them however you likeHere's how:
Now edit these local-0{2,3,4}.test files to your heart's contents (or leave them alone, if you just want to verify if the AppImage'd tools can process "external" test files). Just give a relative or absolute PATH to the files:
|
I got asked in private mail by a user, why above output shows lines like:
This is an AppImage-y thing. AppImages, as was explained earlier, are designed according to the "One App = One File" paradigm (in THIS case rather "Multiple Apps == One File". This one .AppImage file never gets extracted during run time. It works because (upon starting the AppImage) the embedded mini-"runtime" binary automatically creates a temporary mount-point as /tmp/.mount_<something>, mounts the AppImage there and lets the embedded "AppRun" binary execute the payload application. Whenever the run time of the embedded binary ends and exits, the AppImage gets un-mounted again, and the temporary mount point is removed. Upon next startup, a new temp mount point with a new name is in effect. (So you have to keep in mind that those absolute paths will never be the same across multiple restarts of AppImages. Do not copy'n'paste these absolute paths and rely on that mount point to be persistent.) |
ipp-1.1.test
into individual *.test
files
I've renamed this issue to track the functionality we are looking for, namely to be able to run a subset of tests and not just to break up this one test file. I also added it to the potential GSoC 2018 work for ipptool enhancements... :) |
Tracking as libcups issue 13... |
After meanwhile quite a few ipp-1.1.test runs and being entangled in related debugging activities, I think the following would be beneficial for future testers:
ipp-1.1.test
suite by usingINCLUDE
statements for the individual files.This way it would be more easy to run specific tests individually, especially when it comes to debugging the respective parts of the now biiiig ipp-1.1.test file.
It would also allow to make a meaningful use of
ipptool
's capability to test with multiple test files within one run as its usage hint suggests:The text was updated successfully, but these errors were encountered: