Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Making test list dynamic from a JSON file

  • Loading branch information...
commit 58a93d8258aae0b064cdcd4c5b4b22a7e32c95db 1 parent 646c8f4
@davglass davglass authored
View
13 src/common/travis/gettests.js
@@ -0,0 +1,13 @@
+#!/usr/bin/env node
+
+process.chdir(__dirname);
+
+var root = process.argv[2],
+ path = require('path');
+
+var json = require('./tests.json');
+
+json.tests.forEach(function(v, k) {
+ json.tests[k] = path.join(root, v);
+});
+console.log(json.tests.join(' '));
View
8 src/common/travis/test.sh
@@ -13,5 +13,9 @@ echo "YUITest: ${yuitest}"
echo "Running Tests.."
-cd $root
-$yuitest ${root}/src/io/tests/cli/run.js ${root}/src/loader/tests/cli/loader.js
+tests=`${root}/src/common/travis/gettests.js ${root}`
+
+echo "Tests: ${tests}"
+
+cd ${root}
+${yuitest} ${tests}
View
6 src/common/travis/tests.json
@@ -0,0 +1,6 @@
+{
+ "tests": [
+ "/src/io/tests/cli/run.js",
+ "/src/loader/tests/cli/loader.js"
+ ]
+}
Please sign in to comment.
Something went wrong with that request. Please try again.