Skip to content
Snippets Groups Projects
Commit 6618b812 authored by Ben Heasly's avatar Ben Heasly
Browse files

rename big testing functions to "epic", which is how we usually talk about them

parent 8cad3132
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ classdef RtbExampleTests < matlab.unittest.TestCase
methods (Test)
function testNotAnExample(testCase)
results = rtbTestAllExampleScenes( ...
results = rtbRunEpicTest( ...
'outputRoot', testCase.outputRoot, ...
'makeFunctions', {'notAnExample.m'});
testCase.assertFalse(results.isSuccess);
......@@ -24,7 +24,7 @@ classdef RtbExampleTests < matlab.unittest.TestCase
end
function testCoordinatesTest(testCase)
results = rtbTestAllExampleScenes( ...
results = rtbRunEpicTest( ...
'outputRoot', testCase.outputRoot, ...
'makeFunctions', {'rtbMakeCoordinatesTest.m'});
testCase.assertTrue(results.isSuccess);
......@@ -32,7 +32,7 @@ classdef RtbExampleTests < matlab.unittest.TestCase
end
function testDragon(testCase)
results = rtbTestAllExampleScenes( ...
results = rtbRunEpicTest( ...
'outputRoot', testCase.outputRoot, ...
'makeFunctions', {'rtbMakeDragon.m'});
testCase.assertTrue(results.isSuccess);
......@@ -40,7 +40,7 @@ classdef RtbExampleTests < matlab.unittest.TestCase
end
function testMaterialSphereBumps(testCase)
results = rtbTestAllExampleScenes( ...
results = rtbRunEpicTest( ...
'outputRoot', testCase.outputRoot, ...
'makeFunctions', {'rtbMakeMaterialSphereBumps.m'});
testCase.assertTrue(results.isSuccess);
......@@ -48,7 +48,7 @@ classdef RtbExampleTests < matlab.unittest.TestCase
end
function testMaterialSphereRemodeled(testCase)
results = rtbTestAllExampleScenes( ...
results = rtbRunEpicTest( ...
'outputRoot', testCase.outputRoot, ...
'makeFunctions', {'rtbMakeMaterialSphereRemodeled.m'});
testCase.assertTrue(results.isSuccess);
......
function [matchInfo, unmatchedA, unmatchedB] = rtbCompareAllExampleScenes(workingFolderA, workingFolderB, varargin)
function [matchInfo, unmatchedA, unmatchedB] = rtbRunEpicComparison(workingFolderA, workingFolderB, varargin)
%% Compare recipe renderings that were generated at different times.
%
% [matchInfo, unmatchedA, unmatchedB] = rtbCompareAllExampleScenes(workingFolderA, workingFolderB)
% [matchInfo, unmatchedA, unmatchedB] = rtbRunEpicComparison(workingFolderA, workingFolderB)
% Finds 2 sets of rendering outputs: set A includes renderings located
% under the given workingFolderA, set B includes renderings located
% under workingFolderB. Attempts to match up data files from both sets,
......@@ -18,12 +18,12 @@ function [matchInfo, unmatchedA, unmatchedB] = rtbCompareAllExampleScenes(workin
% - rendererName must be the name of a renderer, like "PBRT" or "Mitsuba"
% - fileName must be the name of a multi-spectral data file, such as "Dragon-001"
%
% rtbCompareAllExampleScenes( ... 'filterExpression', filterExpression)
% rtbRunEpicComparison( ... 'filterExpression', filterExpression)
% uses the given regular expression filterExpr'/home/ben/Desktop/testA'ession to select file paths.
% Only data files whose paths match the expression will be compared. The
% default is to do no such filtering.
%
% rtbCompareAllExampleScenes( ... 'visualize', visualize) specifies the
% rtbRunEpicComparison( ... 'visualize', visualize) specifies the
% level of visualization to do during comparinsons. The options are:
% - 0 -- don't plot anything
% - 1 -- (default) plot a summary figure at the end
......@@ -42,7 +42,7 @@ function [matchInfo, unmatchedA, unmatchedB] = rtbCompareAllExampleScenes(workin
% unfair comparison due to large denominator. For each pair of images, the
% plot will show the mean and max of the diffs from all pixel components.
%
% rtbCompareAllExampleScenes( ... 'figureFolder', figureFolder) specifies
% rtbRunEpicComparison( ... 'figureFolder', figureFolder) specifies
% an output folder where to save figures used for visualization. The
% default is rtbWorkingFolder().
%
......@@ -51,7 +51,7 @@ function [matchInfo, unmatchedA, unmatchedB] = rtbCompareAllExampleScenes(workin
% compare renderings produced locally with archived renderings located at
% Amazon S3. For example:
% % produce renderings locally
% rtbTestAllExampleScenes('my/local/renderings');
rtbRunEpicTest
%
% % download archived renderings to 'my/local/archive'
%
......@@ -59,7 +59,7 @@ function [matchInfo, unmatchedA, unmatchedB] = rtbCompareAllExampleScenes(workin
% workingFolderA = 'my/local/renderings/data';
% workingFolderA = 'my/local/archive/data';
% visualize = 1;
% matchInfo = rtbCompareAllExampleScenes(workingFolderA, workingFolderB, 'visualize', visualize);
% matchInfo = rtbRunEpicComparison(workingFolderA, workingFolderB, 'visualize', visualize);
%
% Returns a struct array of info about each matched pair, including file
% names and differneces between multispectral images (A minus B).
......
function results = rtbTestAllExampleScenes(varargin)
function results = rtbRunEpicTest(varargin)
%% Run all "rtbMake..." scripts in the ExampleScenes/ folder.
%
% results = rtbTestAllExampleScenes() renders example scenes by invoking
% results = rtbRunEpicTest() renders example scenes by invoking
% all of the "rtbMake..." executive sripts found within the ExampleScenes/
% folder
%
......@@ -19,11 +19,11 @@ function results = rtbTestAllExampleScenes(varargin)
% have a name that that includes the name of this m-file, plus the date and
% time.
%
% rtbTestAllExampleScenes( ... 'outputRoot', outputRoot) specifies the
% rtbRunEpicTest( ... 'outputRoot', outputRoot) specifies the
% working folder where to put rendering outputs. The default is from
% rtbDefaultHints().
%
% rtbTestAllExampleScenes( ... 'makeFunctions', makeFunctions) specifies a
% rtbRunEpicTest( ... 'makeFunctions', makeFunctions) specifies a
% cell array of executive functions to run. The default is to search the
% ExampleScenes/ folder for m-files that begin with "rtbMake".
%
......
......@@ -77,7 +77,7 @@ end
if doAll
fprintf('\nTesting rendering with all example scripts.\n');
fprintf('This might take a while.\n');
renderResults = rtbTestAllExampleScenes([], []);
renderResults = rtbRunEpicTest([], []);
else
testScenes = { ...
......@@ -88,7 +88,7 @@ else
fprintf('\nTesting rendering with %d example scripts.\n', numel(testScenes));
fprintf('You should see several figures with rendered images.\n\n');
renderResults = rtbTestAllExampleScenes('makeFunctions', testScenes);
renderResults = rtbRunEpicTest('makeFunctions', testScenes);
end
......@@ -103,7 +103,7 @@ if ~isempty(referenceRoot)
fprintf('\nComparing local renderings\n %s\n', localRoot);
fprintf('with reference renderings\n %s\n', referenceRoot);
fprintf('You should see several more figures.\n\n');
comparison = rtbCompareAllExampleScenes(localRoot, referenceRoot, '', 2);
comparison = rtbRunEpicComparison(localRoot, referenceRoot, '', 2);
else
fprintf('\nNo referenceRoot provided. Local renderings\n');
fprintf('will not be compared with reference renderings.\n');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment