Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

We now auto-retrieve compliance tests if they're not already present.

  • Loading branch information...
commit 6777b287a992616e0037aac626458f09cf23a1fd 1 parent 51444cb
Atul Varma authored
Showing with 19 additions and 9 deletions.
  1. +2 −0  .hgignore
  2. +3 −9 chrome/content/main.js
  3. +14 −0 run_tests.py
View
2  .hgignore
@@ -0,0 +1,2 @@
+syntax: glob
+interoperablejs-read-only
View
12 chrome/content/main.js
@@ -36,15 +36,9 @@ window.addEventListener(
var rootDir = dirSvc.getFile("CurWorkD", {});
rootDir.append("interoperablejs-read-only");
rootDir.append("compliance");
- if (!rootDir.exists()) {
- throw new Error(
- ("Compliance test directory doesn't exist at " +
- rootDir.path + ". Please obtain it by running " +
- "'svn checkout " +
- "http://interoperablejs.googlecode.com/svn/trunk/ " +
- "interoperablejs-read-only'.")
- );
- }
+ if (!rootDir.exists())
+ throw new Error("Compliance test directory doesn't exist at " +
+ rootDir.path);
// Ensure the module works when loaded as a JS module.
log("running tests in JS module", "info");
View
14 run_tests.py
@@ -70,6 +70,20 @@ def find_binary(self):
myfile = os.path.abspath(__file__)
mydir = os.path.dirname(myfile)
+ test_dir = os.path.join(mydir, 'interoperablejs-read-only')
+ if not os.path.exists(test_dir):
+ print "CommonJS compliance test directory not found."
+ print
+ print "Attempting to retrieve it now via svn."
+ print
+ retval = subprocess.call(
+ ['svn', 'checkout',
+ 'http://interoperablejs.googlecode.com/svn/trunk/',
+ 'interoperablejs-read-only']
+ )
+ if retval:
+ sys.exit(1)
+
starttime = time.time()
popen = subprocess.Popen(
[options.binary,
Please sign in to comment.
Something went wrong with that request. Please try again.