if not os.access(data_path, os.X_OK): print "\033[31mData path not found:\033[0m ", data_path print """\ You need a to checkout the data repository and link its b2b/ dir. For example: $ cd $ svn co http://parumi.org/acustica/data data_acustica $ cd acustica/visualitzador_escena_c++ $ ln -s ~/data_acustica/b2b/ """ sys.exit(-1) back2backTests = [ (prefix, commandLine, ["E%s.wav" % component for component in "wxyz"]) for prefix, commandLine in [ ("MIT_noncompensated", "./hrtf2BinauralResponses.py "), ("MIT_noncompensated_R", "./hrtf2BinauralResponses.py -r"), ("MIT_compensated", "./hrtf2BinauralResponses.py --compensate"), ("MITdiffuse_noncompensated", "./hrtf2BinauralResponses.py --mitdiffuse"), ("MITdiffuse_compensated", "./hrtf2BinauralResponses.py --mitdiffuse --compensate"), ("IRCAM1002_noncompensated", "./hrtf2BinauralResponses.py --ircam 1002"), ("IRCAM1002_compensated", "./hrtf2BinauralResponses.py --ircam 1002 --compensate"), ("IRCAM1002R_noncompensated", "./hrtf2BinauralResponses.py --ircam 1002 -r"), ("IRCAM1002R_compensated", "./hrtf2BinauralResponses.py --ircam 1002 -r --compensate"), ("KREUZER_noncompensated", "./hrtf2BinauralResponses.py --kreuzer"), ("KREUZER_compensated", "./hrtf2BinauralResponses.py --kreuzer --compensate"), ] ] runBack2BackProgram(data_path, sys.argv, back2backTests)
from b2btest import runBack2BackProgram import sys datapath = "data" # Point it to the directory containing your reference data runBack2BackProgram(datapath, sys.argv, [ ('HelloWorld', 'echo Hello World > output.txt', [ 'output.txt', ]), ('Generate1KHzSine', 'sox -n sine.wav synth 1.0 sine 1000.0', [ 'sine.wav', ]), ])