Sha256: d024556271b672294f9a698a7bda5c564c67013cbc3a039fd8a95731b7b9c02c

Contents?: true

Size: 856 Bytes

Versions: 74

Compression:

Stored size: 856 Bytes

Contents

/**
* I test all the solutions in each exercise to make sure they all pass.  
*/
component {
	
	function run() {
		// Get an array of all the excercise names
		var exercises = directoryList( expandPath( getDirectoryFromPath( getCurrentTemplatePath() ) & '../exercises' ) );
		var exitCode = 0;
		
		// If there's a testrunner task in them, run it.  If any of the tasks fail, the exit code will come back as 1
		exercises.each( function( path ) {
			if( fileExists( path & '/TestRunner.cfc' ) ) {
				command( 'task run' )
					.params( 'TestRunner' )
					// Specifically as the task runners to run the SolutionTest
					.flags( ':solution' )
					.inWorkingDirectory( path )
					.run();
				exitCode = max( exitCode, createObject( 'java', 'java.lang.System' ).getProperty( 'cfml.cli.exitCode' ) ?: 0 ); 
			}
		} );
		
		setExitCode( exitCode );		
	}
	
}

Version data entries

74 entries across 74 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.179 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.178 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.177 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.176 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.175 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.174 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.173 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.172 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.171 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.170 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.169 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.167 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.166 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.165 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.164 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.163 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.162 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.161 tracks/cfml/tasks/TestAllSolutions.cfc
trackler-2.2.1.160 tracks/cfml/tasks/TestAllSolutions.cfc