mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
Bug 1722777 - Pre: Move "skip windows" XPCShell test config for test_symlinks.js and test_bug476919.js from source to configuration file. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D140427
This commit is contained in:
parent
894a9df7d6
commit
b920ad57d6
@ -1,30 +1,25 @@
|
|||||||
/* global __LOCATION__ */
|
/* global __LOCATION__ */
|
||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
// skip this test on Windows
|
var testDir = __LOCATION__.parent;
|
||||||
if (mozinfo.os != "win") {
|
// create a test file, then symlink it, then check that we think it's a symlink
|
||||||
var testDir = __LOCATION__.parent;
|
var targetFile = testDir.clone();
|
||||||
// create a test file, then symlink it, then check that we think it's a symlink
|
targetFile.append("target.txt");
|
||||||
var targetFile = testDir.clone();
|
if (!targetFile.exists()) {
|
||||||
targetFile.append("target.txt");
|
targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
|
||||||
if (!targetFile.exists()) {
|
|
||||||
targetFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o644);
|
|
||||||
}
|
|
||||||
|
|
||||||
var link = testDir.clone();
|
|
||||||
link.append("link");
|
|
||||||
if (link.exists()) {
|
|
||||||
link.remove(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
|
||||||
ln.initWithPath("/bin/ln");
|
|
||||||
var process = Cc["@mozilla.org/process/util;1"].createInstance(
|
|
||||||
Ci.nsIProcess
|
|
||||||
);
|
|
||||||
process.init(ln);
|
|
||||||
var args = ["-s", targetFile.path, link.path];
|
|
||||||
process.run(true, args, args.length);
|
|
||||||
Assert.ok(link.isSymlink());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var link = testDir.clone();
|
||||||
|
link.append("link");
|
||||||
|
if (link.exists()) {
|
||||||
|
link.remove(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
var ln = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
|
||||||
|
ln.initWithPath("/bin/ln");
|
||||||
|
var process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
|
||||||
|
process.init(ln);
|
||||||
|
var args = ["-s", targetFile.path, link.path];
|
||||||
|
process.run(true, args, args.length);
|
||||||
|
Assert.ok(link.isSymlink());
|
||||||
}
|
}
|
||||||
|
@ -134,11 +134,6 @@ function testSymLinks(testDir, relative) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function run_test() {
|
function run_test() {
|
||||||
// Skip this test on Windows
|
|
||||||
if (mozinfo.os == "win") {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var testDir = CWD;
|
var testDir = CWD;
|
||||||
testDir.append("test_symlinks");
|
testDir.append("test_symlinks");
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ generated-files =
|
|||||||
[test_bug364285-1.js]
|
[test_bug364285-1.js]
|
||||||
[test_bug374754.js]
|
[test_bug374754.js]
|
||||||
[test_bug476919.js]
|
[test_bug476919.js]
|
||||||
|
# Creating a symlink requires admin or developer mode on Windows.
|
||||||
|
skip-if = os == "win"
|
||||||
# Bug 676998: test fails consistently on Android
|
# Bug 676998: test fails consistently on Android
|
||||||
fail-if = os == "android"
|
fail-if = os == "android"
|
||||||
[test_bug478086.js]
|
[test_bug478086.js]
|
||||||
@ -47,6 +49,8 @@ skip-if = os == "android"
|
|||||||
[test_seek_multiplex.js]
|
[test_seek_multiplex.js]
|
||||||
[test_stringstream.js]
|
[test_stringstream.js]
|
||||||
[test_symlinks.js]
|
[test_symlinks.js]
|
||||||
|
# Creating a symlink requires admin or developer mode on Windows.
|
||||||
|
skip-if = os == "win"
|
||||||
# Bug 676998: test fails consistently on Android
|
# Bug 676998: test fails consistently on Android
|
||||||
fail-if = os == "android"
|
fail-if = os == "android"
|
||||||
[test_systemInfo.js]
|
[test_systemInfo.js]
|
||||||
|
Loading…
Reference in New Issue
Block a user