| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bb10819 commit 576242f
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.32', | ||
| 39 | + 'v8_embedder_string': '-node.33', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,15 +25,11 @@ | |||
| 25 | 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 26 | 26 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 27 | 27 | ||
| 28 | - import imp | ||
| 29 | - import itertools | ||
| 30 | - import os | ||
| 31 | - import re | ||
| 28 | + import importlib.machinery | ||
| 32 | 29 | import sys | |
| 33 | 30 | ||
| 34 | 31 | from testrunner.local import statusfile | |
| 35 | 32 | from testrunner.local import testsuite | |
| 36 | - from testrunner.local import utils | ||
| 37 | 33 | from testrunner.objects import testcase | |
| 38 | 34 | from testrunner.outproc import base as outproc | |
| 39 | 35 | from testrunner.outproc import test262 | |
@@ -141,11 +137,12 @@ def _load_parse_test_record(self): | |||
| 141 | 137 | root = os.path.join(*TEST_262_TOOLS_ABS_PATH) | |
| 142 | 138 | f = None | |
| 143 | 139 | try: | |
| 144 | - (f, pathname, description) = imp.find_module("parseTestRecord", [root]) | ||
| 145 | - module = imp.load_module("parseTestRecord", f, pathname, description) | ||
| 140 | + loader = importlib.machinery.SourceFileLoader( | ||
| 141 | + "parseTestRecord", f"{root}/parseTestRecord.py") | ||
| 142 | + module = loader.load_module() | ||
| 146 | 143 | return module.parseTestRecord | |
| 147 | - except: | ||
| 148 | - print('Cannot load parseTestRecord') | ||
| 144 | + except Exception as e: | ||
| 145 | + print(f'Cannot load parseTestRecord: {e}') | ||
| 149 | 146 | raise | |
| 150 | 147 | finally: | |
| 151 | 148 | if f: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,7 +26,7 @@ | |||
| 26 | 26 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | - import imp | ||
| 29 | + import importlib.machinery | ||
| 30 | 30 | import itertools | |
| 31 | 31 | import os | |
| 32 | 32 | from contextlib import contextmanager | |
@@ -238,12 +238,13 @@ def merge(self, test_generator): | |||
| 238 | 238 | def _load_testsuite_module(name, root): | |
| 239 | 239 | f = None | |
| 240 | 240 | try: | |
| 241 | - (f, pathname, description) = imp.find_module("testcfg", [root]) | ||
| 242 | - yield imp.load_module(name + "_testcfg", f, pathname, description) | ||
| 241 | + yield importlib.machinery.SourceFileLoader( | ||
| 242 | + name + "_testcfg", f"{root}/testcfg.py").load_module() | ||
| 243 | 243 | finally: | |
| 244 | 244 | if f: | |
| 245 | 245 | f.close() | |
| 246 | 246 | ||
| 247 | + | ||
| 247 | 248 | class TestSuite(object): | |
| 248 | 249 | @staticmethod | |
| 249 | 250 | def Load(ctx, root, test_config): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments