From: Simon McVittie Date: Fri, 15 Sep 2017 14:32:55 +0000 (+0100) Subject: tests: Fix JavaScript tests with gjs 1.50.0 X-Git-Tag: archive/raspbian/2017.12-1+rpi1~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9c07c684bd8b34e4f63a87687ae389f9e0cbf465;p=ostree.git tests: Fix JavaScript tests with gjs 1.50.0 In recent gjs, you can't declare a variable with "let" multiple times. Signed-off-by: Simon McVittie Closes: #1178 Approved by: cgwalters Forwarded: https://github.com/ostreedev/ostree/pull/1178 Applied-upstream: 2017.12, commit:1b430a776486d68be2d16a0ec53ad5512c604988 Gbp-Pq: Topic 2017.12 Gbp-Pq: Name tests-Fix-JavaScript-tests-with-gjs-1.50.0.patch --- diff --git a/tests/corrupt-repo-ref.js b/tests/corrupt-repo-ref.js index c5f28062..bcde86b0 100755 --- a/tests/corrupt-repo-ref.js +++ b/tests/corrupt-repo-ref.js @@ -47,7 +47,6 @@ function listObjectChecksumsRecurse(dir, allObjects) { e.close(null); } -let [,commit] = repo.resolve_rev(refToCorrupt, false); let [,root,commit] = repo.read_commit(refToCorrupt, null); let allObjects = {}; allObjects[commit + '.commit'] = true; diff --git a/tests/test-sysroot.js b/tests/test-sysroot.js index 40397fe9..e7250a8c 100755 --- a/tests/test-sysroot.js +++ b/tests/test-sysroot.js @@ -97,9 +97,9 @@ assertEquals(deploymentPath.query_exists(null), false); //// Ok, redeploy, then add a new revision upstream and pull it -let [,deployment] = sysroot.deploy_tree('testos', rev, origin, - mergeDeployment, null, - null); +[,deployment] = sysroot.deploy_tree('testos', rev, origin, + mergeDeployment, null, + null); newDeployments = deployments; deployments = null; newDeployments.unshift(deployment);