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__ */
|
||||
|
||||
function run_test() {
|
||||
// skip this test on Windows
|
||||
if (mozinfo.os != "win") {
|
||||
var testDir = __LOCATION__.parent;
|
||||
// create a test file, then symlink it, then check that we think it's a symlink
|
||||
var targetFile = testDir.clone();
|
||||
targetFile.append("target.txt");
|
||||
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 testDir = __LOCATION__.parent;
|
||||
// create a test file, then symlink it, then check that we think it's a symlink
|
||||
var targetFile = testDir.clone();
|
||||
targetFile.append("target.txt");
|
||||
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());
|
||||
}
|
||||
|
@ -134,11 +134,6 @@ function testSymLinks(testDir, relative) {
|
||||
}
|
||||
|
||||
function run_test() {
|
||||
// Skip this test on Windows
|
||||
if (mozinfo.os == "win") {
|
||||
return;
|
||||
}
|
||||
|
||||
var testDir = CWD;
|
||||
testDir.append("test_symlinks");
|
||||
|
||||
|
@ -15,6 +15,8 @@ generated-files =
|
||||
[test_bug364285-1.js]
|
||||
[test_bug374754.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
|
||||
fail-if = os == "android"
|
||||
[test_bug478086.js]
|
||||
@ -47,6 +49,8 @@ skip-if = os == "android"
|
||||
[test_seek_multiplex.js]
|
||||
[test_stringstream.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
|
||||
fail-if = os == "android"
|
||||
[test_systemInfo.js]
|
||||
|
Loading…
Reference in New Issue
Block a user