Bug 1522096 - Skip BinAST jit-tests if BinAST is not enabled. r=sfink

Differential Revision: https://phabricator.services.mozilla.com/D17475

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tooru Fujisawa 2019-01-25 18:35:43 +00:00
Родитель 7417b70f91
Коммит c9819d375b
2 изменённых файлов: 19 добавлений и 0 удалений

Просмотреть файл

@ -366,6 +366,15 @@ static bool GetBuildConfiguration(JSContext* cx, unsigned argc, Value* vp) {
return false;
}
#if defined(JS_BUILD_BINAST)
value = BooleanValue(true);
#else
value = BooleanValue(false);
#endif
if (!JS_SetProperty(cx, info, "binast", value)) {
return false;
}
value.setInt32(sizeof(void*));
if (!JS_SetProperty(cx, info, "pointer-byte-size", value)) {
return false;

Просмотреть файл

@ -229,6 +229,16 @@ def main(argv):
options.asmjs_enabled = False
options.wasm_enabled = False
if options.run_binast:
code = 'print(getBuildConfiguration().binast)'
is_binast_enabled = subprocess.check_output([js_shell, '-e', code])
if not is_binast_enabled.startswith('true'):
print("While --run-binast is specified, BinAST is not enabled.",
file=sys.stderr)
print("BinAST testcases will be skipped.",
file=sys.stderr)
options.run_binast = False
if test_args:
read_all = False
for arg in test_args: