-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BoxLang CLI mode and Runner
- Loading branch information
Showing
27 changed files
with
55 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,8 @@ WEB-INF | |
build/build.number | ||
.artifacts | ||
.tmp | ||
|
||
# Harness Testers | ||
bx/testbox | ||
bx/grapher | ||
cfml/testbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env boxlang | ||
|
||
/** | ||
* TestBox Runner for BoxLang | ||
*/ | ||
|
||
executionPath = server.java.executionPath | ||
testsDirectory = "tests.specs" | ||
executionArgs = jsonDeserialize( server.java.executionArgs ) | ||
|
||
// No Arguments, execute the entire suite | ||
testArgs = {} | ||
if( executionArgs.isEmpty() ){ | ||
testArgs = { | ||
"directory" : testsDirectory, | ||
"recurse" : true | ||
} | ||
} | ||
|
||
println( new testbox.system.TestBox( argumentCollection = testArgs ).run() ) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Run all the specs in the tests.specs directory and subdirectories | ||
r = new testbox.system.TestBox( directory="tests.specs" ) | ||
println( r.run() ) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,15 @@ component accessors="true" { | |
// A list of globbing patterns to match bundles to test ONLY! Ex: *Spec|*Test | ||
property name="bundlesPattern"; | ||
|
||
// Constants | ||
// Static Variables | ||
variables.TESTBOX_PATH = expandPath( "/testbox" ); | ||
variables.IS_BOXLANG = server.keyExists( "boxlang" ); | ||
variables.IS_CLI = !getFunctionList().keyExists( "getPageContext" ); | ||
variables.DEFAULT_REPORTER = variables.IS_CLI ? "text" : "simple"; | ||
variables.DEFAULT_BUNDLES_PATTERN = "*.bx|*.cfc"; | ||
// TestBox Info : Modified by the build process. | ||
variables.VERSION = "@build.version@[email protected]@"; | ||
variables.CODENAME = ""; | ||
|
||
/** | ||
* Constructor | ||
|
@@ -51,18 +57,15 @@ component accessors="true" { | |
any bundles = [], | ||
any directory = {}, | ||
any directories = {}, | ||
any reporter = "simple", | ||
any reporter = variables.DEFAULT_REPORTER, | ||
any labels = [], | ||
any excludes = [], | ||
struct options = {}, | ||
string bundlesPattern = "*.bx|*.cfc" | ||
string bundlesPattern = variables.DEFAULT_BUNDLES_PATTERN | ||
){ | ||
// TestBox version | ||
variables.version = "@build.version@[email protected]@"; | ||
variables.codename = ""; | ||
// Bundles pattern | ||
if ( !len( arguments.bundlesPattern ) ) { | ||
arguments.bundlesPattern = "*.bx|*.cfc"; | ||
arguments.bundlesPattern = variables.DEFAULT_BUNDLES_PATTERN; | ||
} | ||
variables.bundlesPattern = arguments.bundlesPattern; | ||
// Utility and mappings | ||
|
@@ -203,10 +206,10 @@ component accessors="true" { | |
moduleRecord.moduleConfig.onLoad(); | ||
} catch ( any e ) { | ||
moduleRecord.activationFailure = e; | ||
writeDump( | ||
var = "**** Error activating (#arguments.name#) TestBox Module: #e.message & e.detail#", | ||
output = "console" | ||
); | ||
// writeDump( | ||
// var = "**** Error activating (#arguments.name#) TestBox Module: #e.message & e.detail#", | ||
// output = "console" | ||
// ); | ||
} | ||
|
||
return this; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters