Example #1
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app ("testtex") + " -res 256 256 --nowarp ../../../oiio-testimages/miplevels.tx -o out.tif; "
command = command + path + runtest.oiio_app ("idiff") + " --fail 0.0005 --warn 0.0005 out.tif ref/out.tif > out.txt"

# Outputs to check against references
outputs = [  ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.tif" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #2
0
import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = "echo hi > out.txt ; "
command = command + path + runtest.oiio_app ("oiiotool") + " bad.exr --fixnan black -o black.exr >> out.txt ; "
command = command + path + runtest.oiio_app ("oiiotool") + " bad.exr --fixnan box3 -o box3.exr >> out.txt ; "
command = command + path + runtest.oiio_app ("idiff") + " black.exr ref/black.exr >> out.txt ;"
command = command + path + runtest.oiio_app ("idiff") + " box3.exr ref/box3.exr >> out.txt ;"
command = command + path + runtest.oiio_app ("oiiotool") + " -v --stats bad.exr black.exr box3.exr >> out.txt ;"

# Outputs to check against references
outputs = [ "out.txt", "black.exr", "box3.exr" ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ ]

print "Running this command:\n" + command + "\n"

# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
Example #3
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("testtex") + " --scalest 1 4 horizgrid.tx ; "
command = command + path + runtest.oiio_app("idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = [  ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.exr" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #4
0
import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = "echo hi > out.txt ; "
command = command + path + runtest.oiio_app ("oiiotool") + " ../../../oiio-images/grid.tif --resize 256x256 -o resize.tif >> out.txt ; "
command = command + path + runtest.oiio_app ("idiff") + " resize.tif ref/resize.tif >> out.txt ;"

# To add more tests, just append more lines here, like this:
#  command = command + path + runtest.oiio_app ("oiiotool") + " ../../../oiio-images/grid.tif OPTIONS -o feature.tif >> out.txt ; "
#  command = command + path + runtest.oiio_app ("idiff") + " feature.tif ref/feature.tif >> out.txt ;"
# and also add the new 'feature.tif' (or whatever you call it) to the outputs
# list, below.


# Outputs to check against references
outputs = [ "resize.tif" ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" ]
Example #5
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app(
    "testtex") + " ../../../oiio-testimages/grid.tx ; "
command = command + path + runtest.oiio_app(
    "idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = []

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = ["out.txt" "out.exr"]

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #6
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app(
    "iinfo") + " -v ../../../oiio-images/tahoe-gps.jpg > out.txt"

# Outputs to check against references
outputs = ["out.txt"]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = []

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #7
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app ("testtex") + " --missing 1 0 0 --res 8 8 missing.tx ; "
command = command + path + runtest.oiio_app ("idiff") + " out.exr ref/out.exr > out.txt"

# Outputs to check against references
outputs = [  ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.exr" "postage.exr" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #8
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app(
    "testtex"
) + " -res 256 256 --nowarp ../../../oiio-testimages/miplevels.tx -o out.tif; "
command = command + path + runtest.oiio_app(
    "idiff") + " --fail 0.0005 --warn 0.0005 out.tif ref/out.tif > out.txt"

# Outputs to check against references
outputs = []

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = ["out.txt" "out.tif"]

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #9
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app(
    "testtex") + " --missing 1 0 0 --res 8 8 missing.tx ; "
command = command + path + runtest.oiio_app(
    "idiff") + " out.exr ref/out.exr > out.txt"

# Outputs to check against references
outputs = []

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = ["out.txt" "out.exr" "postage.exr"]

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #10
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("iinfo") + " -v ../../../webp-images/1.webp > out.txt;"
command += path + runtest.oiio_app("iinfo") + " -v ../../../webp-images/2.webp >> out.txt;"
command += path + runtest.oiio_app("iinfo") + " -v ../../../webp-images/3.webp >> out.txt;"
command += path + runtest.oiio_app("iinfo") + " -v ../../../webp-images/4.webp >> out.txt;"
command += path + runtest.oiio_app("iinfo") + " -v ../../../webp-images/5.webp >> out.txt;"

# Outputs to check against references
outputs = [ "out.txt" ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #11
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app ("testtex") + " -fill 0.05 --graytorgb --res 128 128 --nowarp gray.png ; "
command = command + path + runtest.oiio_app ("idiff") + " out.exr ref/out.exr > out.txt"

# Outputs to check against references
outputs = [  ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.exr" "postage.exr" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #12
0
texfile = "../../../oiio-testimages/grid.tx"

# Make 10 copies of the grid texture, to different names to force
# lots of filse in the cache.
allnames = ""
for i in range(10):
    name = "f%02d.tx" % i
    shutil.copy(texfile, name)
    allnames = allnames + " " + name
    cleanfiles.append(name)

# Run testtex with small cache size and max files.  We will check its
# output to make sure we hit the right peak levels.
command = (
    path
    + runtest.oiio_app("testtex")
    + " --cachesize 10 --maxfiles 5 --blocksize 16 "
    + allnames
    + " | grep peak > out.txt"
)
#           " | grep -v time | grep -v Tot > out.txt")
# N.B. we use grep to exclude time values that may differ from run to run

# Outputs to check against references
outputs = ["out.txt"]


# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #13
0
import runtest

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = ["out.txt" "out.exr"]

texfile = "../../../oiio-images/grid.tx"

# Make 10 copies of the grid texture, to different names to force
# lots of filse in the cache.
allnames = ""
for i in range(10):
    name = "f%02d.tx" % i
    shutil.copy(texfile, name)
    allnames = allnames + " " + name
    cleanfiles.append(name)

# Run testtex with small cache size and max files.  We will check its
# output to make sure we hit the right peak levels.
command = (path + runtest.oiio_app("testtex") +
           " --cachesize 10 --maxfiles 5 --blocksize 16 " + allnames +
           " | grep peak > out.txt")
#           " | grep -v time | grep -v Tot > out.txt")
# N.B. we use grep to exclude time values that may differ from run to run

# Outputs to check against references
outputs = ["out.txt"]

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #14
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app(
    "testtex") + " --nowarp --offset -1 -1 -1 --scalest 2 2 sparse_half.f3d ; "
command = command + path + runtest.oiio_app(
    "idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = []

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = ["out.txt" "out.exr"]

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #15
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("testtex") + " --scalest 4 1 vertgrid.tx ; "
command = command + path + runtest.oiio_app(
    "idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = []

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = ["out.txt" "out.exr"]

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)
Example #16
0
import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = "echo hi > out.txt ; "
command = command + path + runtest.oiio_app ("oiiotool") + " ../../../oiio-images/grid.tif --resize 256x256 -o resize.tif >> out.txt ; "
command = command + path + runtest.oiio_app ("idiff") + " resize.tif ref/resize.tif >> out.txt ;"

# To add more tests, just append more lines here, like this:
#  command = command + path + runtest.oiio_app ("oiiotool") + " ../../../oiio-images/grid.tif OPTIONS -o feature.tif >> out.txt ; "
#  command = command + path + runtest.oiio_app ("idiff") + " feature.tif ref/feature.tif >> out.txt ;"
# and also add the new 'feature.tif' (or whatever you call it) to the outputs
# list, below.


# Outputs to check against references
outputs = [ "resize.tif" ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" ]
Example #17
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("testtex") + " --nowarp --offset -1 -1 -1 --scalest 2 2 sparse_half.f3d ; "
command = command + path + runtest.oiio_app("idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = [  ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.exr" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #18
0
#!/usr/bin/python

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2:
    os.chdir(sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app(
    "iinfo") + " -v ../../../webp-images/1.webp > out.txt;"
command += path + runtest.oiio_app(
    "iinfo") + " -v ../../../webp-images/2.webp >> out.txt;"
command += path + runtest.oiio_app(
    "iinfo") + " -v ../../../webp-images/3.webp >> out.txt;"
command += path + runtest.oiio_app(
    "iinfo") + " -v ../../../webp-images/4.webp >> out.txt;"
command += path + runtest.oiio_app(
    "iinfo") + " -v ../../../webp-images/5.webp >> out.txt;"

# Outputs to check against references
outputs = ["out.txt"]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = []
Example #19
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("maketx") + " --filter lanczos3 ../../../oiio-images/grid-overscan.exr -o ./grid-overscan.exr; "
command = command + path + runtest.oiio_app("testtex") + " --wrap black ./grid-overscan.exr ; "
command = command + path + runtest.oiio_app("idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = [ "out.exr" ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt", "grid-overscan.exr", "postage.exr" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #20
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("iinfo") + " -v ../../../oiio-testimages/tahoe-gps.jpg > out.txt"

# Outputs to check against references
outputs = [ "out.txt" ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #21
0
# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.exr" ]

texfile = "../../../oiio-images/grid.tx"

# Make 10 copies of the grid texture, to different names to force
# lots of filse in the cache.
allnames = ""
for i in range(10) :
    name = "f%02d.tx" % i
    shutil.copy (texfile, name)
    allnames = allnames + " " + name
    cleanfiles.append (name)

# Run testtex with small cache size and max files.  We will check its
# output to make sure we hit the right peak levels.
command = (path + runtest.oiio_app("testtex") +
           " --cachesize 10 --maxfiles 5 --blocksize 16 " + allnames +
           " | grep peak > out.txt")
#           " | grep -v time | grep -v Tot > out.txt")
# N.B. we use grep to exclude time values that may differ from run to run

# Outputs to check against references
outputs = [ "out.txt" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #22
0
#!/usr/bin/python 

import os
import sys

path = ""
command = ""
if len(sys.argv) > 2 :
    os.chdir (sys.argv[1])
    path = sys.argv[2] + "/"

sys.path = [".."] + sys.path
import runtest

# A command to run
command = path + runtest.oiio_app("testtex") + " -width 0 ../../../oiio-images/grid.tx ; "
command = command + path + runtest.oiio_app("idiff") + " out.exr ref/out.exr > out.txt"
# Outputs to check against references
outputs = [  ]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = [ "out.txt" "out.exr" ]


# boilerplate
ret = runtest.runtest (command, outputs, cleanfiles)
sys.exit (ret)
Example #23
0
File: run.py Project: Nvizible/oiio
# Start off
command = "echo hi> out.txt"

imagedir = "../../../oiio-images/"

# List of images to test
files = [
    "psd_123.psd",
    "psd_123_nomaxcompat.psd",
    "psd_bitmap.psd",
    "psd_indexed_trans.psd",
    "psd_rgb_8.psd",
    "psd_rgb_16.psd",
    "psd_rgb_32.psd",
    "psd_rgba_8.psd",
]

# Run the tests
for f in files:
    command = command + "; " + path + runtest.oiio_app("iinfo") + " -a -v " + imagedir + f + " >> out.txt"

# Outputs to check against references
outputs = ["out.txt"]

# Files that need to be cleaned up, IN ADDITION to outputs
cleanfiles = files

# boilerplate
ret = runtest.runtest(command, outputs, cleanfiles)
sys.exit(ret)