Browse Source

Run the node test in isolation

Steven Silvester 5 years ago
parent
commit
929558c51a
2 changed files with 9 additions and 4 deletions
  1. 9 3
      examples/test_examples.py
  2. 0 1
      scripts/ci_script.sh

+ 9 - 3
examples/test_examples.py

@@ -11,6 +11,7 @@ checked before the browser.close() call).
 import argparse
 import argparse
 import glob
 import glob
 import os.path as osp
 import os.path as osp
+import shutil
 import subprocess
 import subprocess
 import sys
 import sys
 import tempfile
 import tempfile
@@ -42,9 +43,14 @@ def main():
 
 
     count = 0
     count = 0
     for path in sorted(paths):
     for path in sorted(paths):
-        if 'node' in path:
-            continue
-        if osp.exists(osp.join(path, 'main.py')):
+        if osp.basename(path) == 'node':
+            with tempfile.TemporaryDirectory() as cwd:
+                shutil.copytree(path, cwd)
+                header(path)
+                runner = osp.join(cwd, 'main.py')
+                subprocess.check_call([sys.executable, runner], cwd=cwd)
+                count += 1
+        elif osp.exists(osp.join(path, 'main.py')):
             with tempfile.TemporaryDirectory() as cwd:
             with tempfile.TemporaryDirectory() as cwd:
                 header(path)
                 header(path)
                 runner = osp.join(here, 'example_check.py')
                 runner = osp.join(here, 'example_check.py')

+ 0 - 1
scripts/ci_script.sh

@@ -184,7 +184,6 @@ if [[ $GROUP == usage ]]; then
     jlpm run build:examples
     jlpm run build:examples
 
 
     # Test the examples
     # Test the examples
-    python packages/services/examples/node/main.py
     jlpm run test:examples
     jlpm run test:examples
 
 
     # Make sure we can successfully load the dev app.
     # Make sure we can successfully load the dev app.