tests: Fix JavaScript tests with gjs 1.50.0
authorSimon McVittie <smcv@collabora.com>
Fri, 15 Sep 2017 14:32:55 +0000 (15:32 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 28 Sep 2017 16:17:06 +0000 (17:17 +0100)
In recent gjs, you can't declare a variable with "let" multiple times.

Signed-off-by: Simon McVittie <smcv@collabora.com>
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

tests/corrupt-repo-ref.js
tests/test-sysroot.js

index c5f28062f54a8cfdb868a085a8ebbf603548c1e6..bcde86b0e7972d375f312197b9bcf9d5f53d35be 100755 (executable)
@@ -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;
index 40397fe96088fbde118ab6c3d2cb0f7d99da7b00..e7250a8c2bd5b91f3c1d0853fc0d27bd88a94530 100755 (executable)
@@ -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);