зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1692178 - Android Jit tests: Only push jit-test tests files. r=jandem
This patch removes the tests directory upload (196 MB) and replace it by 3 files upload. Some of the tests under jit-test directory are using library files of the tests directory. This patch changes multiple things to make this work: - `tests/**/*.js` files are now aliased under jit-test/lib. - jit-test tests are updated to only reference jit-test/lib. - Replace lib files by their aliased versions when uploading the test suite. Thus avoiding references to `../../tests/`. - The remote_root_directory no longer changed to be under the tests directory. - The prologue.js path is updated accordingly. Differential Revision: https://phabricator.services.mozilla.com/D106472
This commit is contained in:
Родитель
02fda47fbd
Коммит
f43e690147
|
@ -517,9 +517,7 @@ def main(argv):
|
|||
)
|
||||
prologue = os.path.join(jittests.LIB_DIR, "prologue.js")
|
||||
if options.remote:
|
||||
prologue = posixpath.join(
|
||||
options.remote_test_root, "tests", "tests", "lib", "prologue.js"
|
||||
)
|
||||
prologue = posixpath.join(options.remote_test_root, "lib", "prologue.js")
|
||||
|
||||
prefix += ["-f", prologue]
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
|
||||
load(libdir + "../../tests/non262/shell.js");
|
||||
load(libdir + "non262.js");
|
||||
|
||||
if (typeof assertWarning === 'undefined') {
|
||||
var assertWarning = function assertWarning(f, pattern) {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
loadRelativeToScript("../../tests/non262/Math/shell.js");
|
|
@ -0,0 +1 @@
|
|||
loadRelativeToScript("../../tests/non262/shell.js");
|
|
@ -1,4 +1,4 @@
|
|||
loadRelativeToScript("../../../tests/non262/Math/shell.js");
|
||||
load(libdir + "math.js");
|
||||
|
||||
for (var i = -20; i < 20; i++) {
|
||||
assertEq(Math.hypot(+0, i), Math.abs(i));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Lowering provides a specialisation when the base operand is a constant which
|
||||
// is a power of two.
|
||||
|
||||
loadRelativeToScript("../../../tests/non262/Math/shell.js");
|
||||
load(libdir + "math.js");
|
||||
|
||||
function test(x, y, z) {
|
||||
function pow(x, y) { return `Math.pow(${x}, ${y})` };
|
||||
|
|
|
@ -105,18 +105,22 @@ def setup_device(prefix, options):
|
|||
try:
|
||||
device = init_device(options)
|
||||
|
||||
def replace_lib_file(path, name):
|
||||
localfile = os.path.join(JS_TESTS_DIR, *path)
|
||||
remotefile = posixpath.join(options.remote_test_root, "lib", name)
|
||||
device.push(localfile, remotefile, timeout=10)
|
||||
|
||||
prefix[0] = posixpath.join(options.remote_test_root, "bin", "js")
|
||||
tempdir = posixpath.join(options.remote_test_root, "tmp")
|
||||
# Update the test root to point to our test directory.
|
||||
jit_tests_dir = posixpath.join(options.remote_test_root, "tests")
|
||||
options.remote_test_root = posixpath.join(jit_tests_dir, "tests")
|
||||
jtd_tests = posixpath.join(options.remote_test_root)
|
||||
|
||||
init_remote_dir(device, jit_tests_dir)
|
||||
device.push(JS_TESTS_DIR, jtd_tests, timeout=600)
|
||||
device.chmod(jtd_tests, recursive=True)
|
||||
|
||||
device.push(os.path.dirname(TEST_DIR), options.remote_test_root, timeout=600)
|
||||
# Substitute lib files which are aliasing non262 files.
|
||||
replace_lib_file(["non262", "shell.js"], "non262.js")
|
||||
replace_lib_file(["non262", "reflect-parse", "Match.js"], "match.js")
|
||||
replace_lib_file(["non262", "Math", "shell.js"], "math.js")
|
||||
device.chmod(options.remote_test_root, recursive=True)
|
||||
|
||||
print("tasks_adb_remote.py : Device initialization completed")
|
||||
|
|
Загрузка…
Ссылка в новой задаче