darktable is an open source photography workflow application and non-destructive raw developer. A virtual lighttable and darkroom for photographers. It manages your digital negatives in a database, lets you view them through a zoomable lighttable and enables you to develop raw images, enhance them and export them on local or remote storage.
This repository hosts the darktable integration tests.
Structure
images/ : a directory containing test images
run.sh : main driver
deltae : python script to compute a delta-E between 2 images
expected.jpg and output.jpg
nnnn-name/ : tests
Needed tools : zopflipng
# How to add a new test (using default driver)
- Create a new directory
<nnnn>-<meaningful name>
-
Start darktable, open one test image (or add a new one if needed)
-
Do a dev using whatever module
-
Copy the resulting .xmp into -
And rename it
<meaningful name>.xmp
-
Add a README (optional)
First line is a short label that will be added next to the test name. This can be used to give specific description for a test (like an unstable test across computers).
The rest of the README can contain a long description if needed.
-
Add a CONFIG (optional)
The config file must contain one darktable-cli option per line. Each option has the same format as the ones found in darktablerc.
-
Do a first run of the test to get the expected output
./run <dir>
The output.png will be copied to expected.png, double check that expected.png is correct and really the expected output.
- Test that all is ok by running:
./run <dir>
All values must be 0 as there is no change in darktable, so the expected output should be exactly the same image as the output.
./run.sh 0001-exposure
Test 0001-exposure
Image mire1.cr2
CPU & GPU version differ by 25699 pixels
----------------------------------
Max dE : 0.00000
Avg dE : 0.00000
Std dE : 0.00000
----------------------------------
Pixels below avg + 0 std : 100.00 %
Pixels below avg + 1 std : 100.00 %
Pixels below avg + 3 std : 100.00 %
Pixels below avg + 6 std : 100.00 %
Pixels below avg + 9 std : 100.00 %
----------------------------------
Pixels above tolerance : 0.00 %
OK
- If all goes well commit the .xmp and expected.png files
How to add a new test (using specific driver)
- Create a new directory
<nnnn>-<meaningful name>
-
Create a file named test.sh into this directory
This test.sh is a specific driver that can do whatever is necessary for the test. At the end the driver must return 0 if all is OK and 1 otherwise.